Feat: Ajuste na responsividade da tela de Welcome, Login, Registe e Forgot Password
This commit is contained in:
parent
4497df1b04
commit
c22e1bff5e
|
@ -3,5 +3,6 @@
|
|||
"comments": "off",
|
||||
"strings": "off",
|
||||
"other": "off"
|
||||
}
|
||||
},
|
||||
"java.configuration.updateBuildConfiguration": "automatic"
|
||||
}
|
|
@ -57,12 +57,12 @@ android {
|
|||
|
||||
compileOptions {
|
||||
coreLibraryDesugaringEnabled true
|
||||
sourceCompatibility JavaVersion.VERSION_18
|
||||
targetCompatibility JavaVersion.VERSION_18
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = "18"
|
||||
jvmTarget = "11"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import 'package:easy_debounce/easy_debounce.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
@ -53,9 +52,9 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 300.0,
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: 570.0,
|
||||
),
|
||||
|
@ -68,6 +67,8 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
topRight: Radius.circular(15.0),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 25, 0, 25),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
@ -79,8 +80,8 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
tablet: false,
|
||||
))
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
16.0, 0.0, 16.0, 8.0),
|
||||
child: InkWell(
|
||||
key: const ValueKey<String>('BackButton'),
|
||||
splashColor: Colors.transparent,
|
||||
|
@ -103,16 +104,20 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -124,30 +129,33 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText('xxm3ajsy' /* ESQUECEU SUA SENHA? */),
|
||||
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'),
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Outfit'),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
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... */),
|
||||
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'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -155,8 +163,8 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
key: _model.formKey,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
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(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
|
@ -173,8 +181,10 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText('mtz8l7ft' /* E-mail */),
|
||||
labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
labelText: FFLocalizations.of(context)
|
||||
.getText('mtz8l7ft' /* E-mail */),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
fontSize: 14.0,
|
||||
|
@ -240,17 +250,17 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 24.0, 0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('SendButtonWidget'),
|
||||
onPressed: (_model.emailAddressTextController.text == '' ||
|
||||
onPressed: (_model.emailAddressTextController.text ==
|
||||
'' ||
|
||||
!ValidatorUtil.isValidEmail(
|
||||
_model.emailAddressTextController.text))
|
||||
? null
|
||||
: () async => AuthenticationService.forgotPassword(context, _model.emailAddressTextController.text),
|
||||
|
||||
|
||||
: () async => AuthenticationService.forgotPassword(
|
||||
context, _model.emailAddressTextController.text),
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'74rnd5bu' /* Enviar */,
|
||||
),
|
||||
|
@ -262,7 +272,8 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
textStyle:
|
||||
FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
fontSize: 16.0,
|
||||
|
@ -276,7 +287,8 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||
disabledColor:
|
||||
FlutterFlowTheme.of(context).customColor5,
|
||||
disabledTextColor: Colors.white,
|
||||
),
|
||||
showLoadingIndicator: true,
|
||||
|
@ -286,6 +298,8 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,8 +100,10 @@ class _SignInTemplateComponentWidgetState
|
|||
}
|
||||
|
||||
bool _isFormInvalid() {
|
||||
if (_model.emailAddressTextController.text == '' || _model.passwordTextController.text == '') return true;
|
||||
if (!ValidatorUtil.isValidEmail(_model.emailAddressTextController.text)) return true;
|
||||
if (_model.emailAddressTextController.text == '' ||
|
||||
_model.passwordTextController.text == '') return true;
|
||||
if (!ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -112,11 +114,6 @@ class _SignInTemplateComponentWidgetState
|
|||
children: [
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: double.infinity,
|
||||
decoration: const BoxDecoration(),
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: SingleChildScrollView(
|
||||
|
@ -125,19 +122,8 @@ class _SignInTemplateComponentWidgetState
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 35.0, 0.0, 35.0),
|
||||
child: Container(
|
||||
width: 548.0,
|
||||
height: 112.0,
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(16.0)),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Padding(
|
||||
|
@ -152,28 +138,27 @@ class _SignInTemplateComponentWidgetState
|
|||
.displaySmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 291.0,
|
||||
height: 167.0,
|
||||
height: 160.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: const AtomImageSvgTheme(filename: 'login', width: 600, height: 155),
|
||||
child: const AtomImageSvgTheme(
|
||||
filename: 'login', width: 600, height: 155),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
|
@ -182,12 +167,16 @@ class _SignInTemplateComponentWidgetState
|
|||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(34.0, 0.0, 34.0, 0.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
34.0, 0.0, 34.0, 0.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
constraints: const BoxConstraints(maxWidth: 570.0,),
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: 570.0,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
|
@ -207,10 +196,8 @@ class _SignInTemplateComponentWidgetState
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
|
@ -221,8 +208,7 @@ class _SignInTemplateComponentWidgetState
|
|||
focusNode: _model
|
||||
.emailAddressFocusNode,
|
||||
cursorColor:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
onChanged: (_) =>
|
||||
EasyDebounce.debounce(
|
||||
|
@ -242,8 +228,7 @@ class _SignInTemplateComponentWidgetState
|
|||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText:
|
||||
FFLocalizations.of(
|
||||
labelText: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'1ltg0ylb' /* Email */,
|
||||
|
@ -254,15 +239,15 @@ class _SignInTemplateComponentWidgetState
|
|||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
|
@ -321,34 +306,33 @@ class _SignInTemplateComponentWidgetState
|
|||
),
|
||||
suffixIcon: Icon(
|
||||
Icons.email,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.accent1,
|
||||
size: 22.0,
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
useGoogleFonts:
|
||||
GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
keyboardType: TextInputType
|
||||
.emailAddress,
|
||||
keyboardType:
|
||||
TextInputType.emailAddress,
|
||||
validator: _model
|
||||
.emailAddressTextControllerValidator
|
||||
.asValidator(context),
|
||||
|
@ -356,159 +340,301 @@ class _SignInTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional .fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
key: const ValueKey<String>('passwordTextFormField'),
|
||||
controller: _model.passwordTextController,
|
||||
cursorColor: FlutterFlowTheme.of(context).primary,
|
||||
focusNode: _model.passwordFocusNode,
|
||||
onChanged: (_) => EasyDebounce.debounce(
|
||||
key: const ValueKey<String>(
|
||||
'passwordTextFormField'),
|
||||
controller: _model
|
||||
.passwordTextController,
|
||||
cursorColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
focusNode:
|
||||
_model.passwordFocusNode,
|
||||
onChanged: (_) =>
|
||||
EasyDebounce.debounce(
|
||||
'_model.passwordTextController',
|
||||
const Duration(milliseconds: 500),
|
||||
() => setState(() {})
|
||||
),
|
||||
const Duration(
|
||||
milliseconds: 500),
|
||||
() => setState(() {})),
|
||||
autofocus: true,
|
||||
autofillHints: const [AutofillHints.password],
|
||||
textInputAction: TextInputAction.send,
|
||||
obscureText: !_model.passwordVisibility,
|
||||
autofillHints: const [
|
||||
AutofillHints.password
|
||||
],
|
||||
textInputAction:
|
||||
TextInputAction.send,
|
||||
obscureText:
|
||||
!_model.passwordVisibility,
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
labelText: FFLocalizations.of(context).getText('2x19ce8k' /* Senha */),
|
||||
labelStyle: FlutterFlowTheme.of(context)
|
||||
labelText: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'2x19ce8k' /* Senha */),
|
||||
labelStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.labelLarge
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans')),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans')),
|
||||
enabledBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor1,
|
||||
width: 0.25),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color:Color(0xFF1AAB5F),
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color: Color(
|
||||
0xFF1AAB5F),
|
||||
width: 0.25),
|
||||
borderRadius: BorderRadius.circular(12.0)),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFFFF5963),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0)),
|
||||
errorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color: Color(
|
||||
0xFFFF5963),
|
||||
width: 0.25),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFFFF5963),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color: Color(
|
||||
0xFFFF5963),
|
||||
width: 0.25),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
fillColor:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryBackground,
|
||||
suffixIcon: InkWell(
|
||||
onTap: () => setState(() => _model.passwordVisibility = !_model.passwordVisibility),
|
||||
focusNode: FocusNode(skipTraversal: true),
|
||||
onTap: () => setState(() =>
|
||||
_model.passwordVisibility =
|
||||
!_model
|
||||
.passwordVisibility),
|
||||
focusNode: FocusNode(
|
||||
skipTraversal: true),
|
||||
child: Icon(
|
||||
_model.passwordVisibility ? Icons.visibility_outlined : Icons.visibility_off_outlined,
|
||||
color:FlutterFlowTheme.of(context).accent1,
|
||||
_model.passwordVisibility
|
||||
? Icons
|
||||
.visibility_outlined
|
||||
: Icons
|
||||
.visibility_off_outlined,
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.accent1,
|
||||
size: 24.0),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyLarge
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
validator: _model.passwordTextControllerValidator.asValidator(context),
|
||||
validator: _model
|
||||
.passwordTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
Builder(
|
||||
builder: (context) {
|
||||
if (MediaQuery.sizeOf(context).width < kBreakpointSmall ? true : false) {
|
||||
if (MediaQuery.sizeOf(context).width <
|
||||
kBreakpointSmall
|
||||
? true
|
||||
: false) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('SubmitButtonWidget'),
|
||||
key: const ValueKey<String>(
|
||||
'SubmitButtonWidget'),
|
||||
onPressed: _isFormInvalid()
|
||||
? null
|
||||
: () async {
|
||||
await AuthenticationService.signIn(context, _model,
|
||||
emailAdress: _model.emailAddressTextController.text,
|
||||
password: _model.passwordTextController.text,
|
||||
await AuthenticationService
|
||||
.signIn(
|
||||
context,
|
||||
_model,
|
||||
emailAdress: _model
|
||||
.emailAddressTextController
|
||||
.text,
|
||||
password: _model
|
||||
.passwordTextController
|
||||
.text,
|
||||
);
|
||||
setState(() {});
|
||||
},
|
||||
text: FFLocalizations.of(context).getText('k44tm7wo' /* Entrar */),
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'k44tm7wo' /* Entrar */),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.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: FlutterFlowTheme.of(context).primary,
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
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: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primary,
|
||||
textStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.info,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans')),
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans')),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color: Colors
|
||||
.transparent,
|
||||
width: 1.0),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
disabledColor: FlutterFlowTheme.of(context).customColor5,
|
||||
disabledTextColor: Colors.white,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
disabledColor:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor5,
|
||||
disabledTextColor:
|
||||
Colors.white,
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('toggleSignUpPage'),
|
||||
onPressed: () async => await widget.toggleSignUpPage?.call(),
|
||||
text: FFLocalizations.of(context).getText('14u7ipws' /* Cadastrar */,
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignUpPage'),
|
||||
onPressed: () async =>
|
||||
await widget
|
||||
.toggleSignUpPage
|
||||
?.call(),
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'14u7ipws' /* Cadastrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.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: FlutterFlowTheme.of(context).customColor1,
|
||||
textStyle:
|
||||
FlutterFlowTheme.of(context)
|
||||
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: FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor1,
|
||||
textStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.secondaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(color: Colors.transparent, width: 1.0),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color: Colors
|
||||
.transparent,
|
||||
width: 1.0),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
|
@ -518,59 +644,107 @@ class _SignInTemplateComponentWidgetState
|
|||
} else {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0,0.0, 16.0),
|
||||
.fromSTEB(0.0, 0.0,
|
||||
0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('SubmitButtonWidget'),
|
||||
onPressed: _isFormInvalid() ? null : () async {
|
||||
key: const ValueKey<
|
||||
String>(
|
||||
'SubmitButtonWidget'),
|
||||
onPressed:
|
||||
_isFormInvalid()
|
||||
? null
|
||||
: () async {
|
||||
try {
|
||||
await AuthenticationService.signIn(
|
||||
await AuthenticationService
|
||||
.signIn(
|
||||
context,
|
||||
_model,
|
||||
emailAdress: _model.emailAddressTextController.text,
|
||||
password: _model.passwordTextController.text,
|
||||
emailAdress: _model
|
||||
.emailAddressTextController
|
||||
.text,
|
||||
password: _model
|
||||
.passwordTextController
|
||||
.text,
|
||||
);
|
||||
setState(() {});
|
||||
setState(
|
||||
() {});
|
||||
} catch (e, s) {
|
||||
await DialogUtil.errorDefault(context);
|
||||
await DialogUtil
|
||||
.errorDefault(
|
||||
context);
|
||||
LogUtil.requestAPIFailed(
|
||||
'login.php',
|
||||
_model.emailAddressTextController.text,
|
||||
_model
|
||||
.emailAddressTextController
|
||||
.text,
|
||||
"Login",
|
||||
e, s);
|
||||
e,
|
||||
s);
|
||||
}
|
||||
},
|
||||
text: FFLocalizations.of(context).getText('1x926nsn'),
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText('1x926nsn'),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.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: FlutterFlowTheme.of(context).accent1,
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
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:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.accent1,
|
||||
textStyle:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.info,
|
||||
fontSize:
|
||||
16.0,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color: Colors
|
||||
.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
disabledColor: const Color(0xE81AAB5F),
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(12.0),
|
||||
disabledColor:
|
||||
const Color(
|
||||
0xE81AAB5F),
|
||||
),
|
||||
showLoadingIndicator: true,
|
||||
showLoadingIndicator:
|
||||
true,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -581,45 +755,82 @@ class _SignInTemplateComponentWidgetState
|
|||
.fromSTEB(0.0, 0.0,
|
||||
0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('toggleSignUpPage'),
|
||||
onPressed: () async => await widget.toggleSignUpPage?.call(),
|
||||
text: FFLocalizations.of(context).getText('jwvd4ai1' /* Cadastrar */),
|
||||
key: const ValueKey<
|
||||
String>(
|
||||
'toggleSignUpPage'),
|
||||
onPressed: () async =>
|
||||
await widget
|
||||
.toggleSignUpPage
|
||||
?.call(),
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'jwvd4ai1' /* Cadastrar */),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.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: FlutterFlowTheme.of(context).customColor1,
|
||||
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:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor1,
|
||||
textStyle:
|
||||
FlutterFlowTheme
|
||||
.of(context)
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
fontSize:
|
||||
16.0,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(color: Colors.transparent,width: 1.0,),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
borderSide:
|
||||
const BorderSide(
|
||||
color: Colors
|
||||
.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(12.0),
|
||||
),
|
||||
showLoadingIndicator:
|
||||
false,
|
||||
),
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(width: 7.0)));
|
||||
].divide(
|
||||
const SizedBox(width: 7.0)));
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 12.0, 0.0, 12.0),
|
||||
child: InkWell(
|
||||
key: const ValueKey<String>('ForgotPassword'),
|
||||
key: const ValueKey<String>(
|
||||
'ForgotPassword'),
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
|
@ -627,42 +838,79 @@ class _SignInTemplateComponentWidgetState
|
|||
onTap: () async {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
backgroundColor:
|
||||
Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const ForgotPasswordTemplateComponentWidget(),
|
||||
padding: MediaQuery
|
||||
.viewInsetsOf(
|
||||
context),
|
||||
child:
|
||||
const ForgotPasswordTemplateComponentWidget(),
|
||||
);
|
||||
}).then((value) => safeSetState(() {}));
|
||||
})
|
||||
.then((value) =>
|
||||
safeSetState(() {}));
|
||||
},
|
||||
child: RichText(
|
||||
textScaler: MediaQuery.of(context).textScaler,
|
||||
textScaler:
|
||||
MediaQuery.of(context).textScaler,
|
||||
text: TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: FFLocalizations.of(context).getText('05dx91ku' /* Você esqueceu a sua senha? */,),
|
||||
style: TextStyle(color: FlutterFlowTheme.of(context).primaryText),
|
||||
text:
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'05dx91ku' /* Você esqueceu a sua senha? */,
|
||||
),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText),
|
||||
),
|
||||
TextSpan(
|
||||
text: FFLocalizations.of(context).getText('p5c6d54y' /* Recupere aqui */),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'p5c6d54y' /* Recupere aqui */),
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
.primary,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.normal,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
fontWeight:
|
||||
FontWeight.normal,
|
||||
useGoogleFonts:
|
||||
GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
mouseCursor: SystemMouseCursors.click,
|
||||
mouseCursor:
|
||||
SystemMouseCursors.click,
|
||||
)
|
||||
],
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily)),
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily)),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -683,7 +931,6 @@ class _SignInTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
@ -17,12 +17,16 @@ import 'sign_up_template_component_model.dart';
|
|||
export 'sign_up_template_component_model.dart';
|
||||
|
||||
class SignUpTemplateComponentWidget extends StatefulWidget {
|
||||
const SignUpTemplateComponentWidget({super.key, required this.toggleSignInPage});
|
||||
const SignUpTemplateComponentWidget(
|
||||
{super.key, required this.toggleSignInPage});
|
||||
final Future Function()? toggleSignInPage;
|
||||
@override State<SignUpTemplateComponentWidget> createState() => _SignUpTemplateComponentWidgetState();
|
||||
@override
|
||||
State<SignUpTemplateComponentWidget> createState() =>
|
||||
_SignUpTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
||||
class _SignUpTemplateComponentWidgetState
|
||||
extends State<SignUpTemplateComponentWidget> with TickerProviderStateMixin {
|
||||
late SignUpTemplateComponentModel _model;
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
|
||||
|
@ -137,23 +141,10 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Container(
|
||||
width: 669.0,
|
||||
height: 112.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Expanded(
|
||||
child: Align(
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, -1.0),
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Text(
|
||||
|
@ -171,17 +162,12 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 291.0,
|
||||
|
@ -628,7 +614,9 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
context)
|
||||
.primaryBackground,
|
||||
suffixIcon: InkWell(
|
||||
key: const ValueKey<String>('passwordVisibilitySuffixIcon'),
|
||||
key: const ValueKey<
|
||||
String>(
|
||||
'passwordVisibilitySuffixIcon'),
|
||||
onTap: () => setState(
|
||||
() => _model
|
||||
.passwordRegisterFormVisibility =
|
||||
|
@ -683,24 +671,40 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('SubmitButtonWidget'),
|
||||
key: const ValueKey<String>(
|
||||
'SubmitButtonWidget'),
|
||||
onPressed: isFormInvalid()
|
||||
? null
|
||||
: () async {
|
||||
var shouldSetState = false;
|
||||
_model.register = await AuthenticationService.signUp(context,
|
||||
email: _model.emailRegisterFormTextController.text,
|
||||
name: _model.nameRegisterFormTextController.text,
|
||||
passwd: _model.passwordRegisterFormTextController.text,
|
||||
device: StorageUtil().deviceType,
|
||||
_model.register =
|
||||
await AuthenticationService
|
||||
.signUp(
|
||||
context,
|
||||
email: _model
|
||||
.emailRegisterFormTextController
|
||||
.text,
|
||||
name: _model
|
||||
.nameRegisterFormTextController
|
||||
.text,
|
||||
passwd: _model
|
||||
.passwordRegisterFormTextController
|
||||
.text,
|
||||
device: StorageUtil()
|
||||
.deviceType,
|
||||
);
|
||||
shouldSetState = true;
|
||||
if (_model.register == true) await widget.toggleSignInPage?.call();
|
||||
if (_model.register == true)
|
||||
await widget
|
||||
.toggleSignInPage
|
||||
?.call();
|
||||
else {
|
||||
if (shouldSetState) setState(() {});
|
||||
if (shouldSetState)
|
||||
setState(() {});
|
||||
return;
|
||||
}
|
||||
if (shouldSetState) setState(() {});
|
||||
if (shouldSetState)
|
||||
setState(() {});
|
||||
},
|
||||
text: FFLocalizations.of(context)
|
||||
.getText(
|
||||
|
@ -755,12 +759,15 @@ class _SignUpTemplateComponentWidgetState extends State<SignUpTemplateComponentW
|
|||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 12.0, 0.0, 12.0),
|
||||
child: InkWell(
|
||||
key: const ValueKey<String>('toggleSignInPage'),
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignInPage'),
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async => await widget.toggleSignInPage?.call(),
|
||||
onTap: () async => await widget
|
||||
.toggleSignInPage
|
||||
?.call(),
|
||||
child: RichText(
|
||||
textScaler: MediaQuery.of(context)
|
||||
.textScaler,
|
||||
|
|
|
@ -26,7 +26,9 @@ class WelcomeTemplateComponentWidget extends StatefulWidget {
|
|||
_WelcomeTemplateComponentWidgetState();
|
||||
}
|
||||
|
||||
class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponentWidget> with TickerProviderStateMixin {
|
||||
class _WelcomeTemplateComponentWidgetState
|
||||
extends State<WelcomeTemplateComponentWidget>
|
||||
with TickerProviderStateMixin {
|
||||
late WelcomeTemplateComponentModel _model;
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
|
||||
|
@ -41,8 +43,7 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
super.initState();
|
||||
_model = createModel(context, () => WelcomeTemplateComponentModel());
|
||||
|
||||
animationsMap.addAll(
|
||||
<String, AnimationInfo>{
|
||||
animationsMap.addAll(<String, AnimationInfo>{
|
||||
'containerOnPageLoadAnimation': AnimationInfo(
|
||||
trigger: AnimationTrigger.onPageLoad,
|
||||
effectsBuilder: () => [
|
||||
|
@ -95,66 +96,56 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: SafeArea(
|
||||
child: Container(
|
||||
width: 648.0,
|
||||
height: 208.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(14.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text( FFLocalizations.of(context).getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
||||
Text(
|
||||
FFLocalizations.of(context)
|
||||
.getText('dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Text(FFLocalizations.of(context).getText('5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
style: FlutterFlowTheme.of(context).displaySmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 15.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 25, 0, 0),
|
||||
child: Container(
|
||||
width: 284.0,
|
||||
height: 200.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
child: const AtomImageSvgTheme(filename: 'welcome', width: 600, height: double.infinity),
|
||||
child: const AtomImageSvgTheme(
|
||||
filename: 'welcome', width: 600, height: double.infinity),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
|
@ -171,7 +162,7 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
BoxShadow(
|
||||
blurRadius: 0.0,
|
||||
color: Colors.transparent,
|
||||
offset: Offset(0.0,0.0),
|
||||
offset: Offset(0.0, 0.0),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
|
@ -187,23 +178,33 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
children: [
|
||||
Builder(
|
||||
builder: (context) {
|
||||
if (MediaQuery.sizeOf(context).width < kBreakpointSmall ? true : false) {
|
||||
if (MediaQuery.sizeOf(context).width <
|
||||
kBreakpointSmall
|
||||
? true
|
||||
: false) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('toggleSignInPage'),
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignInPage'),
|
||||
onPressed: () async {
|
||||
await widget.toggleSignInPage?.call();
|
||||
},
|
||||
text: FFLocalizations.of(context).getText( 'dynet730' /* Entrar */),
|
||||
text: FFLocalizations.of(context)
|
||||
.getText('dynet730' /* Entrar */),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.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),
|
||||
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: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
|
@ -297,10 +298,9 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('toggleSignInPage'),
|
||||
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignInPage'),
|
||||
onPressed: () async {
|
||||
|
||||
await widget.toggleSignInPage
|
||||
?.call();
|
||||
},
|
||||
|
@ -353,7 +353,8 @@ class _WelcomeTemplateComponentWidgetState extends State<WelcomeTemplateComponen
|
|||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
key: const ValueKey<String>('toggleSignUpPage'),
|
||||
key: const ValueKey<String>(
|
||||
'toggleSignUpPage'),
|
||||
onPressed: () async {
|
||||
await widget.toggleSignUpPage
|
||||
?.call();
|
||||
|
|
|
@ -180,6 +180,7 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
|||
const Breakpoint(start: 1921, end: 2560, name: HD4K),
|
||||
const Breakpoint(start: 2561, end: double.infinity, name: ULTRAWIDE),
|
||||
];
|
||||
|
||||
return ResponsiveBreakpoints.builder(
|
||||
child: BouncingScrollWrapper.builder(context, widget!),
|
||||
breakpoints: breakpoints,
|
||||
|
@ -264,7 +265,8 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
|||
});
|
||||
}
|
||||
|
||||
@override void initState() {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
|
||||
|
@ -280,18 +282,21 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
|||
WidgetsBinding.instance.addPersistentFrameCallback((_) => initDeepLinks());
|
||||
}
|
||||
|
||||
@override void dispose() {
|
||||
@override
|
||||
void dispose() {
|
||||
WidgetsBinding.instance.removeObserver(this);
|
||||
_linkSubscription?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override void didChangeAppLifecycleState(AppLifecycleState state) async {
|
||||
@override
|
||||
void didChangeAppLifecycleState(AppLifecycleState state) async {
|
||||
bool initialize = await StorageUtil().ensureInitialization();
|
||||
if(initialize) await LocalizationService.processLocals(context);
|
||||
if (initialize) await LocalizationService.processLocals(context);
|
||||
}
|
||||
|
||||
@override Widget build(BuildContext context) {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp.router(
|
||||
key: navigatorKey,
|
||||
title: 'FRE ACCESS HUB',
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class TextUtil extends StatelessWidget {
|
||||
final String text;
|
||||
final TextStyle? style;
|
||||
final TextAlign? textAlign;
|
||||
|
||||
const TextUtil({
|
||||
Key? key,
|
||||
required this.text,
|
||||
this.style,
|
||||
this.textAlign,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var textScale = MediaQuery.textScalerOf(context);
|
||||
var scaledTextSize = textScale.scale(style?.fontSize ?? 14);
|
||||
double limitedTextSize = scaledTextSize > (style?.fontSize ?? 14) * 2
|
||||
? (style?.fontSize ?? 14) * 2
|
||||
: scaledTextSize;
|
||||
|
||||
return Text(
|
||||
text,
|
||||
style: style?.copyWith(
|
||||
fontSize: limitedTextSize,
|
||||
),
|
||||
textAlign: textAlign ?? TextAlign.start,
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue