This commit is contained in:
jantunesmesias 2024-08-08 08:45:19 -03:00
parent fc77d67767
commit 929c18ba9e
1 changed files with 54 additions and 47 deletions

View File

@ -147,6 +147,7 @@ class PreferencesPageModel with ChangeNotifier {
),
FFButtonWidget(
onPressed: () async {
try {
PhpGroup.changeNotifica
.call(
userUUID: FFAppState().userUUID,
@ -166,7 +167,8 @@ class PreferencesPageModel with ChangeNotifier {
enText: 'Notification changed successfully',
),
style: TextStyle(
color: FlutterFlowTheme.of(context).info)),
color:
FlutterFlowTheme.of(context).info)),
backgroundColor:
FlutterFlowTheme.of(context).success,
duration: const Duration(seconds: 3),
@ -186,8 +188,10 @@ class PreferencesPageModel with ChangeNotifier {
ptText: 'Erro ao alterar notificação',
),
style: TextStyle(
color: FlutterFlowTheme.of(context).info)),
backgroundColor: FlutterFlowTheme.of(context).error,
color:
FlutterFlowTheme.of(context).info)),
backgroundColor:
FlutterFlowTheme.of(context).error,
duration: const Duration(seconds: 3),
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(
@ -196,7 +200,10 @@ class PreferencesPageModel with ChangeNotifier {
),
);
}).whenComplete(() => notifyListeners());
} on Exception catch (e) {
log(e.toString());
Navigator.pop(context);
}
},
text: FFLocalizations.of(context).getVariableText(
enText: 'Yes',