Added bloc
This commit is contained in:
parent
4a522a38d9
commit
e0618ea3c4
7 changed files with 88 additions and 65 deletions
14
lib/blocs/user/user_bloc.dart
Normal file
14
lib/blocs/user/user_bloc.dart
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:ocbo_esign_validator/blocs/user/user_event.dart';
|
||||
import 'package:ocbo_esign_validator/blocs/user/user_state.dart';
|
||||
|
||||
class UserBloc extends Bloc<UserEvent, UserState> {
|
||||
UserBloc() : super(UserState('')) {
|
||||
on<UserSetValue>((event, emit) {
|
||||
emit(UserState(event.value));
|
||||
});
|
||||
on<UserGetValue>((event, emit) {
|
||||
emit(state);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue