From a5255f4f069233a012d74f6cf33c5dd616e08ddb Mon Sep 17 00:00:00 2001 From: jantunesmesias Date: Tue, 6 Aug 2024 13:52:36 -0300 Subject: [PATCH] chore: Update preferences settings UI --- .../preferences_settings_model.dart | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/lib/pages/preferences_settings_page/preferences_settings_model.dart b/lib/pages/preferences_settings_page/preferences_settings_model.dart index 40ef200a..2cb78e00 100644 --- a/lib/pages/preferences_settings_page/preferences_settings_model.dart +++ b/lib/pages/preferences_settings_page/preferences_settings_model.dart @@ -105,32 +105,34 @@ class PreferencesPageModel with ChangeNotifier { backgroundColor: FlutterFlowTheme.of(context).primaryBackground, title: Text( FFLocalizations.of(context).getVariableText( - enText: FFAppState().notify - ? 'Access Notification' - : 'Disable Access Notification', - ptText: FFAppState().notify - ? 'Notificação de acesso' - : 'Desativar notificação de acesso', - ), + enText: FFAppState().notify + ? 'Disable Access Notification' + : 'Access Notification', + ptText: FFAppState().notify + ? 'Desativar notificação de acesso' + : 'Notificação de acesso'), ), content: Text( FFLocalizations.of(context).getVariableText( - ptText: 'Tem certeza que deseja desvincular este dispositivo?', - enText: 'Are you sure you want to unlink this device?', - ), + ptText: FFAppState().notify + ? 'Tem certeza que deseja desativar as suas notificações de acesso?' + : 'Tem certeza que deseja receber as suas notificações de acesso?', + enText: FFAppState().notify + ? 'Are you sure you want to disable your access notifications?' + : 'Are you sure you want to receive your access notifications?'), ), actions: [ FFButtonWidget( text: FFLocalizations.of(context).getVariableText( - enText: 'Cancel', - ptText: 'Cancelar', + enText: 'No', + ptText: 'Não', ), onPressed: () { Navigator.pop(context); }, options: FFButtonOptions( - width: 100, - height: 40, + width: MediaQuery.of(context).size.width * 0.3, + height: MediaQuery.of(context).size.height * 0.05, color: FlutterFlowTheme.of(context).primaryBackground, textStyle: TextStyle( color: FlutterFlowTheme.of(context).primaryText, @@ -190,14 +192,15 @@ class PreferencesPageModel with ChangeNotifier { ), ); }).whenComplete(() => notifyListeners()); + Navigator.pop(context); }, text: FFLocalizations.of(context).getVariableText( - enText: 'Unlink', - ptText: 'Desvincular', + enText: 'Yes', + ptText: 'Sim', ), options: FFButtonOptions( - width: 100, - height: 40, + width: MediaQuery.of(context).size.width * 0.3, + height: MediaQuery.of(context).size.height * 0.05, color: FlutterFlowTheme.of(context).primaryBackground, textStyle: TextStyle( color: FlutterFlowTheme.of(context).primaryText, @@ -243,8 +246,8 @@ class PreferencesPageModel with ChangeNotifier { Navigator.pop(context); }, options: FFButtonOptions( - width: 100, - height: 40, + width: MediaQuery.of(context).size.width * 0.3, + height: MediaQuery.of(context).size.height * 0.05, color: FlutterFlowTheme.of(context).primaryBackground, textStyle: TextStyle( color: FlutterFlowTheme.of(context).primaryText, @@ -300,8 +303,8 @@ class PreferencesPageModel with ChangeNotifier { ptText: 'Desvincular', ), options: FFButtonOptions( - width: 100, - height: 40, + width: MediaQuery.of(context).size.width * 0.3, + height: MediaQuery.of(context).size.height * 0.05, color: FlutterFlowTheme.of(context).primaryBackground, textStyle: TextStyle( color: FlutterFlowTheme.of(context).primaryText, @@ -341,8 +344,8 @@ class PreferencesPageModel with ChangeNotifier { FFButtonWidget( onPressed: () => Navigator.pop(context), options: FFButtonOptions( - width: 100, - height: 40, + width: MediaQuery.of(context).size.width * 0.3, + height: MediaQuery.of(context).size.height * 0.05, color: FlutterFlowTheme.of(context).primaryBackground, textStyle: TextStyle( color: FlutterFlowTheme.of(context).primaryText, @@ -401,8 +404,8 @@ class PreferencesPageModel with ChangeNotifier { notifyListeners(); }, options: FFButtonOptions( - width: 100, - height: 40, + width: MediaQuery.of(context).size.width * 0.3, + height: MediaQuery.of(context).size.height * 0.05, color: FlutterFlowTheme.of(context).primaryBackground, textStyle: TextStyle( color: FlutterFlowTheme.of(context).primaryText,