This commit is contained in:
jantunesmesias 2024-08-06 17:56:50 -03:00
parent 3ed50939d0
commit 262b8dd63b
1 changed files with 40 additions and 18 deletions

View File

@ -297,8 +297,9 @@ class PreferencesPageModel with ChangeNotifier {
'Dispositivo desvinculado com sucesso',
),
style: TextStyle(
color:
FlutterFlowTheme.of(context).info)),
color: FlutterFlowTheme.of(context).info,
),
),
backgroundColor:
FlutterFlowTheme.of(context).success,
duration: const Duration(seconds: 3),
@ -308,9 +309,7 @@ class PreferencesPageModel with ChangeNotifier {
),
),
);
})
// ignore: body_might_complete_normally_catch_error
.catchError((err, stack) {
}).catchError((err, stack) {
log(err.toString());
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
@ -320,8 +319,31 @@ class PreferencesPageModel with ChangeNotifier {
ptText: 'Erro ao desvincular dispositivo',
),
style: TextStyle(
color:
FlutterFlowTheme.of(context).info)),
color: FlutterFlowTheme.of(context).info,
),
),
backgroundColor:
FlutterFlowTheme.of(context).error,
duration: const Duration(seconds: 3),
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
),
);
}).catchError((err, stack) {
log(err.toString());
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
FFLocalizations.of(context).getVariableText(
enText: 'Error unlinking device',
ptText: 'Erro ao desvincular dispositivo',
),
style: TextStyle(
color: FlutterFlowTheme.of(context).info,
),
),
backgroundColor:
FlutterFlowTheme.of(context).error,
duration: const Duration(seconds: 3),