This commit is contained in:
Ivan Antunes 2024-07-29 15:53:52 -03:00
parent 982407677e
commit fb738c4b23
2 changed files with 138 additions and 269 deletions

View File

@ -4,8 +4,6 @@ import 'forgot_password_template_component_widget.dart'
show ForgotPasswordTemplateComponentWidget;
import 'package:flutter/material.dart';
class ForgotPasswordTemplateComponentModel
extends FlutterFlowModel<ForgotPasswordTemplateComponentWidget> {
/// State fields for stateful widgets in this component.

View File

@ -11,9 +11,6 @@ import 'package:google_fonts/google_fonts.dart';
import 'forgot_password_template_component_model.dart';
export 'forgot_password_template_component_model.dart';
//
class ForgotPasswordTemplateComponentWidget extends StatefulWidget {
const ForgotPasswordTemplateComponentWidget({super.key});
@ -50,11 +47,7 @@ class _ForgotPasswordTemplateComponentWidgetState
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: Align(
return Align(
alignment: const AlignmentDirectional(0.0, 1.0),
child: Container(
width: double.infinity,
@ -141,22 +134,6 @@ class _ForgotPasswordTemplateComponentWidgetState
),
),
),
Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
'xxm3ajsy' /* ESQUECEU SUA SENHA? */,
),
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: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
child: Text(
@ -176,7 +153,7 @@ class _ForgotPasswordTemplateComponentWidgetState
),
Form(
key: _model.formKey,
autovalidateMode: AutovalidateMode.always,
autovalidateMode: AutovalidateMode.onUserInteraction,
child: Padding(
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
child: SizedBox(
@ -304,111 +281,6 @@ class _ForgotPasswordTemplateComponentWidgetState
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(
borderSide: BorderSide(
color: FlutterFlowTheme.of(context).accent3,
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: const Color(0xFF6F61EF),
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: () 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,
@ -438,7 +310,6 @@ class _ForgotPasswordTemplateComponentWidgetState
],
),
),
),
);
}
}