update
This commit is contained in:
parent
a76d3a0f35
commit
e3dc94a768
33 changed files with 368 additions and 184 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:pharmacy_mobile/blocs/user/user_event.dart';
|
||||
import 'package:pharmacy_mobile/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