chore: Update preferences settings UI

This commit is contained in:
jantunesmesias 2024-08-06 13:52:36 -03:00
parent 4989ba6b2b
commit a5255f4f06
1 changed files with 29 additions and 26 deletions

View File

@ -105,32 +105,34 @@ class PreferencesPageModel with ChangeNotifier {
backgroundColor: FlutterFlowTheme.of(context).primaryBackground, backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
title: Text( title: Text(
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(
enText: FFAppState().notify enText: FFAppState().notify
? 'Access Notification' ? 'Disable Access Notification'
: 'Disable Access Notification', : 'Access Notification',
ptText: FFAppState().notify ptText: FFAppState().notify
? 'Notificação de acesso' ? 'Desativar notificação de acesso'
: 'Desativar notificação de acesso', : 'Notificação de acesso'),
),
), ),
content: Text( content: Text(
FFLocalizations.of(context).getVariableText( FFLocalizations.of(context).getVariableText(
ptText: 'Tem certeza que deseja desvincular este dispositivo?', ptText: FFAppState().notify
enText: 'Are you sure you want to unlink this device?', ? '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: [ actions: [
FFButtonWidget( FFButtonWidget(
text: FFLocalizations.of(context).getVariableText( text: FFLocalizations.of(context).getVariableText(
enText: 'Cancel', enText: 'No',
ptText: 'Cancelar', ptText: 'Não',
), ),
onPressed: () { onPressed: () {
Navigator.pop(context); Navigator.pop(context);
}, },
options: FFButtonOptions( options: FFButtonOptions(
width: 100, width: MediaQuery.of(context).size.width * 0.3,
height: 40, height: MediaQuery.of(context).size.height * 0.05,
color: FlutterFlowTheme.of(context).primaryBackground, color: FlutterFlowTheme.of(context).primaryBackground,
textStyle: TextStyle( textStyle: TextStyle(
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
@ -190,14 +192,15 @@ class PreferencesPageModel with ChangeNotifier {
), ),
); );
}).whenComplete(() => notifyListeners()); }).whenComplete(() => notifyListeners());
Navigator.pop(context);
}, },
text: FFLocalizations.of(context).getVariableText( text: FFLocalizations.of(context).getVariableText(
enText: 'Unlink', enText: 'Yes',
ptText: 'Desvincular', ptText: 'Sim',
), ),
options: FFButtonOptions( options: FFButtonOptions(
width: 100, width: MediaQuery.of(context).size.width * 0.3,
height: 40, height: MediaQuery.of(context).size.height * 0.05,
color: FlutterFlowTheme.of(context).primaryBackground, color: FlutterFlowTheme.of(context).primaryBackground,
textStyle: TextStyle( textStyle: TextStyle(
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
@ -243,8 +246,8 @@ class PreferencesPageModel with ChangeNotifier {
Navigator.pop(context); Navigator.pop(context);
}, },
options: FFButtonOptions( options: FFButtonOptions(
width: 100, width: MediaQuery.of(context).size.width * 0.3,
height: 40, height: MediaQuery.of(context).size.height * 0.05,
color: FlutterFlowTheme.of(context).primaryBackground, color: FlutterFlowTheme.of(context).primaryBackground,
textStyle: TextStyle( textStyle: TextStyle(
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
@ -300,8 +303,8 @@ class PreferencesPageModel with ChangeNotifier {
ptText: 'Desvincular', ptText: 'Desvincular',
), ),
options: FFButtonOptions( options: FFButtonOptions(
width: 100, width: MediaQuery.of(context).size.width * 0.3,
height: 40, height: MediaQuery.of(context).size.height * 0.05,
color: FlutterFlowTheme.of(context).primaryBackground, color: FlutterFlowTheme.of(context).primaryBackground,
textStyle: TextStyle( textStyle: TextStyle(
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
@ -341,8 +344,8 @@ class PreferencesPageModel with ChangeNotifier {
FFButtonWidget( FFButtonWidget(
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
options: FFButtonOptions( options: FFButtonOptions(
width: 100, width: MediaQuery.of(context).size.width * 0.3,
height: 40, height: MediaQuery.of(context).size.height * 0.05,
color: FlutterFlowTheme.of(context).primaryBackground, color: FlutterFlowTheme.of(context).primaryBackground,
textStyle: TextStyle( textStyle: TextStyle(
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,
@ -401,8 +404,8 @@ class PreferencesPageModel with ChangeNotifier {
notifyListeners(); notifyListeners();
}, },
options: FFButtonOptions( options: FFButtonOptions(
width: 100, width: MediaQuery.of(context).size.width * 0.3,
height: 40, height: MediaQuery.of(context).size.height * 0.05,
color: FlutterFlowTheme.of(context).primaryBackground, color: FlutterFlowTheme.of(context).primaryBackground,
textStyle: TextStyle( textStyle: TextStyle(
color: FlutterFlowTheme.of(context).primaryText, color: FlutterFlowTheme.of(context).primaryText,