register user detail

This commit is contained in:
jayesh
2024-05-31 17:01:48 +05:30
parent 264f53373f
commit bc1dcf6c3b
44 changed files with 815 additions and 62 deletions

View File

@@ -0,0 +1,18 @@
import 'package:bloc/bloc.dart';
import 'checkbox_event.dart';
import 'checkbox_state.dart';
class CheckboxBloc extends Bloc<CheckboxEvent, CheckBoxState> {
CheckboxBloc() : super(CheckboxUnchecked()) {
on<ToggleCheckbox>(_onToggleCheckbox);
}
void _onToggleCheckbox(ToggleCheckbox event, Emitter<CheckBoxState> emit) {
if (state is CheckboxUnchecked) {
emit(CheckboxChecked());
} else {
emit(CheckboxUnchecked());
}
}
}

View File

@@ -0,0 +1,10 @@
import 'package:equatable/equatable.dart';
abstract class CheckboxEvent extends Equatable {
const CheckboxEvent();
@override
List<Object> get props => [];
}
class ToggleCheckbox extends CheckboxEvent {}

View File

@@ -0,0 +1,12 @@
import 'package:equatable/equatable.dart';
abstract class CheckBoxState extends Equatable {
const CheckBoxState();
@override
List<Object> get props => [];
}
class CheckboxUnchecked extends CheckBoxState {}
class CheckboxChecked extends CheckBoxState {}