488 lines
26 KiB
Dart
488 lines
26 KiB
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 '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 'package:provider/provider.dart';
|
|
import 'welcome_page_model.dart';
|
|
export 'welcome_page_model.dart';
|
|
|
|
class WelcomePageWidget extends StatefulWidget {
|
|
const WelcomePageWidget({super.key});
|
|
|
|
@override
|
|
State<WelcomePageWidget> createState() => _WelcomePageWidgetState();
|
|
}
|
|
|
|
class _WelcomePageWidgetState extends State<WelcomePageWidget>
|
|
with TickerProviderStateMixin {
|
|
late WelcomePageModel _model;
|
|
|
|
final scaffoldKey = GlobalKey<ScaffoldState>();
|
|
|
|
final animationsMap = <String, AnimationInfo>{};
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_model = createModel(context, () => WelcomePageModel());
|
|
|
|
// On page load action.
|
|
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
|
if (isAndroid == true) {
|
|
FFAppState().device = 'Android';
|
|
setState(() {});
|
|
} else if (isiOS == true) {
|
|
FFAppState().device = 'iOS';
|
|
setState(() {});
|
|
} else {
|
|
FFAppState().device = 'Web';
|
|
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) {
|
|
context.watch<FFAppState>();
|
|
|
|
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: 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(
|
|
'77d2ypub' /* 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(
|
|
'avhdhlhw' /* 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.network(
|
|
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/lv1waa0etd3j/undraw_appreciate_it_re_yc8h_(1)_1.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: () {
|
|
print('Button pressed ...');
|
|
},
|
|
text: FFLocalizations.of(context)
|
|
.getText(
|
|
'iw9yx5fr' /* 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: () {
|
|
print('Button pressed ...');
|
|
},
|
|
text: FFLocalizations.of(context)
|
|
.getText(
|
|
'bs5mbse6' /* 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: () {
|
|
print('Button pressed ...');
|
|
},
|
|
text:
|
|
FFLocalizations.of(context)
|
|
.getText(
|
|
'cq85bqnj' /* 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: () {
|
|
print('Button pressed ...');
|
|
},
|
|
text:
|
|
FFLocalizations.of(context)
|
|
.getText(
|
|
'iupuq6xs' /* 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']!),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|