1012 lines
63 KiB
Dart
1012 lines
63 KiB
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:easy_debounce/easy_debounce.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/scheduler.dart';
|
|
import 'package:flutter_animate/flutter_animate.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
import 'register_page_model.dart';
|
|
export 'register_page_model.dart';
|
|
|
|
class RegisterPageWidget extends StatefulWidget {
|
|
const RegisterPageWidget({super.key});
|
|
|
|
@override
|
|
State<RegisterPageWidget> createState() => _RegisterPageWidgetState();
|
|
}
|
|
|
|
class _RegisterPageWidgetState extends State<RegisterPageWidget>
|
|
with TickerProviderStateMixin {
|
|
late RegisterPageModel _model;
|
|
|
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
|
|
|
final animationsMap = <String, AnimationInfo>{};
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_model = createModel(context, () => RegisterPageModel());
|
|
|
|
// On page load action.
|
|
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
|
await Future.wait([
|
|
Future(() async {}),
|
|
Future(() async {
|
|
if (isAndroid == true) {
|
|
_model.device = 'android';
|
|
setState(() {});
|
|
} else if (isiOS == true) {
|
|
_model.device = 'ios';
|
|
setState(() {});
|
|
} else {
|
|
_model.device = 'web';
|
|
setState(() {});
|
|
}
|
|
}),
|
|
]);
|
|
});
|
|
|
|
_model.nameRegisterFormTextController ??= TextEditingController();
|
|
_model.nameRegisterFormFocusNode ??= FocusNode();
|
|
_model.nameRegisterFormFocusNode!.addListener(() => setState(() {}));
|
|
_model.emailRegisterFormTextController ??= TextEditingController();
|
|
_model.emailRegisterFormFocusNode ??= FocusNode();
|
|
_model.emailRegisterFormFocusNode!.addListener(() => setState(() {}));
|
|
_model.passwordRegisterFormTextController ??= TextEditingController();
|
|
_model.passwordRegisterFormFocusNode ??= FocusNode();
|
|
_model.passwordRegisterFormFocusNode!.addListener(() => setState(() {}));
|
|
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) {
|
|
return GestureDetector(
|
|
onTap: () => _model.unfocusNode.canRequestFocus
|
|
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
|
: FocusScope.of(context).unfocus(),
|
|
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: BoxDecoration(
|
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
|
),
|
|
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 EdgeInsets.all(4.0),
|
|
child: Container(
|
|
width: 669.0,
|
|
height: 112.0,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(16.0),
|
|
),
|
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(20.0),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
Expanded(
|
|
child: Align(
|
|
alignment:
|
|
const AlignmentDirectional(0.0, -1.0),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(4.0),
|
|
child: Text(
|
|
FFLocalizations.of(context).getText(
|
|
'oxy0n1p4' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
|
),
|
|
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: SvgPicture.network(
|
|
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/ug2zlyhca2sh/Frame_5.svg',
|
|
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 EdgeInsets.all(34.0),
|
|
child: Container(
|
|
width: double.infinity,
|
|
constraints: const BoxConstraints(
|
|
maxWidth: 570.0,
|
|
),
|
|
decoration: BoxDecoration(
|
|
color: FlutterFlowTheme.of(context)
|
|
.primaryBackground,
|
|
borderRadius: BorderRadius.circular(12.0),
|
|
),
|
|
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
|
|
.nameRegisterFormTextController,
|
|
focusNode: _model
|
|
.nameRegisterFormFocusNode,
|
|
onChanged: (_) =>
|
|
EasyDebounce.debounce(
|
|
'_model.nameRegisterFormTextController',
|
|
const Duration(
|
|
milliseconds: 2000),
|
|
() => setState(() {}),
|
|
),
|
|
autofocus: false,
|
|
autofillHints: const [
|
|
AutofillHints.name
|
|
],
|
|
obscureText: false,
|
|
decoration: InputDecoration(
|
|
labelText:
|
|
FFLocalizations.of(
|
|
context)
|
|
.getText(
|
|
'w0y3fz89' /* Nome */,
|
|
),
|
|
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),
|
|
),
|
|
filled: true,
|
|
fillColor:
|
|
FlutterFlowTheme.of(
|
|
context)
|
|
.primaryBackground,
|
|
suffixIcon: Icon(
|
|
Icons.person,
|
|
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.name,
|
|
validator: _model
|
|
.nameRegisterFormTextControllerValidator
|
|
.asValidator(context),
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
0.0, 0.0, 0.0, 16.0),
|
|
child: SizedBox(
|
|
width: double.infinity,
|
|
child: TextFormField(
|
|
controller: _model
|
|
.emailRegisterFormTextController,
|
|
focusNode: _model
|
|
.emailRegisterFormFocusNode,
|
|
onChanged: (_) =>
|
|
EasyDebounce.debounce(
|
|
'_model.emailRegisterFormTextController',
|
|
const Duration(
|
|
milliseconds: 2000),
|
|
() => setState(() {}),
|
|
),
|
|
autofocus: false,
|
|
autofillHints: const [
|
|
AutofillHints.email
|
|
],
|
|
obscureText: false,
|
|
decoration: InputDecoration(
|
|
labelText:
|
|
FFLocalizations.of(
|
|
context)
|
|
.getText(
|
|
'4bfdpd0o' /* 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)
|
|
.primaryText,
|
|
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),
|
|
),
|
|
filled: true,
|
|
fillColor:
|
|
FlutterFlowTheme.of(
|
|
context)
|
|
.primaryBackground,
|
|
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)
|
|
.customColor1,
|
|
fontSize: 16.0,
|
|
letterSpacing: 0.0,
|
|
fontWeight:
|
|
FontWeight.w500,
|
|
useGoogleFonts: GoogleFonts
|
|
.asMap()
|
|
.containsKey(
|
|
'Plus Jakarta Sans'),
|
|
),
|
|
keyboardType: TextInputType
|
|
.emailAddress,
|
|
validator: _model
|
|
.emailRegisterFormTextControllerValidator
|
|
.asValidator(context),
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
0.0, 0.0, 0.0, 16.0),
|
|
child: SizedBox(
|
|
width: double.infinity,
|
|
child: TextFormField(
|
|
controller: _model
|
|
.passwordRegisterFormTextController,
|
|
focusNode: _model
|
|
.passwordRegisterFormFocusNode,
|
|
onChanged: (_) =>
|
|
EasyDebounce.debounce(
|
|
'_model.passwordRegisterFormTextController',
|
|
const Duration(
|
|
milliseconds: 2000),
|
|
() => setState(() {}),
|
|
),
|
|
autofocus: false,
|
|
autofillHints: const [
|
|
AutofillHints.password
|
|
],
|
|
obscureText: !_model
|
|
.passwordRegisterFormVisibility,
|
|
decoration: InputDecoration(
|
|
labelText:
|
|
FFLocalizations.of(
|
|
context)
|
|
.getText(
|
|
'byjglkpk' /* 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
|
|
.passwordRegisterFormVisibility =
|
|
!_model
|
|
.passwordRegisterFormVisibility,
|
|
),
|
|
focusNode: FocusNode(
|
|
skipTraversal: true),
|
|
child: Icon(
|
|
_model.passwordRegisterFormVisibility
|
|
? 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
|
|
.passwordRegisterFormTextControllerValidator
|
|
.asValidator(context),
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsetsDirectional
|
|
.fromSTEB(
|
|
0.0, 0.0, 0.0, 16.0),
|
|
child: FFButtonWidget(
|
|
onPressed: () async {
|
|
await Future.wait([
|
|
Future(() async {
|
|
setState(() {
|
|
_model.emailRegisterFormTextController
|
|
?.text =
|
|
_model
|
|
.emailRegisterFormTextController
|
|
.text;
|
|
});
|
|
}),
|
|
Future(() async {
|
|
setState(() {
|
|
_model.passwordRegisterFormTextController
|
|
?.text =
|
|
_model
|
|
.passwordRegisterFormTextController
|
|
.text;
|
|
});
|
|
}),
|
|
Future(() async {
|
|
setState(() {
|
|
_model.nameRegisterFormTextController
|
|
?.text =
|
|
_model
|
|
.nameRegisterFormTextController
|
|
.text;
|
|
});
|
|
}),
|
|
]);
|
|
if ((_model.emailRegisterFormTextController.text != '') &&
|
|
(_model.passwordRegisterFormTextController
|
|
.text !=
|
|
'') &&
|
|
(_model.nameRegisterFormTextController
|
|
.text !=
|
|
'')) {
|
|
_model.registerCall =
|
|
await PhpGroup
|
|
.registerCall
|
|
.call(
|
|
name: _model
|
|
.nameRegisterFormTextController
|
|
.text,
|
|
password: _model
|
|
.passwordRegisterFormTextController
|
|
.text,
|
|
email: _model
|
|
.emailRegisterFormTextController
|
|
.text,
|
|
token: random_data
|
|
.randomString(
|
|
36,
|
|
36,
|
|
false,
|
|
false,
|
|
true,
|
|
),
|
|
uuid: random_data
|
|
.randomString(
|
|
36,
|
|
36,
|
|
false,
|
|
false,
|
|
true,
|
|
),
|
|
tipo: _model.device,
|
|
descricao: random_data
|
|
.randomString(
|
|
36,
|
|
36,
|
|
true,
|
|
false,
|
|
false,
|
|
),
|
|
);
|
|
if (PhpGroup.registerCall
|
|
.error(
|
|
(_model.registerCall
|
|
?.jsonBody ??
|
|
''),
|
|
) ==
|
|
false) {
|
|
context.goNamed(
|
|
'LoginPage',
|
|
queryParameters: {
|
|
'device':
|
|
serializeParam(
|
|
'',
|
|
ParamType.String,
|
|
),
|
|
}.withoutNulls,
|
|
extra: <String,
|
|
dynamic>{
|
|
kTransitionInfoKey:
|
|
const TransitionInfo(
|
|
hasTransition: true,
|
|
transitionType:
|
|
PageTransitionType
|
|
.fade,
|
|
),
|
|
},
|
|
);
|
|
} else {
|
|
await showDialog(
|
|
context: context,
|
|
builder:
|
|
(alertDialogContext) {
|
|
return AlertDialog(
|
|
title:
|
|
const Text('ERROR2'),
|
|
content:
|
|
const Text('ERROR2'),
|
|
actions: [
|
|
TextButton(
|
|
onPressed: () =>
|
|
Navigator.pop(
|
|
alertDialogContext),
|
|
child: const Text(
|
|
'ERROR2 '),
|
|
),
|
|
],
|
|
);
|
|
},
|
|
);
|
|
setState(() {
|
|
_model
|
|
.passwordRegisterFormTextController
|
|
?.clear();
|
|
_model
|
|
.emailRegisterFormTextController
|
|
?.clear();
|
|
_model
|
|
.nameRegisterFormTextController
|
|
?.clear();
|
|
});
|
|
}
|
|
} else {
|
|
await showDialog(
|
|
context: context,
|
|
builder:
|
|
(alertDialogContext) {
|
|
return AlertDialog(
|
|
title: const Text('ERROR1'),
|
|
content:
|
|
const Text('ERROR1'),
|
|
actions: [
|
|
TextButton(
|
|
onPressed: () =>
|
|
Navigator.pop(
|
|
alertDialogContext),
|
|
child: const Text(
|
|
'ERROR1 '),
|
|
),
|
|
],
|
|
);
|
|
},
|
|
);
|
|
}
|
|
|
|
setState(() {});
|
|
},
|
|
text:
|
|
FFLocalizations.of(context)
|
|
.getText(
|
|
'w9vrsnmf' /* Cadastrar-se */,
|
|
),
|
|
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,
|
|
),
|
|
),
|
|
|
|
// 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(
|
|
'LoginPage',
|
|
queryParameters: {
|
|
'device': serializeParam(
|
|
'',
|
|
ParamType.String,
|
|
),
|
|
}.withoutNulls,
|
|
);
|
|
},
|
|
child: RichText(
|
|
textScaler:
|
|
MediaQuery.of(context)
|
|
.textScaler,
|
|
text: TextSpan(
|
|
children: [
|
|
TextSpan(
|
|
text:
|
|
FFLocalizations.of(
|
|
context)
|
|
.getText(
|
|
'zep60lcd' /* Você já tem uma conta? */,
|
|
),
|
|
style: TextStyle(
|
|
color: FlutterFlowTheme
|
|
.of(context)
|
|
.primaryText,
|
|
),
|
|
),
|
|
TextSpan(
|
|
text:
|
|
FFLocalizations.of(
|
|
context)
|
|
.getText(
|
|
'tl8k1ld9' /* Clique aqui */,
|
|
),
|
|
style:
|
|
FlutterFlowTheme.of(
|
|
context)
|
|
.bodyMedium
|
|
.override(
|
|
fontFamily:
|
|
'Plus Jakarta Sans',
|
|
color: FlutterFlowTheme.of(
|
|
context)
|
|
.primary,
|
|
fontSize:
|
|
14.0,
|
|
letterSpacing:
|
|
0.0,
|
|
fontWeight:
|
|
FontWeight
|
|
.w600,
|
|
useGoogleFonts: GoogleFonts
|
|
.asMap()
|
|
.containsKey(
|
|
'Plus Jakarta Sans'),
|
|
),
|
|
)
|
|
],
|
|
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(
|
|
'dbtzii7i' /* Termo de Uso */,
|
|
),
|
|
style: FlutterFlowTheme.of(context)
|
|
.bodyMedium
|
|
.override(
|
|
fontFamily: FlutterFlowTheme.of(context)
|
|
.bodyMediumFamily,
|
|
color: FlutterFlowTheme.of(context)
|
|
.secondaryText,
|
|
fontSize: 14.0,
|
|
letterSpacing: 0.0,
|
|
useGoogleFonts: GoogleFonts.asMap()
|
|
.containsKey(FlutterFlowTheme.of(context)
|
|
.bodyMediumFamily),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|