update
This commit is contained in:
parent
a76d3a0f35
commit
e3dc94a768
33 changed files with 368 additions and 184 deletions
14
lib/blocs/guest/functions/bloc_getgueststatus.dart
Normal file
14
lib/blocs/guest/functions/bloc_getgueststatus.dart
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:pharmacy_mobile/blocs/guest/guest_bloc.dart';
|
||||
import 'package:pharmacy_mobile/blocs/guest/guest_event.dart';
|
||||
|
||||
Future<bool> blocGetGuestStatus(BuildContext context) async {
|
||||
try {
|
||||
final guestBloc = context.read<GuestBloc>();
|
||||
guestBloc.add(GuestGetStatus());
|
||||
return guestBloc.state.value;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
14
lib/blocs/guest/functions/bloc_setguestoff.dart
Normal file
14
lib/blocs/guest/functions/bloc_setguestoff.dart
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:pharmacy_mobile/blocs/guest/guest_bloc.dart';
|
||||
import 'package:pharmacy_mobile/blocs/guest/guest_event.dart';
|
||||
|
||||
Future<bool> blocSetGuestOff(BuildContext context) async {
|
||||
try {
|
||||
final guestBloc = context.read<GuestBloc>();
|
||||
guestBloc.add(GuestSetOff());
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
14
lib/blocs/guest/functions/bloc_setgueston.dart
Normal file
14
lib/blocs/guest/functions/bloc_setgueston.dart
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:pharmacy_mobile/blocs/guest/guest_bloc.dart';
|
||||
import 'package:pharmacy_mobile/blocs/guest/guest_event.dart';
|
||||
|
||||
Future<bool> blocSetGuestOn(BuildContext context) async {
|
||||
try {
|
||||
final guestBloc = context.read<GuestBloc>();
|
||||
guestBloc.add(GuestSetOn());
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue