fix: Login Logic and misc
This commit is contained in:
parent
dc9bc215b9
commit
6ed94fb1b5
|
@ -311,6 +311,6 @@ SPEC CHECKSUMS:
|
|||
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
|
||||
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
|
||||
|
||||
PODFILE CHECKSUM: f2b7abe080b8e8f49e642b85431f5117d22149fe
|
||||
PODFILE CHECKSUM: d7f4d1b71f8c708247c1078c4aec33a28c763405
|
||||
|
||||
COCOAPODS: 1.15.2
|
||||
|
|
|
@ -49,7 +49,11 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
|
@ -177,9 +181,6 @@ class _ForgotPasswordTemplateComponentWidgetState
|
|||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'w7y5wlnv' /* digite o seu email..... */,
|
||||
),
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
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 '/flutter_flow/flutter_flow_animations.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
|
@ -93,6 +95,18 @@ class _SignInTemplateComponentWidgetState
|
|||
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
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
|
@ -205,7 +219,7 @@ class _SignInTemplateComponentWidgetState
|
|||
Form(
|
||||
key: _model.formKey,
|
||||
autovalidateMode:
|
||||
AutovalidateMode.always,
|
||||
AutovalidateMode.onUserInteraction,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
|
@ -518,12 +532,7 @@ class _SignInTemplateComponentWidgetState
|
|||
.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: ((_model.emailAddressTextController
|
||||
.text ==
|
||||
'') &&
|
||||
(_model.passwordTextController
|
||||
.text ==
|
||||
''))
|
||||
onPressed: _isFormInvalid()
|
||||
? null
|
||||
: () async {
|
||||
await action_blocks
|
||||
|
@ -874,6 +883,7 @@ class _SignInTemplateComponentWidgetState
|
|||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor:
|
||||
|
@ -885,12 +895,10 @@ class _SignInTemplateComponentWidgetState
|
|||
padding:
|
||||
MediaQuery.viewInsetsOf(
|
||||
context),
|
||||
child:
|
||||
const ForgotPasswordTemplateComponentWidget(),
|
||||
child: const ForgotPasswordTemplateComponentWidget(),
|
||||
);
|
||||
},
|
||||
).then(
|
||||
(value) => safeSetState(() {}));
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
child: RichText(
|
||||
textScaler: MediaQuery.of(context)
|
||||
|
@ -981,29 +989,7 @@ class _SignInTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
),
|
||||
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),
|
||||
),
|
||||
),
|
||||
const AtomTermsOfUse(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -873,28 +873,28 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
'en': 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT',
|
||||
},
|
||||
'1ltg0ylb': {
|
||||
'pt': 'Email',
|
||||
'en': 'Email',
|
||||
'pt': 'E-mail',
|
||||
'en': 'E-mail',
|
||||
},
|
||||
'2x19ce8k': {
|
||||
'pt': 'Senha',
|
||||
'en': 'Password',
|
||||
},
|
||||
'xhnawzcb': {
|
||||
'pt': 'Campo é necessário',
|
||||
'en': 'Field is required',
|
||||
'pt': 'E-mail é Obrigatório',
|
||||
'en': 'E-mail is required',
|
||||
},
|
||||
's3j1hjqx': {
|
||||
'pt': 'E-mail Inv',
|
||||
'en': '',
|
||||
'pt': 'E-mail Inválido',
|
||||
'en': 'Invalid E-mail',
|
||||
},
|
||||
'2ib9bf67': {
|
||||
'pt': 'Please choose an option from the dropdown',
|
||||
'en': '',
|
||||
},
|
||||
'9cs5wlmc': {
|
||||
'pt': 'Campo é necessário',
|
||||
'en': 'Field is required',
|
||||
'pt': 'Senha é Obrigatório',
|
||||
'en': 'Password is required',
|
||||
},
|
||||
'rkxwb0sg': {
|
||||
'pt': 'Please choose an option from the dropdown',
|
||||
|
@ -922,7 +922,7 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
},
|
||||
'p5c6d54y': {
|
||||
'pt': ' Recupere aqui',
|
||||
'en': ' recover here',
|
||||
'en': ' Recover here',
|
||||
},
|
||||
'olf967cj': {
|
||||
'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.',
|
||||
},
|
||||
'mtz8l7ft': {
|
||||
'pt': 'Email',
|
||||
'en': 'Email',
|
||||
'pt': 'E-mail',
|
||||
'en': 'E-mail',
|
||||
},
|
||||
'w7y5wlnv': {
|
||||
'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