update on settings and customer background
This commit is contained in:
parent
05c3208cad
commit
6424e82d54
18 changed files with 227 additions and 42 deletions
14
lib/blocs/language/functions/bloc_setlanguage.dart
Normal file
14
lib/blocs/language/functions/bloc_setlanguage.dart
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:pharmacy_mobile/blocs/language/language_bloc.dart';
|
||||
import 'package:pharmacy_mobile/blocs/language/language_event.dart';
|
||||
|
||||
Future<bool> blocSetLanguage(BuildContext context, String value) async {
|
||||
try {
|
||||
final languageBloc = context.read<LanguageBloc>();
|
||||
languageBloc.add(LanguageSetValue(value));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue