Merge branch 'flutterflow' into fix/login
This commit is contained in:
commit
4a887e10d1
|
@ -51,8 +51,8 @@
|
||||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
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>"; };
|
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>"; };
|
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
6436409D27A31CDC00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
6436409827A31CD800820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
6436409227A31CDD00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
6436409D27A31CD300820AF7 /* 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>"; };
|
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>"; };
|
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 */
|
/* End PBXFileReference section */
|
||||||
|
@ -301,8 +301,8 @@
|
||||||
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
|
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
|
||||||
isa = PBXVariantGroup;
|
isa = PBXVariantGroup;
|
||||||
children = (
|
children = (
|
||||||
6436409D27A31CDC00820AF7 /* pt */,
|
6436409827A31CD800820AF7 /* pt */,
|
||||||
6436409227A31CDD00820AF7 /* en */,
|
6436409D27A31CD300820AF7 /* en */,
|
||||||
);
|
);
|
||||||
name = InfoPlist.strings;
|
name = InfoPlist.strings;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
|
@ -10,15 +10,34 @@ class ForgotPasswordTemplateComponentModel
|
||||||
extends FlutterFlowModel<ForgotPasswordTemplateComponentWidget> {
|
extends FlutterFlowModel<ForgotPasswordTemplateComponentWidget> {
|
||||||
/// State fields for stateful widgets in this component.
|
/// State fields for stateful widgets in this component.
|
||||||
|
|
||||||
|
final formKey = GlobalKey<FormState>();
|
||||||
// State field(s) for emailAddress widget.
|
// State field(s) for emailAddress widget.
|
||||||
FocusNode? emailAddressFocusNode;
|
FocusNode? emailAddressFocusNode;
|
||||||
TextEditingController? emailAddressTextController;
|
TextEditingController? emailAddressTextController;
|
||||||
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
||||||
|
String? _emailAddressTextControllerValidator(
|
||||||
|
BuildContext context, String? val) {
|
||||||
|
if (val == null || val.isEmpty) {
|
||||||
|
return FFLocalizations.of(context).getText(
|
||||||
|
'3hqg8buh' /* E-mail é Obrigatório */,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!RegExp(kTextValidatorEmailRegex).hasMatch(val)) {
|
||||||
|
return FFLocalizations.of(context).getText(
|
||||||
|
'jh5r2b1w' /* E-mail Inválido */,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// Stores action output result for [Backend Call - API (forgotPassword)] action in Button-Login widget.
|
// Stores action output result for [Backend Call - API (forgotPassword)] action in Button-Login widget.
|
||||||
ApiCallResponse? req;
|
ApiCallResponse? req;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {}
|
void initState(BuildContext context) {
|
||||||
|
emailAddressTextControllerValidator = _emailAddressTextControllerValidator;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import '/components/molecular_components/throw_exception/throw_exception_widget.
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||||
|
import 'package:easy_debounce/easy_debounce.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'forgot_password_template_component_model.dart';
|
import 'forgot_password_template_component_model.dart';
|
||||||
|
@ -140,64 +141,187 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
'wu2f7yzo' /* Não se preucupe nós vamos te a... */,
|
'xxm3ajsy' /* ESQUECEU SUA SENHA? */,
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
fontSize: 14.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
useGoogleFonts:
|
|
||||||
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||||
|
fontFamily: 'Outfit',
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: 24.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||||
|
child: Text(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'wu2f7yzo' /* Não se preucupe nós vamos te a... */,
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: 14.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
useGoogleFonts:
|
||||||
|
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Form(
|
||||||
|
key: _model.formKey,
|
||||||
|
autovalidateMode: AutovalidateMode.disabled,
|
||||||
|
child: Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _model.emailAddressTextController,
|
controller: _model.emailAddressTextController,
|
||||||
focusNode: _model.emailAddressFocusNode,
|
focusNode: _model.emailAddressFocusNode,
|
||||||
|
onChanged: (_) => EasyDebounce.debounce(
|
||||||
|
'_model.emailAddressTextController',
|
||||||
|
const Duration(milliseconds: 500),
|
||||||
|
() => setState(() {}),
|
||||||
|
),
|
||||||
|
autofocus: true,
|
||||||
autofillHints: const [AutofillHints.email],
|
autofillHints: const [AutofillHints.email],
|
||||||
obscureText: false,
|
obscureText: false,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
labelText: FFLocalizations.of(context).getText(
|
labelText: FFLocalizations.of(context).getText(
|
||||||
'mtz8l7ft' /* Email */,
|
'mtz8l7ft' /* E-mail */,
|
||||||
),
|
),
|
||||||
labelStyle:
|
labelStyle:
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(context).primary,
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
fontSize: 14.0,
|
fontSize: 14.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey('Plus Jakarta Sans'),
|
.containsKey('Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
hintStyle:
|
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
|
||||||
color: FlutterFlowTheme.of(context).primaryText,
|
|
||||||
fontSize: 14.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
|
||||||
.containsKey('Plus Jakarta Sans'),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
enabledBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent1,
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
width: 2.0,
|
width: 2.0,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(12.0),
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
),
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).primary,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
|
),
|
||||||
|
errorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
|
),
|
||||||
|
focusedErrorBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: FlutterFlowTheme.of(context).error,
|
||||||
|
width: 2.0,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
|
),
|
||||||
|
filled: true,
|
||||||
|
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
|
contentPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
|
24.0, 24.0, 20.0, 24.0),
|
||||||
|
suffixIcon: Icon(
|
||||||
|
Icons.email,
|
||||||
|
color: FlutterFlowTheme.of(context).accent1,
|
||||||
|
size: 22.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||||
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
color: FlutterFlowTheme.of(context).primaryText,
|
||||||
|
fontSize: 14.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey('Plus Jakarta Sans'),
|
||||||
|
),
|
||||||
|
maxLines: null,
|
||||||
|
keyboardType: TextInputType.emailAddress,
|
||||||
|
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||||
|
validator: _model.emailAddressTextControllerValidator
|
||||||
|
.asValidator(context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Align(
|
||||||
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||||
|
child: FFButtonWidget(
|
||||||
|
onPressed: (_model.emailAddressTextController.text == '')
|
||||||
|
? null
|
||||||
|
: () async {
|
||||||
|
_model.req = await PhpGroup.forgotPasswordCall.call(
|
||||||
|
email: _model.emailAddressTextController.text,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (PhpGroup.forgotPasswordCall.error(
|
||||||
|
(_model.req?.jsonBody ?? ''),
|
||||||
|
) ==
|
||||||
|
false) {
|
||||||
|
Navigator.pop(context);
|
||||||
|
} else {
|
||||||
|
await showModalBottomSheet(
|
||||||
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
enableDrag: false,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return Padding(
|
||||||
|
padding: MediaQuery.viewInsetsOf(context),
|
||||||
|
child: ThrowExceptionWidget(
|
||||||
|
msg: PhpGroup.forgotPasswordCall.msg(
|
||||||
|
(_model.req?.jsonBody ?? ''),
|
||||||
|
)!,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
).then((value) => safeSetState(() {}));
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(() {});
|
||||||
|
},
|
||||||
|
text: FFLocalizations.of(context).getText(
|
||||||
|
'74rnd5bu' /* Enviar */,
|
||||||
|
),
|
||||||
|
options: FFButtonOptions(
|
||||||
|
width: 270.0,
|
||||||
|
height: 50.0,
|
||||||
|
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
|
iconPadding:
|
||||||
|
const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
||||||
|
color: const Color(0xFF1AAB5F),
|
||||||
|
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||||
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
|
.containsKey('Plus Jakarta Sans'),
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
|
),
|
||||||
focusedBorder: OutlineInputBorder(
|
focusedBorder: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: FlutterFlowTheme.of(context).accent3,
|
color: FlutterFlowTheme.of(context).accent3,
|
||||||
|
|
|
@ -1036,8 +1036,20 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
'en': 'E-mail',
|
'en': 'E-mail',
|
||||||
},
|
},
|
||||||
'w7y5wlnv': {
|
'w7y5wlnv': {
|
||||||
'pt': 'digite o seu email.....',
|
'pt': '',
|
||||||
'en': 'enter your email.....',
|
'en': '',
|
||||||
|
},
|
||||||
|
'3hqg8buh': {
|
||||||
|
'pt': 'E-mail é Obrigatório',
|
||||||
|
'en': '',
|
||||||
|
},
|
||||||
|
'jh5r2b1w': {
|
||||||
|
'pt': 'E-mail Inválido',
|
||||||
|
'en': '',
|
||||||
|
},
|
||||||
|
'1p76vmkn': {
|
||||||
|
'pt': 'Please choose an option from the dropdown',
|
||||||
|
'en': '',
|
||||||
},
|
},
|
||||||
'74rnd5bu': {
|
'74rnd5bu': {
|
||||||
'pt': 'Enviar',
|
'pt': 'Enviar',
|
||||||
|
|
Loading…
Reference in New Issue