1140 lines
77 KiB
Dart
1140 lines
77 KiB
Dart
import '/application_components/molecular_components/throw_exception/throw_exception_widget.dart';
|
|
import '/backend/api_requests/api_calls.dart';
|
|
import '/flutter_flow/flutter_flow_animations.dart';
|
|
import '/flutter_flow/flutter_flow_theme.dart';
|
|
import '/flutter_flow/flutter_flow_util.dart';
|
|
import '/flutter_flow/flutter_flow_widgets.dart';
|
|
import '/flutter_flow/random_data_util.dart' as random_data;
|
|
import 'package:flutter/gestures.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_animate/flutter_animate.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'login_page_model.dart';
|
|
export 'login_page_model.dart';
|
|
|
|
class LoginPageWidget extends StatefulWidget {
|
|
const LoginPageWidget({
|
|
super.key,
|
|
required this.device,
|
|
});
|
|
|
|
final String? device;
|
|
|
|
@override
|
|
State<LoginPageWidget> createState() => _LoginPageWidgetState();
|
|
}
|
|
|
|
class _LoginPageWidgetState extends State<LoginPageWidget>
|
|
with TickerProviderStateMixin {
|
|
late LoginPageModel _model;
|
|
|
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
|
|
|
final animationsMap = <String, AnimationInfo>{};
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_model = createModel(context, () => LoginPageModel());
|
|
|
|
_model.emailAddressTextController ??= TextEditingController();
|
|
_model.emailAddressFocusNode ??= FocusNode();
|
|
|
|
_model.passwordTextController ??= TextEditingController();
|
|
_model.passwordFocusNode ??= FocusNode();
|
|
|
|
animationsMap.addAll({
|
|
'containerOnPageLoadAnimation': AnimationInfo(
|
|
trigger: AnimationTrigger.onPageLoad,
|
|
effectsBuilder: () => [
|
|
VisibilityEffect(duration: 1.ms),
|
|
FadeEffect(
|
|
curve: Curves.easeInOut,
|
|
delay: 0.0.ms,
|
|
duration: 300.0.ms,
|
|
begin: 0.0,
|
|
end: 1.0,
|
|
),
|
|
MoveEffect(
|
|
curve: Curves.easeInOut,
|
|
delay: 0.0.ms,
|
|
duration: 300.0.ms,
|
|
begin: const Offset(0.0, 140.0),
|
|
end: const Offset(0.0, 0.0),
|
|
),
|
|
ScaleEffect(
|
|
curve: Curves.easeInOut,
|
|
delay: 0.0.ms,
|
|
duration: 300.0.ms,
|
|
begin: const Offset(0.9, 0.9),
|
|
end: const Offset(1.0, 1.0),
|
|
),
|
|
TiltEffect(
|
|
curve: Curves.easeInOut,
|
|
delay: 0.0.ms,
|
|
duration: 300.0.ms,
|
|
begin: const Offset(-0.349, 0),
|
|
end: const Offset(0, 0),
|
|
),
|
|
],
|
|
),
|
|
});
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
_model.dispose();
|
|
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
context.watch<FFAppState>();
|
|
|
|
return GestureDetector(
|
|
onTap: () => _model.unfocusNode.canRequestFocus
|
|
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
|
: FocusScope.of(context).unfocus(),
|
|
child: WillPopScope(
|
|
onWillPop: () async => false,
|
|
child: Scaffold(
|
|
key: scaffoldKey,
|
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
|
body: SafeArea(
|
|
top: true,
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
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(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
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: Align(
|
|
alignment:
|
|
const AlignmentDirectional(0.0, 1.0),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(3.0),
|
|
child: Text(
|
|
FFLocalizations.of(context)
|
|
.getText(
|
|
'uem0mca5' /* VAMOS LA! ENTRE COM A SUA CONT... */,
|
|
),
|
|
textAlign: TextAlign.start,
|
|
style:
|
|
FlutterFlowTheme.of(context)
|
|
.displaySmall
|
|
.override(
|
|
fontFamily:
|
|
'Plus Jakarta Sans',
|
|
color:
|
|
FlutterFlowTheme.of(
|
|
context)
|
|
.primaryText,
|
|
fontSize: 24.0,
|
|
letterSpacing: 0.0,
|
|
fontWeight:
|
|
FontWeight.normal,
|
|
useGoogleFonts: GoogleFonts
|
|
.asMap()
|
|
.containsKey(
|
|
'Plus Jakarta Sans'),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
width: 291.0,
|
|
height: 167.0,
|
|
decoration: const BoxDecoration(),
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(8.0),
|
|
child: Image.network(
|
|
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/sr43ucngg4a4/Vector.png',
|
|
width: 603.0,
|
|
height: 155.0,
|
|
fit: BoxFit.contain,
|
|
),
|
|
),
|
|
),
|
|
Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Align(
|
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
child: Padding(
|
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
34.0, 0.0, 34.0, 0.0),
|
|
child: Container(
|
|
width: double.infinity,
|
|
constraints: const BoxConstraints(
|
|
maxWidth: 570.0,
|
|
),
|
|
decoration: BoxDecoration(
|
|
color: FlutterFlowTheme.of(context)
|
|
.primaryBackground,
|
|
borderRadius:
|
|
BorderRadius.circular(12.0),
|
|
shape: BoxShape.rectangle,
|
|
),
|
|
child: Align(
|
|
alignment:
|
|
const AlignmentDirectional(0.0, 0.0),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(32.0),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
crossAxisAlignment:
|
|
CrossAxisAlignment.center,
|
|
children: [
|
|
Padding(
|
|
padding: const EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
0.0, 0.0, 0.0, 16.0),
|
|
child: SizedBox(
|
|
width: double.infinity,
|
|
child: TextFormField(
|
|
controller: _model
|
|
.emailAddressTextController,
|
|
focusNode: _model
|
|
.emailAddressFocusNode,
|
|
autofocus: false,
|
|
textCapitalization:
|
|
TextCapitalization.none,
|
|
textInputAction:
|
|
TextInputAction.next,
|
|
obscureText: false,
|
|
decoration: InputDecoration(
|
|
labelText:
|
|
FFLocalizations.of(
|
|
context)
|
|
.getText(
|
|
'90ls8ppo' /* Email */,
|
|
),
|
|
labelStyle:
|
|
FlutterFlowTheme.of(
|
|
context)
|
|
.labelLarge
|
|
.override(
|
|
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(
|
|
borderSide: BorderSide(
|
|
color: FlutterFlowTheme
|
|
.of(context)
|
|
.customColor1,
|
|
width: 0.5,
|
|
),
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(12.0),
|
|
),
|
|
focusedBorder:
|
|
OutlineInputBorder(
|
|
borderSide: BorderSide(
|
|
color: FlutterFlowTheme
|
|
.of(context)
|
|
.success,
|
|
width: 0.5,
|
|
),
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(12.0),
|
|
),
|
|
errorBorder:
|
|
OutlineInputBorder(
|
|
borderSide: BorderSide(
|
|
color: FlutterFlowTheme
|
|
.of(context)
|
|
.error,
|
|
width: 0.5,
|
|
),
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(12.0),
|
|
),
|
|
focusedErrorBorder:
|
|
OutlineInputBorder(
|
|
borderSide: BorderSide(
|
|
color: FlutterFlowTheme
|
|
.of(context)
|
|
.error,
|
|
width: 0.5,
|
|
),
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(12.0),
|
|
),
|
|
suffixIcon: Icon(
|
|
Icons.email,
|
|
color:
|
|
FlutterFlowTheme.of(
|
|
context)
|
|
.accent1,
|
|
size: 22.0,
|
|
),
|
|
),
|
|
style: FlutterFlowTheme.of(
|
|
context)
|
|
.bodyLarge
|
|
.override(
|
|
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'),
|
|
),
|
|
keyboardType: TextInputType
|
|
.emailAddress,
|
|
validator: _model
|
|
.emailAddressTextControllerValidator
|
|
.asValidator(context),
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
0.0, 0.0, 0.0, 16.0),
|
|
child: SizedBox(
|
|
width: double.infinity,
|
|
child: TextFormField(
|
|
controller: _model
|
|
.passwordTextController,
|
|
focusNode: _model
|
|
.passwordFocusNode,
|
|
autofocus: false,
|
|
textInputAction:
|
|
TextInputAction.send,
|
|
obscureText: !_model
|
|
.passwordVisibility,
|
|
decoration: InputDecoration(
|
|
labelText:
|
|
FFLocalizations.of(
|
|
context)
|
|
.getText(
|
|
'rvlumyaw' /* Senha */,
|
|
),
|
|
labelStyle:
|
|
FlutterFlowTheme.of(
|
|
context)
|
|
.labelLarge
|
|
.override(
|
|
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(
|
|
borderSide: BorderSide(
|
|
color: FlutterFlowTheme
|
|
.of(context)
|
|
.customColor1,
|
|
width: 0.5,
|
|
),
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(12.0),
|
|
),
|
|
focusedBorder:
|
|
OutlineInputBorder(
|
|
borderSide: const BorderSide(
|
|
color:
|
|
Color(0xFF1AAB5F),
|
|
width: 0.5,
|
|
),
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(12.0),
|
|
),
|
|
errorBorder:
|
|
OutlineInputBorder(
|
|
borderSide: const BorderSide(
|
|
color:
|
|
Color(0xFFFF5963),
|
|
width: 0.5,
|
|
),
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(12.0),
|
|
),
|
|
focusedErrorBorder:
|
|
OutlineInputBorder(
|
|
borderSide: const BorderSide(
|
|
color:
|
|
Color(0xFFFF5963),
|
|
width: 0.5,
|
|
),
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(12.0),
|
|
),
|
|
filled: true,
|
|
fillColor:
|
|
FlutterFlowTheme.of(
|
|
context)
|
|
.primaryBackground,
|
|
suffixIcon: InkWell(
|
|
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,
|
|
size: 24.0,
|
|
),
|
|
),
|
|
),
|
|
style: FlutterFlowTheme.of(
|
|
context)
|
|
.bodyLarge
|
|
.override(
|
|
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'),
|
|
),
|
|
validator: _model
|
|
.passwordTextControllerValidator
|
|
.asValidator(context),
|
|
),
|
|
),
|
|
),
|
|
Builder(
|
|
builder: (context) {
|
|
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),
|
|
child: FFButtonWidget(
|
|
onPressed:
|
|
() async {
|
|
var shouldSetState =
|
|
false;
|
|
await Future
|
|
.wait([
|
|
Future(
|
|
() async {
|
|
FFAppState()
|
|
.email =
|
|
_model
|
|
.emailAddressTextController
|
|
.text;
|
|
setState(
|
|
() {});
|
|
}),
|
|
Future(
|
|
() async {
|
|
FFAppState()
|
|
.passwd =
|
|
_model
|
|
.passwordTextController
|
|
.text;
|
|
setState(
|
|
() {});
|
|
}),
|
|
]);
|
|
if ((FFAppState()
|
|
.email !=
|
|
'') &&
|
|
(FFAppState()
|
|
.passwd !=
|
|
'')) {
|
|
FFAppState()
|
|
.devUUID =
|
|
random_data
|
|
.randomString(
|
|
36,
|
|
36,
|
|
false,
|
|
false,
|
|
true,
|
|
);
|
|
setState(() {});
|
|
_model.smallDisplayApi =
|
|
await PhpGroup
|
|
.loginCall
|
|
.call(
|
|
email:
|
|
FFAppState()
|
|
.email,
|
|
password:
|
|
FFAppState()
|
|
.passwd,
|
|
uuid: FFAppState()
|
|
.devUUID,
|
|
type: FFAppState()
|
|
.device,
|
|
description:
|
|
'',
|
|
);
|
|
shouldSetState =
|
|
true;
|
|
FFAppState()
|
|
.userUUID =
|
|
PhpGroup
|
|
.loginCall
|
|
.userUUID(
|
|
(_model.smallDisplayApi
|
|
?.jsonBody ??
|
|
''),
|
|
)!;
|
|
setState(() {});
|
|
if (PhpGroup
|
|
.loginCall
|
|
.error(
|
|
(_model.smallDisplayApi
|
|
?.jsonBody ??
|
|
''),
|
|
) ==
|
|
false) {
|
|
FFAppState()
|
|
.isLogged =
|
|
true;
|
|
setState(
|
|
() {});
|
|
|
|
context
|
|
.goNamed(
|
|
'homePage',
|
|
queryParameters:
|
|
{
|
|
'userUUID':
|
|
serializeParam(
|
|
FFAppState()
|
|
.userUUID,
|
|
ParamType
|
|
.String,
|
|
),
|
|
'devUUID':
|
|
serializeParam(
|
|
FFAppState()
|
|
.devUUID,
|
|
ParamType
|
|
.String,
|
|
),
|
|
}.withoutNulls,
|
|
extra: <String,
|
|
dynamic>{
|
|
kTransitionInfoKey:
|
|
const TransitionInfo(
|
|
hasTransition:
|
|
true,
|
|
transitionType:
|
|
PageTransitionType.fade,
|
|
),
|
|
},
|
|
);
|
|
} else {
|
|
await showModalBottomSheet(
|
|
isScrollControlled:
|
|
true,
|
|
backgroundColor:
|
|
Colors
|
|
.transparent,
|
|
enableDrag:
|
|
false,
|
|
context:
|
|
context,
|
|
builder:
|
|
(context) {
|
|
return GestureDetector(
|
|
onTap: () => _model.unfocusNode.canRequestFocus
|
|
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
|
: FocusScope.of(context).unfocus(),
|
|
child:
|
|
Padding(
|
|
padding:
|
|
MediaQuery.viewInsetsOf(context),
|
|
child:
|
|
ThrowExceptionWidget(
|
|
msg:
|
|
PhpGroup.loginCall.msg(
|
|
(_model.smallDisplayApi?.jsonBody ?? ''),
|
|
)!,
|
|
),
|
|
),
|
|
);
|
|
},
|
|
).then((value) =>
|
|
safeSetState(
|
|
() {}));
|
|
|
|
setState(() {
|
|
_model
|
|
.emailAddressTextController
|
|
?.clear();
|
|
_model
|
|
.passwordTextController
|
|
?.clear();
|
|
});
|
|
}
|
|
} else {
|
|
if (shouldSetState) {
|
|
setState(
|
|
() {});
|
|
}
|
|
return;
|
|
}
|
|
|
|
if (shouldSetState) {
|
|
setState(() {});
|
|
}
|
|
},
|
|
text: FFLocalizations
|
|
.of(context)
|
|
.getText(
|
|
'2d3903lt' /* 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,
|
|
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),
|
|
),
|
|
showLoadingIndicator:
|
|
false,
|
|
),
|
|
),
|
|
Padding(
|
|
padding:
|
|
const EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
0.0,
|
|
0.0,
|
|
0.0,
|
|
16.0),
|
|
child: FFButtonWidget(
|
|
onPressed:
|
|
() async {
|
|
context.pushNamed(
|
|
'RegisterPage');
|
|
},
|
|
text: FFLocalizations
|
|
.of(context)
|
|
.getText(
|
|
'zj6pyujp' /* 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)
|
|
.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'),
|
|
),
|
|
elevation: 3.0,
|
|
borderSide:
|
|
const BorderSide(
|
|
color: Colors
|
|
.transparent,
|
|
width: 1.0,
|
|
),
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(
|
|
12.0),
|
|
),
|
|
showLoadingIndicator:
|
|
false,
|
|
),
|
|
),
|
|
],
|
|
);
|
|
} else {
|
|
return Row(
|
|
mainAxisSize:
|
|
MainAxisSize.max,
|
|
mainAxisAlignment:
|
|
MainAxisAlignment
|
|
.spaceEvenly,
|
|
children: [
|
|
Expanded(
|
|
child: Padding(
|
|
padding:
|
|
const EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
0.0,
|
|
0.0,
|
|
0.0,
|
|
16.0),
|
|
child:
|
|
FFButtonWidget(
|
|
onPressed: () {
|
|
print(
|
|
'signInButtonLoginForm pressed ...');
|
|
},
|
|
text: FFLocalizations
|
|
.of(context)
|
|
.getText(
|
|
'iqhyif1d' /* 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)
|
|
.accent1,
|
|
textStyle: 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'),
|
|
),
|
|
elevation: 3.0,
|
|
borderSide:
|
|
const BorderSide(
|
|
color: Colors
|
|
.transparent,
|
|
width: 1.0,
|
|
),
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(
|
|
12.0),
|
|
),
|
|
showLoadingIndicator:
|
|
false,
|
|
),
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Padding(
|
|
padding:
|
|
const EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
0.0,
|
|
0.0,
|
|
0.0,
|
|
16.0),
|
|
child:
|
|
FFButtonWidget(
|
|
onPressed:
|
|
() async {
|
|
context.pushNamed(
|
|
'RegisterPage');
|
|
},
|
|
text: FFLocalizations
|
|
.of(context)
|
|
.getText(
|
|
'5x5bp2u1' /* 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)
|
|
.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'),
|
|
),
|
|
elevation: 3.0,
|
|
borderSide:
|
|
const BorderSide(
|
|
color: Colors
|
|
.transparent,
|
|
width: 1.0,
|
|
),
|
|
borderRadius:
|
|
BorderRadius
|
|
.circular(
|
|
12.0),
|
|
),
|
|
showLoadingIndicator:
|
|
false,
|
|
),
|
|
),
|
|
),
|
|
].divide(
|
|
const SizedBox(width: 7.0)),
|
|
);
|
|
}
|
|
},
|
|
),
|
|
|
|
// You will have to add an action on this rich text to go to your login page.
|
|
Padding(
|
|
padding: const EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
0.0, 12.0, 0.0, 12.0),
|
|
child: InkWell(
|
|
splashColor:
|
|
Colors.transparent,
|
|
focusColor:
|
|
Colors.transparent,
|
|
hoverColor:
|
|
Colors.transparent,
|
|
highlightColor:
|
|
Colors.transparent,
|
|
onTap: () async {
|
|
context.pushNamed(
|
|
'ForgotPasswordPage');
|
|
},
|
|
child: RichText(
|
|
textScaler:
|
|
MediaQuery.of(context)
|
|
.textScaler,
|
|
text: TextSpan(
|
|
children: [
|
|
TextSpan(
|
|
text: FFLocalizations
|
|
.of(context)
|
|
.getText(
|
|
'1fqjz9q7' /* Você esqueceu a sua senha? */,
|
|
),
|
|
style: TextStyle(
|
|
color: FlutterFlowTheme
|
|
.of(context)
|
|
.primaryText,
|
|
),
|
|
),
|
|
TextSpan(
|
|
text: FFLocalizations
|
|
.of(context)
|
|
.getText(
|
|
'7miyd406' /* 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'),
|
|
),
|
|
mouseCursor:
|
|
SystemMouseCursors
|
|
.click,
|
|
recognizer:
|
|
TapGestureRecognizer()
|
|
..onTap =
|
|
() async {
|
|
context.pushNamed(
|
|
'ForgotPasswordPage');
|
|
},
|
|
)
|
|
],
|
|
style:
|
|
FlutterFlowTheme.of(
|
|
context)
|
|
.bodyMedium
|
|
.override(
|
|
fontFamily: FlutterFlowTheme.of(
|
|
context)
|
|
.bodyMediumFamily,
|
|
letterSpacing:
|
|
0.0,
|
|
useGoogleFonts: GoogleFonts
|
|
.asMap()
|
|
.containsKey(
|
|
FlutterFlowTheme.of(context)
|
|
.bodyMediumFamily),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
).animateOnPageLoad(animationsMap[
|
|
'containerOnPageLoadAnimation']!),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
Text(
|
|
FFLocalizations.of(context).getText(
|
|
'63xv5ewj' /* 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),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|