Merge branch 'flutterflow' into bugfix/fd-597

This commit is contained in:
Lucas 2024-08-02 08:24:44 -03:00
commit 5e1211b44e
5 changed files with 68 additions and 61 deletions

View File

@ -51,8 +51,8 @@
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
6436409227A31CD800820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6436409127A31CDB00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6436409727A31CDC00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
6436409027A31CD400820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C1B4A503715BC7B0F8826983 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -301,8 +301,8 @@
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
6436409227A31CD800820AF7 /* pt */,
6436409127A31CDB00820AF7 /* en */,
6436409727A31CDC00820AF7 /* pt */,
6436409027A31CD400820AF7 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";

View File

@ -21,9 +21,6 @@ class SignUpTemplateComponentModel
);
}
if (!RegExp(kTextValidatorUsernameRegex).hasMatch(val)) {
return 'Must start with a letter and can only contain letters, digits and - or _.';
}
return null;
}
@ -41,7 +38,9 @@ class SignUpTemplateComponentModel
}
if (!RegExp(kTextValidatorEmailRegex).hasMatch(val)) {
return 'Has to be a valid email address.';
return FFLocalizations.of(context).getText(
'vobnktrz' /* Insira um email valido. */,
);
}
return null;
}
@ -60,6 +59,12 @@ class SignUpTemplateComponentModel
);
}
if (val.length < 8) {
return FFLocalizations.of(context).getText(
'duq5gpp6' /* A senha deve ter pelo menos 8 ... */,
);
}
return null;
}

View File

@ -351,8 +351,6 @@ class _SignUpTemplateComponentWidgetState
.containsKey(
'Plus Jakarta Sans'),
),
keyboardType:
TextInputType.name,
validator: _model
.nameRegisterFormTextControllerValidator
.asValidator(context),

View File

@ -214,12 +214,11 @@ class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
List<DropdownMenuItem<T>> _createMenuItems() => widget.options
.map(
(option) => DropdownMenuItem<T>(
value: option,
child: Padding(
padding: _useDropdown2() ? horizontalMargin : EdgeInsets.zero,
child: Text(optionLabels[option] ?? '', style: widget.textStyle),
),
),
value: option,
child: Padding(
padding: _useDropdown2() ? horizontalMargin : EdgeInsets.zero,
child: Text(optionLabels[option] ?? '', style: widget.textStyle),
)),
)
.toList();
@ -234,37 +233,36 @@ class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
final isSelected =
multiSelectController.value?.contains(item) ?? false;
return InkWell(
onTap: () {
multiSelectController.value ??= [];
isSelected
? multiSelectController.value!.remove(item)
: multiSelectController.value!.add(item);
multiSelectController.update();
// This rebuilds the StatefulWidget to update the button's text.
setState(() {});
// This rebuilds the dropdownMenu Widget to update the check mark.
menuSetState(() {});
},
child: Container(
height: double.infinity,
padding: horizontalMargin,
child: Row(
children: [
if (isSelected)
const Icon(Icons.check_box_outlined)
else
const Icon(Icons.check_box_outline_blank),
const SizedBox(width: 16),
Expanded(
child: Text(
optionLabels[item]!,
style: widget.textStyle,
onTap: () {
multiSelectController.value ??= [];
isSelected
? multiSelectController.value!.remove(item)
: multiSelectController.value!.add(item);
multiSelectController.update();
// This rebuilds the StatefulWidget to update the button's text.
setState(() {});
// This rebuilds the dropdownMenu Widget to update the check mark.
menuSetState(() {});
},
child: Container(
height: double.infinity,
padding: horizontalMargin,
child: Row(
children: [
if (isSelected)
const Icon(Icons.check_box_outlined)
else
const Icon(Icons.check_box_outline_blank),
const SizedBox(width: 16),
Expanded(
child: Text(
optionLabels[item]!,
style: widget.textStyle,
),
),
),
],
),
),
);
],
),
));
},
),
),
@ -307,21 +305,19 @@ class _FlutterFlowDropDownState<T> extends State<FlutterFlowDropDown<T>> {
: (isMultiSelect ? (_) {} : (val) => widget.controller!.value = val),
isExpanded: true,
selectedItemBuilder: (context) => widget.options
.map(
(item) => Align(
alignment: AlignmentDirectional.centerStart,
child: Text(
isMultiSelect
? currentValues
.where((v) => optionLabels.containsKey(v))
.map((v) => optionLabels[v])
.join(', ')
: optionLabels[item]!,
style: widget.textStyle,
maxLines: 1,
),
),
)
.map((item) => Align(
alignment: AlignmentDirectional.centerStart,
child: Text(
isMultiSelect
? currentValues
.where((v) => optionLabels.containsKey(v))
.map((v) => optionLabels[v])
.join(', ')
: optionLabels[item]!,
style: widget.textStyle,
maxLines: 1,
),
))
.toList(),
dropdownSearchData: widget.isSearchable
? DropdownSearchData<T>(

View File

@ -963,6 +963,10 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
'pt': 'Campo é necessário',
'en': 'Field is required',
},
'vobnktrz': {
'pt': 'Insira um email valido.',
'en': '',
},
'z0bv6wi2': {
'pt': 'Please choose an option from the dropdown',
'en': '',
@ -971,6 +975,10 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
'pt': 'Campo é necessário',
'en': 'Field is required',
},
'duq5gpp6': {
'pt': 'A senha deve ter pelo menos 8 caracteres.',
'en': '',
},
'rcikqhf1': {
'pt': 'Please choose an option from the dropdown',
'en': '',