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