fix: Login Logic and misc
This commit is contained in:
parent
dc9bc215b9
commit
6ed94fb1b5
|
@ -311,6 +311,6 @@ SPEC CHECKSUMS:
|
||||||
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
||||||
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
|
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
|
||||||
|
|
||||||
PODFILE CHECKSUM: f2b7abe080b8e8f49e642b85431f5117d22149fe
|
PODFILE CHECKSUM: d7f4d1b71f8c708247c1078c4aec33a28c763405
|
||||||
|
|
||||||
COCOAPODS: 1.15.2
|
COCOAPODS: 1.15.2
|
||||||
|
|
|
@ -49,7 +49,11 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Align(
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Align(
|
||||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
@ -177,9 +181,6 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
useGoogleFonts: GoogleFonts.asMap()
|
useGoogleFonts: GoogleFonts.asMap()
|
||||||
.containsKey('Plus Jakarta Sans'),
|
.containsKey('Plus Jakarta Sans'),
|
||||||
),
|
),
|
||||||
hintText: FFLocalizations.of(context).getText(
|
|
||||||
'w7y5wlnv' /* digite o seu email..... */,
|
|
||||||
),
|
|
||||||
hintStyle:
|
hintStyle:
|
||||||
FlutterFlowTheme.of(context).labelMedium.override(
|
FlutterFlowTheme.of(context).labelMedium.override(
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
|
@ -313,6 +314,7 @@ class _ForgotPasswordTemplateComponentWidgetState
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'package:hub/shared/components/atoms/atom_terms_of_use.dart';
|
||||||
|
|
||||||
import '/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart';
|
import '/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart';
|
||||||
import '/flutter_flow/flutter_flow_animations.dart';
|
import '/flutter_flow/flutter_flow_animations.dart';
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
|
@ -93,6 +95,18 @@ class _SignInTemplateComponentWidgetState
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool _isFormInvalid() {
|
||||||
|
if (_model.emailAddressTextController.text == '' || _model.passwordTextController.text == '') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(_model.emailAddressTextController.text)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Row(
|
return Row(
|
||||||
|
@ -205,7 +219,7 @@ class _SignInTemplateComponentWidgetState
|
||||||
Form(
|
Form(
|
||||||
key: _model.formKey,
|
key: _model.formKey,
|
||||||
autovalidateMode:
|
autovalidateMode:
|
||||||
AutovalidateMode.always,
|
AutovalidateMode.onUserInteraction,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
|
@ -518,12 +532,7 @@ class _SignInTemplateComponentWidgetState
|
||||||
.fromSTEB(
|
.fromSTEB(
|
||||||
0.0, 0.0, 0.0, 16.0),
|
0.0, 0.0, 0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: ((_model.emailAddressTextController
|
onPressed: _isFormInvalid()
|
||||||
.text ==
|
|
||||||
'') &&
|
|
||||||
(_model.passwordTextController
|
|
||||||
.text ==
|
|
||||||
''))
|
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
await action_blocks
|
await action_blocks
|
||||||
|
@ -874,6 +883,7 @@ class _SignInTemplateComponentWidgetState
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
|
||||||
await showModalBottomSheet(
|
await showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
|
@ -885,12 +895,10 @@ class _SignInTemplateComponentWidgetState
|
||||||
padding:
|
padding:
|
||||||
MediaQuery.viewInsetsOf(
|
MediaQuery.viewInsetsOf(
|
||||||
context),
|
context),
|
||||||
child:
|
child: const ForgotPasswordTemplateComponentWidget(),
|
||||||
const ForgotPasswordTemplateComponentWidget(),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
).then(
|
).then((value) => safeSetState(() {}));
|
||||||
(value) => safeSetState(() {}));
|
|
||||||
},
|
},
|
||||||
child: RichText(
|
child: RichText(
|
||||||
textScaler: MediaQuery.of(context)
|
textScaler: MediaQuery.of(context)
|
||||||
|
@ -981,29 +989,7 @@ class _SignInTemplateComponentWidgetState
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
const AtomTermsOfUse(),
|
||||||
FFLocalizations.of(context).getText(
|
|
||||||
'olf967cj' /* Termo de Uso */,
|
|
||||||
),
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
color:
|
|
||||||
FlutterFlowTheme.of(context)
|
|
||||||
.primaryText,
|
|
||||||
fontSize: 14.0,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts
|
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -873,28 +873,28 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
'en': 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT',
|
'en': 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT',
|
||||||
},
|
},
|
||||||
'1ltg0ylb': {
|
'1ltg0ylb': {
|
||||||
'pt': 'Email',
|
'pt': 'E-mail',
|
||||||
'en': 'Email',
|
'en': 'E-mail',
|
||||||
},
|
},
|
||||||
'2x19ce8k': {
|
'2x19ce8k': {
|
||||||
'pt': 'Senha',
|
'pt': 'Senha',
|
||||||
'en': 'Password',
|
'en': 'Password',
|
||||||
},
|
},
|
||||||
'xhnawzcb': {
|
'xhnawzcb': {
|
||||||
'pt': 'Campo é necessário',
|
'pt': 'E-mail é Obrigatório',
|
||||||
'en': 'Field is required',
|
'en': 'E-mail is required',
|
||||||
},
|
},
|
||||||
's3j1hjqx': {
|
's3j1hjqx': {
|
||||||
'pt': 'E-mail Inv',
|
'pt': 'E-mail Inválido',
|
||||||
'en': '',
|
'en': 'Invalid E-mail',
|
||||||
},
|
},
|
||||||
'2ib9bf67': {
|
'2ib9bf67': {
|
||||||
'pt': 'Please choose an option from the dropdown',
|
'pt': 'Please choose an option from the dropdown',
|
||||||
'en': '',
|
'en': '',
|
||||||
},
|
},
|
||||||
'9cs5wlmc': {
|
'9cs5wlmc': {
|
||||||
'pt': 'Campo é necessário',
|
'pt': 'Senha é Obrigatório',
|
||||||
'en': 'Field is required',
|
'en': 'Password is required',
|
||||||
},
|
},
|
||||||
'rkxwb0sg': {
|
'rkxwb0sg': {
|
||||||
'pt': 'Please choose an option from the dropdown',
|
'pt': 'Please choose an option from the dropdown',
|
||||||
|
@ -922,7 +922,7 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
},
|
},
|
||||||
'p5c6d54y': {
|
'p5c6d54y': {
|
||||||
'pt': ' Recupere aqui',
|
'pt': ' Recupere aqui',
|
||||||
'en': ' recover here',
|
'en': ' Recover here',
|
||||||
},
|
},
|
||||||
'olf967cj': {
|
'olf967cj': {
|
||||||
'pt': 'Termo de Uso',
|
'pt': 'Termo de Uso',
|
||||||
|
@ -1032,8 +1032,8 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
'Don\'t worry, we will help you, enter the email registered in the application and click send.',
|
'Don\'t worry, we will help you, enter the email registered in the application and click send.',
|
||||||
},
|
},
|
||||||
'mtz8l7ft': {
|
'mtz8l7ft': {
|
||||||
'pt': 'Email',
|
'pt': 'E-mail',
|
||||||
'en': 'Email',
|
'en': 'E-mail',
|
||||||
},
|
},
|
||||||
'w7y5wlnv': {
|
'w7y5wlnv': {
|
||||||
'pt': 'digite o seu email.....',
|
'pt': 'digite o seu email.....',
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
|
||||||
|
import '../../../flutter_flow/flutter_flow_theme.dart';
|
||||||
|
import '../../../flutter_flow/flutter_flow_util.dart';
|
||||||
|
|
||||||
|
class AtomTermsOfUse extends StatelessWidget {
|
||||||
|
|
||||||
|
const AtomTermsOfUse({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return InkWell(
|
||||||
|
child: Text(
|
||||||
|
FFLocalizations.of(context).getText(
|
||||||
|
'olf967cj' /* Termo de Uso */,
|
||||||
|
),
|
||||||
|
style: FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
color:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.primaryText,
|
||||||
|
fontSize: 14.0,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () => launchURL('https://freaccess.com.br/pp'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue