457 lines
22 KiB
Dart
457 lines
22 KiB
Dart
import '/commons/widgets/flutter_flow_animations.dart';
|
|
import '/commons/widgets/flutter_flow_theme.dart';
|
|
import '/commons/widgets/flutter_flow_util.dart';
|
|
import '/commons/widgets/flutter_flow_widgets.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_animate/flutter_animate.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
export 'component.dart';
|
|
|
|
|
|
class WelcomeTemplateComponentModel
|
|
extends FlutterFlowModel<WelcomeTemplateComponentWidget> {
|
|
@override
|
|
void initState(BuildContext context) {}
|
|
|
|
@override
|
|
void dispose() {}
|
|
}
|
|
|
|
|
|
|
|
class WelcomeTemplateComponentWidget extends StatefulWidget {
|
|
const WelcomeTemplateComponentWidget({
|
|
super.key,
|
|
required this.toggleSignUpPage,
|
|
required this.toggleSignInPage,
|
|
});
|
|
|
|
final Future Function()? toggleSignUpPage;
|
|
final Future Function()? toggleSignInPage;
|
|
|
|
@override
|
|
State<WelcomeTemplateComponentWidget> createState() =>
|
|
_WelcomeTemplateComponentWidgetState();
|
|
}
|
|
|
|
class _WelcomeTemplateComponentWidgetState
|
|
extends State<WelcomeTemplateComponentWidget>
|
|
with TickerProviderStateMixin {
|
|
late WelcomeTemplateComponentModel _model;
|
|
|
|
final animationsMap = <String, AnimationInfo>{};
|
|
|
|
@override
|
|
void setState(VoidCallback callback) {
|
|
super.setState(callback);
|
|
_model.onUpdate();
|
|
}
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_model = createModel(context, () => WelcomeTemplateComponentModel());
|
|
|
|
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.maybeDispose();
|
|
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Align(
|
|
alignment: const AlignmentDirectional(0.0, 0.0),
|
|
child: SingleChildScrollView(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
children: [
|
|
Align(
|
|
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),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Text(
|
|
FFLocalizations.of(context).getText(
|
|
'dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */,
|
|
),
|
|
textAlign: TextAlign.start,
|
|
style: FlutterFlowTheme.of(context)
|
|
.displaySmall
|
|
.override(
|
|
fontFamily: 'Plus Jakarta Sans',
|
|
color: FlutterFlowTheme.of(context).accent1,
|
|
fontSize: 24.0,
|
|
letterSpacing: 0.0,
|
|
fontWeight: FontWeight.w600,
|
|
useGoogleFonts: GoogleFonts.asMap()
|
|
.containsKey('Plus Jakarta Sans'),
|
|
),
|
|
),
|
|
Align(
|
|
alignment: const AlignmentDirectional(0.0, -1.0),
|
|
child: Text(
|
|
FFLocalizations.of(context).getText(
|
|
'5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */,
|
|
),
|
|
textAlign: TextAlign.start,
|
|
style: FlutterFlowTheme.of(context)
|
|
.displaySmall
|
|
.override(
|
|
fontFamily: 'Plus Jakarta Sans',
|
|
color: FlutterFlowTheme.of(context)
|
|
.primaryText,
|
|
fontSize: 15.0,
|
|
letterSpacing: 0.0,
|
|
fontWeight: FontWeight.w600,
|
|
useGoogleFonts: GoogleFonts.asMap()
|
|
.containsKey('Plus Jakarta Sans'),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
width: 284.0,
|
|
height: 200.0,
|
|
decoration: const BoxDecoration(),
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(0.0),
|
|
child: SvgPicture.asset(
|
|
'assets/images/welcome.svg',
|
|
width: 603.0,
|
|
height: double.infinity,
|
|
fit: BoxFit.contain,
|
|
),
|
|
),
|
|
),
|
|
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(
|
|
boxShadow: const [
|
|
BoxShadow(
|
|
blurRadius: 0.0,
|
|
color: Colors.transparent,
|
|
offset: Offset(
|
|
0.0,
|
|
0.0,
|
|
),
|
|
)
|
|
],
|
|
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,
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
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 {
|
|
await widget.toggleSignInPage?.call();
|
|
},
|
|
text:
|
|
FFLocalizations.of(context).getText(
|
|
'dynet730' /* 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 {
|
|
await widget.toggleSignUpPage?.call();
|
|
},
|
|
text:
|
|
FFLocalizations.of(context).getText(
|
|
'hha60cg7' /* 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)
|
|
.primaryBackground,
|
|
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: () async {
|
|
await widget.toggleSignInPage
|
|
?.call();
|
|
},
|
|
text: FFLocalizations.of(context)
|
|
.getText(
|
|
'zvtay8ee' /* 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,
|
|
),
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Padding(
|
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
|
0.0, 0.0, 0.0, 16.0),
|
|
child: FFButtonWidget(
|
|
onPressed: () async {
|
|
await widget.toggleSignUpPage
|
|
?.call();
|
|
},
|
|
text: FFLocalizations.of(context)
|
|
.getText(
|
|
'o6zob50a' /* 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)
|
|
.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,
|
|
),
|
|
),
|
|
),
|
|
].divide(const SizedBox(width: 7.0)),
|
|
);
|
|
}
|
|
},
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
).animateOnPageLoad(
|
|
animationsMap['containerOnPageLoadAnimation']!),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|