WIP
This commit is contained in:
parent
929c18ba9e
commit
5e99d8cb02
|
@ -157,14 +157,18 @@ class PreferencesPageModel with ChangeNotifier {
|
||||||
notifica: FFAppState().notify ? 'S' : 'N',
|
notifica: FFAppState().notify ? 'S' : 'N',
|
||||||
)
|
)
|
||||||
.then((value) {
|
.then((value) {
|
||||||
|
if (value.jsonBody['error'] == false) {
|
||||||
|
Navigator.pop(context);
|
||||||
FFAppState().notify = !FFAppState().notify;
|
FFAppState().notify = !FFAppState().notify;
|
||||||
|
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
ptText: 'Notificação alterada com sucesso',
|
ptText:
|
||||||
enText: 'Notification changed successfully',
|
'Notificação alterada com sucesso',
|
||||||
|
enText:
|
||||||
|
'Notification changed successfully',
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color:
|
||||||
|
@ -178,6 +182,7 @@ class PreferencesPageModel with ChangeNotifier {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}).catchError((err) {
|
}).catchError((err) {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
|
Loading…
Reference in New Issue