diff --git a/lib/pages/preferences_settings_page/preferences_settings_model.dart b/lib/pages/preferences_settings_page/preferences_settings_model.dart index 80790cbc..2d30ed52 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_model.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_model.dart @@ -291,14 +291,15 @@ class PreferencesPageModel with ChangeNotifier { ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - FFLocalizations.of(context).getVariableText( - enText: 'Device unlinked successfully', - ptText: - 'Dispositivo desvinculado com sucesso', - ), - style: TextStyle( - color: - FlutterFlowTheme.of(context).info)), + FFLocalizations.of(context).getVariableText( + enText: 'Device unlinked successfully', + ptText: + 'Dispositivo desvinculado com sucesso', + ), + style: TextStyle( + color: FlutterFlowTheme.of(context).info, + ), + ), backgroundColor: FlutterFlowTheme.of(context).success, duration: const Duration(seconds: 3), @@ -308,20 +309,41 @@ 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( content: Text( - FFLocalizations.of(context).getVariableText( - enText: 'Error unlinking device', - ptText: 'Erro ao desvincular dispositivo', - ), - style: TextStyle( - color: - FlutterFlowTheme.of(context).info)), + 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), + 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),