update
This commit is contained in:
parent
a76d3a0f35
commit
e3dc94a768
33 changed files with 368 additions and 184 deletions
17
lib/blocs/guest/guest_bloc.dart
Normal file
17
lib/blocs/guest/guest_bloc.dart
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'guest_event.dart';
|
||||
import 'guest_state.dart';
|
||||
|
||||
class GuestBloc extends Bloc<GuestEvent, GuestState> {
|
||||
GuestBloc() : super(GuestState(false)) {
|
||||
on<GuestSetOn>((event, emit) {
|
||||
emit(GuestState(true));
|
||||
});
|
||||
on<GuestSetOff>((event, emit) {
|
||||
emit(GuestState(false));
|
||||
});
|
||||
on<GuestGetStatus>((event, emit) {
|
||||
emit(state);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue