fix: tratamento para ingles
This commit is contained in:
parent
1ca638dc77
commit
697fa8ff84
|
@ -45,6 +45,8 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
FFUploadedFile? uploadedTempFile;
|
||||
String? imgBase64;
|
||||
|
||||
late String defaultDropDownText = '';
|
||||
|
||||
String? dropDownValue1;
|
||||
FormFieldController<String>? dropDownValueController1;
|
||||
|
||||
|
@ -103,6 +105,13 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
String? Function(BuildContext, String?)? textControllerObservationValidator;
|
||||
|
||||
Future<void> initAsync() async {
|
||||
defaultDropDownText = FFLocalizations.of(buildContext!).getVariableText(
|
||||
enText: 'Select an option',
|
||||
ptText: 'Selecione uma opção',
|
||||
);
|
||||
dropDownValueController1 = FormFieldController<String>(dropDownValue1 ??= defaultDropDownText);
|
||||
dropDownValueController2 = FormFieldController<String>(dropDownValue2 ??= defaultDropDownText);
|
||||
|
||||
devUUID = (await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
userUUID = (await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||
|
@ -136,10 +145,6 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
textFieldFocusObservation = FocusNode();
|
||||
textControllerObservation = TextEditingController();
|
||||
|
||||
dropDownValueController1 = FormFieldController<String>(dropDownValue1 ??= 'Selecione uma opção');
|
||||
|
||||
dropDownValueController2 = FormFieldController<String>(dropDownValue2 ??= 'Selecione uma opção');
|
||||
|
||||
initAsync();
|
||||
}
|
||||
|
||||
|
@ -230,12 +235,12 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (dropDownValueController1!.value == 'Selecione uma opção' ||
|
||||
if (dropDownValueController1!.value == defaultDropDownText ||
|
||||
dropDownValueController1!.value == '' ||
|
||||
dropDownValueController1!.value == null) {
|
||||
return false;
|
||||
}
|
||||
if (dropDownValueController2!.value == 'Selecione uma opção' ||
|
||||
if (dropDownValueController2!.value == defaultDropDownText ||
|
||||
dropDownValueController2!.value == '' ||
|
||||
dropDownValueController2!.value == null) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue