update onboarding
This commit is contained in:
parent
c56a7d3a87
commit
2adbddb4cf
|
@ -44,8 +44,8 @@
|
|||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
6436409027A31CD300820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6436409A27A31CDE00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6436409127A31CDD00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6436409C27A31CDB00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
|
@ -225,8 +225,8 @@
|
|||
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
6436409027A31CD300820AF7 /* pt */,
|
||||
6436409A27A31CDE00820AF7 /* en */,
|
||||
6436409127A31CDD00820AF7 /* pt */,
|
||||
6436409C27A31CDB00820AF7 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
|
|
|
@ -2,6 +2,7 @@ import '/backend/api_requests/api_calls.dart';
|
|||
import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/actions/actions.dart' as action_blocks;
|
||||
import '/custom_code/actions/index.dart' as actions;
|
||||
import '/flutter_flow/random_data_util.dart' as random_data;
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -79,7 +80,7 @@ Future<Color> manageStatusColorAction(
|
|||
return FlutterFlowTheme.of(context).warning;
|
||||
}
|
||||
|
||||
Future singInActionApp(
|
||||
Future singInLoginAction(
|
||||
BuildContext context, {
|
||||
String? emailAdress,
|
||||
String? password,
|
||||
|
@ -136,16 +137,8 @@ Future singInActionApp(
|
|||
(loginCall.jsonBody ?? ''),
|
||||
)!;
|
||||
FFAppState().isLogged = true;
|
||||
|
||||
context.goNamed(
|
||||
'homePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.fade,
|
||||
),
|
||||
},
|
||||
);
|
||||
await action_blocks.toggleHomePage(context);
|
||||
return;
|
||||
} else {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
|
@ -172,12 +165,14 @@ Future singInActionApp(
|
|||
|
||||
FFAppState().update(() {});
|
||||
}
|
||||
|
||||
return;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> signUpActionApp(
|
||||
Future<bool> signUpRegisterAction(
|
||||
BuildContext context, {
|
||||
required String? name,
|
||||
String? passwd,
|
||||
|
@ -272,10 +267,8 @@ Future forgotPasswdAction(
|
|||
|
||||
if (PhpGroup.forgotPasswordCall.error(
|
||||
(forgotPasswd.jsonBody ?? ''),
|
||||
) ==
|
||||
) !=
|
||||
false) {
|
||||
context.pushNamed('null');
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -293,3 +286,39 @@ Future cachingLoginActionApp(BuildContext context) async {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future toggleSignInPage(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'signInPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.fade,
|
||||
),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future toggleSignUpPage(BuildContext context) async {
|
||||
context.pushNamed(
|
||||
'signUpPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.fade,
|
||||
),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future toggleHomePage(BuildContext context) async {
|
||||
context.goNamed(
|
||||
'homePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.fade,
|
||||
),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -88,8 +88,6 @@ class _OptionSelectionModalWidgetState extends State<OptionSelectionModalWidget>
|
|||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
Navigator.pop(context);
|
||||
|
||||
context.pushNamed('fastPassPage');
|
||||
},
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
|
|
|
@ -14,11 +14,10 @@ export 'sign_in_template_component_model.dart';
|
|||
class SignInTemplateComponentWidget extends StatefulWidget {
|
||||
const SignInTemplateComponentWidget({
|
||||
super.key,
|
||||
required this.toggleOnBoardingPageAction,
|
||||
required this.toggleSignUpPage,
|
||||
});
|
||||
|
||||
final Future Function(String toggleValueSignInParam)?
|
||||
toggleOnBoardingPageAction;
|
||||
final Future Function()? toggleSignUpPage;
|
||||
|
||||
@override
|
||||
State<SignInTemplateComponentWidget> createState() =>
|
||||
|
@ -518,7 +517,7 @@ class _SignInTemplateComponentWidgetState
|
|||
? null
|
||||
: () async {
|
||||
await action_blocks
|
||||
.singInActionApp(
|
||||
.singInLoginAction(
|
||||
context,
|
||||
emailAdress: _model
|
||||
.emailAddressTextController
|
||||
|
@ -598,10 +597,8 @@ class _SignInTemplateComponentWidgetState
|
|||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
await widget
|
||||
.toggleOnBoardingPageAction
|
||||
?.call(
|
||||
'SignUp',
|
||||
);
|
||||
.toggleSignUpPage
|
||||
?.call();
|
||||
},
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
|
@ -696,7 +693,7 @@ class _SignInTemplateComponentWidgetState
|
|||
? null
|
||||
: () async {
|
||||
await action_blocks
|
||||
.singInActionApp(
|
||||
.singInLoginAction(
|
||||
context,
|
||||
emailAdress: _model
|
||||
.emailAddressTextController
|
||||
|
@ -742,7 +739,7 @@ class _SignInTemplateComponentWidgetState
|
|||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
.info,
|
||||
fontSize:
|
||||
16.0,
|
||||
letterSpacing:
|
||||
|
@ -780,8 +777,9 @@ class _SignInTemplateComponentWidgetState
|
|||
0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
context
|
||||
.pushNamed('null');
|
||||
await widget
|
||||
.toggleSignUpPage
|
||||
?.call();
|
||||
},
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
|
@ -856,14 +854,38 @@ class _SignInTemplateComponentWidgetState
|
|||
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 {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor:
|
||||
Colors.transparent,
|
||||
enableDrag: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding:
|
||||
MediaQuery.viewInsetsOf(
|
||||
context),
|
||||
child:
|
||||
const ForgotPasswordTemplateComponentWidget(),
|
||||
);
|
||||
},
|
||||
).then(
|
||||
(value) => safeSetState(() {}));
|
||||
},
|
||||
child: RichText(
|
||||
textScaler:
|
||||
MediaQuery.of(context).textScaler,
|
||||
textScaler: MediaQuery.of(context)
|
||||
.textScaler,
|
||||
text: TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
FFLocalizations.of(context)
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'05dx91ku' /* Você esqueceu a sua senha? */,
|
||||
),
|
||||
|
@ -874,26 +896,26 @@ class _SignInTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
TextSpan(
|
||||
text:
|
||||
FFLocalizations.of(context)
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'p5c6d54y' /* Recupere aqui */,
|
||||
),
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme
|
||||
.of(context)
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primary,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.normal,
|
||||
useGoogleFonts:
|
||||
GoogleFonts
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
|
@ -925,7 +947,8 @@ class _SignInTemplateComponentWidgetState
|
|||
},
|
||||
)
|
||||
],
|
||||
style: FlutterFlowTheme.of(context)
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
|
@ -943,6 +966,7 @@ class _SignInTemplateComponentWidgetState
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'olf967cj' /* Termo de Uso */,
|
||||
|
|
|
@ -63,7 +63,7 @@ class SignUpTemplateComponentModel
|
|||
return null;
|
||||
}
|
||||
|
||||
// Stores action output result for [Action Block - signUpActionApp] action in SignUpButtonRegisterForm widget.
|
||||
// Stores action output result for [Action Block - signUpRegisterAction] action in SignUpButtonRegisterForm widget.
|
||||
bool? signUp;
|
||||
|
||||
@override
|
||||
|
|
|
@ -15,11 +15,10 @@ export 'sign_up_template_component_model.dart';
|
|||
class SignUpTemplateComponentWidget extends StatefulWidget {
|
||||
const SignUpTemplateComponentWidget({
|
||||
super.key,
|
||||
required this.toggleOnBoardingPageAction,
|
||||
required this.toggleSignInPage,
|
||||
});
|
||||
|
||||
final Future Function(String toggleValueSignUpParam)?
|
||||
toggleOnBoardingPageAction;
|
||||
final Future Function()? toggleSignInPage;
|
||||
|
||||
@override
|
||||
State<SignUpTemplateComponentWidget> createState() =>
|
||||
|
@ -681,7 +680,7 @@ class _SignUpTemplateComponentWidgetState
|
|||
var shouldSetState = false;
|
||||
_model.signUp =
|
||||
await action_blocks
|
||||
.signUpActionApp(
|
||||
.signUpRegisterAction(
|
||||
context,
|
||||
name: _model
|
||||
.nameRegisterFormTextController
|
||||
|
@ -697,10 +696,8 @@ class _SignUpTemplateComponentWidgetState
|
|||
shouldSetState = true;
|
||||
if (_model.signUp == true) {
|
||||
await widget
|
||||
.toggleOnBoardingPageAction
|
||||
?.call(
|
||||
'SignIn',
|
||||
);
|
||||
.toggleSignInPage
|
||||
?.call();
|
||||
} else {
|
||||
if (shouldSetState) {
|
||||
setState(() {});
|
||||
|
@ -766,11 +763,8 @@ class _SignUpTemplateComponentWidgetState
|
|||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget
|
||||
.toggleOnBoardingPageAction
|
||||
?.call(
|
||||
'SignIn',
|
||||
);
|
||||
await widget.toggleSignInPage
|
||||
?.call();
|
||||
},
|
||||
child: RichText(
|
||||
textScaler: MediaQuery.of(context)
|
||||
|
|
|
@ -12,11 +12,12 @@ export 'welcome_template_component_model.dart';
|
|||
class WelcomeTemplateComponentWidget extends StatefulWidget {
|
||||
const WelcomeTemplateComponentWidget({
|
||||
super.key,
|
||||
required this.toggleOnboardingPageAction,
|
||||
required this.toggleSignUpPage,
|
||||
required this.toggleSignInPage,
|
||||
});
|
||||
|
||||
final Future Function(String toggleValueWelcomeParam)?
|
||||
toggleOnboardingPageAction;
|
||||
final Future Function()? toggleSignUpPage;
|
||||
final Future Function()? toggleSignInPage;
|
||||
|
||||
@override
|
||||
State<WelcomeTemplateComponentWidget> createState() =>
|
||||
|
@ -216,11 +217,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
await widget
|
||||
.toggleOnboardingPageAction
|
||||
?.call(
|
||||
'SignIn',
|
||||
);
|
||||
await widget.toggleSignInPage?.call();
|
||||
},
|
||||
text:
|
||||
FFLocalizations.of(context).getText(
|
||||
|
@ -269,11 +266,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
await widget
|
||||
.toggleOnboardingPageAction
|
||||
?.call(
|
||||
'SignUp',
|
||||
);
|
||||
await widget.toggleSignUpPage?.call();
|
||||
},
|
||||
text:
|
||||
FFLocalizations.of(context).getText(
|
||||
|
@ -297,7 +290,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
fontFamily: 'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.customColor3,
|
||||
.primaryBackground,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
|
@ -331,7 +324,8 @@ class _WelcomeTemplateComponentWidgetState
|
|||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
context.pushNamed('null');
|
||||
await widget.toggleSignInPage
|
||||
?.call();
|
||||
},
|
||||
text: FFLocalizations.of(context)
|
||||
.getText(
|
||||
|
@ -356,7 +350,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
.info,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
|
@ -383,7 +377,8 @@ class _WelcomeTemplateComponentWidgetState
|
|||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
context.pushNamed('null');
|
||||
await widget.toggleSignUpPage
|
||||
?.call();
|
||||
},
|
||||
text: FFLocalizations.of(context)
|
||||
.getText(
|
||||
|
@ -408,7 +403,7 @@ class _WelcomeTemplateComponentWidgetState
|
|||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
.info,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
|
|
|
@ -389,20 +389,6 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
'en': '',
|
||||
},
|
||||
},
|
||||
// onBoardingPage
|
||||
{
|
||||
'6exl3e75': {
|
||||
'pt': 'Home',
|
||||
'en': '',
|
||||
},
|
||||
},
|
||||
// fastPassPage
|
||||
{
|
||||
'koh6s96f': {
|
||||
'pt': 'Home',
|
||||
'en': '',
|
||||
},
|
||||
},
|
||||
// peopleOnThePropertyPage
|
||||
{
|
||||
'nsu13r5d': {
|
||||
|
@ -492,6 +478,27 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
'en': '',
|
||||
},
|
||||
},
|
||||
// signInPage
|
||||
{
|
||||
'kosqqghj': {
|
||||
'pt': 'Home',
|
||||
'en': '',
|
||||
},
|
||||
},
|
||||
// signUpPage
|
||||
{
|
||||
'bq5k4yne': {
|
||||
'pt': 'Home',
|
||||
'en': '',
|
||||
},
|
||||
},
|
||||
// welcomePage
|
||||
{
|
||||
'byab1t50': {
|
||||
'pt': 'Home',
|
||||
'en': '',
|
||||
},
|
||||
},
|
||||
// visitorDetailsModalTemplateComponent
|
||||
{
|
||||
'kqzf7nx2': {
|
||||
|
|
|
@ -42,7 +42,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
),
|
||||
),
|
||||
)
|
||||
: const LiberationHistoryWidget(),
|
||||
: const SignUpPageWidget(),
|
||||
routes: [
|
||||
FFRoute(
|
||||
name: '_initialize',
|
||||
|
@ -57,7 +57,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
),
|
||||
),
|
||||
)
|
||||
: const LiberationHistoryWidget(),
|
||||
: const SignUpPageWidget(),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'homePage',
|
||||
|
@ -113,16 +113,6 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
path: '/scheduleProvisionalVisitPage',
|
||||
builder: (context, params) => const ScheduleProvisionalVisitPageWidget(),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'onBoardingPage',
|
||||
path: '/onBoardingPage',
|
||||
builder: (context, params) => const OnBoardingPageWidget(),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'fastPassPage',
|
||||
path: '/fastPassPage',
|
||||
builder: (context, params) => const FastPassPageWidget(),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'peopleOnThePropertyPage',
|
||||
path: '/peopleOnThePropertyPage',
|
||||
|
@ -137,6 +127,21 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
name: 'liberationHistory',
|
||||
path: '/liberationHistory',
|
||||
builder: (context, params) => const LiberationHistoryWidget(),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'signInPage',
|
||||
path: '/signInPage',
|
||||
builder: (context, params) => const SignInPageWidget(),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'signUpPage',
|
||||
path: '/signUpPage',
|
||||
builder: (context, params) => const SignUpPageWidget(),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'welcomePage',
|
||||
path: '/welcomePage',
|
||||
builder: (context, params) => const WelcomePageWidget(),
|
||||
)
|
||||
].map((r) => r.toRoute(appStateNotifier)).toList(),
|
||||
);
|
||||
|
|
|
@ -6,13 +6,12 @@ export '/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.
|
|||
show ScheduleCompleteVisitPageWidget;
|
||||
export '/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart'
|
||||
show ScheduleProvisionalVisitPageWidget;
|
||||
export '/pages/on_boarding_page/on_boarding_page_widget.dart'
|
||||
show OnBoardingPageWidget;
|
||||
export '/pages/fast_pass_page/fast_pass_page_widget.dart'
|
||||
show FastPassPageWidget;
|
||||
export '/pages/people_on_the_property_page/people_on_the_property_page_widget.dart'
|
||||
show PeopleOnThePropertyPageWidget;
|
||||
export '/pages/acess_history_page/acess_history_page_widget.dart'
|
||||
show AcessHistoryPageWidget;
|
||||
export '/pages/liberation_history/liberation_history_widget.dart'
|
||||
show LiberationHistoryWidget;
|
||||
export '/pages/sign_in_page/sign_in_page_widget.dart' show SignInPageWidget;
|
||||
export '/pages/sign_up_page/sign_up_page_widget.dart' show SignUpPageWidget;
|
||||
export '/pages/welcome_page/welcome_page_widget.dart' show WelcomePageWidget;
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'fast_pass_page_widget.dart' show FastPassPageWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class FastPassPageModel extends FlutterFlowModel<FastPassPageWidget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'fast_pass_page_model.dart';
|
||||
export 'fast_pass_page_model.dart';
|
||||
|
||||
class FastPassPageWidget extends StatefulWidget {
|
||||
const FastPassPageWidget({super.key});
|
||||
|
||||
@override
|
||||
State<FastPassPageWidget> createState() => _FastPassPageWidgetState();
|
||||
}
|
||||
|
||||
class _FastPassPageWidgetState extends State<FastPassPageWidget> {
|
||||
late FastPassPageModel _model;
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => FastPassPageModel());
|
||||
}
|
||||
|
||||
@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,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -872,7 +872,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
setState(() {});
|
||||
|
||||
context.goNamed(
|
||||
'onBoardingPage',
|
||||
'welcomePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
import '/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart';
|
||||
import '/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart';
|
||||
import '/components/templates_components/welcome_template_component/welcome_template_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'on_boarding_page_widget.dart' show OnBoardingPageWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class OnBoardingPageModel extends FlutterFlowModel<OnBoardingPageWidget> {
|
||||
/// Local state fields for this page.
|
||||
|
||||
String toggleIdx = 'welcome';
|
||||
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// Model for signInTemplateComponent component.
|
||||
late SignInTemplateComponentModel signInTemplateComponentModel;
|
||||
// Model for signUpTemplateComponent component.
|
||||
late SignUpTemplateComponentModel signUpTemplateComponentModel;
|
||||
// Model for welcomeTemplateComponent component.
|
||||
late WelcomeTemplateComponentModel welcomeTemplateComponentModel;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
signInTemplateComponentModel =
|
||||
createModel(context, () => SignInTemplateComponentModel());
|
||||
signUpTemplateComponentModel =
|
||||
createModel(context, () => SignUpTemplateComponentModel());
|
||||
welcomeTemplateComponentModel =
|
||||
createModel(context, () => WelcomeTemplateComponentModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
signInTemplateComponentModel.dispose();
|
||||
signUpTemplateComponentModel.dispose();
|
||||
welcomeTemplateComponentModel.dispose();
|
||||
}
|
||||
|
||||
/// Action blocks.
|
||||
Future toggleOnBoardingActionPage(
|
||||
BuildContext context, {
|
||||
required String? toggleValue,
|
||||
}) async {
|
||||
toggleIdx = toggleValue!;
|
||||
}
|
||||
}
|
|
@ -1,131 +0,0 @@
|
|||
import '/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart';
|
||||
import '/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart';
|
||||
import '/components/templates_components/welcome_template_component/welcome_template_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'on_boarding_page_model.dart';
|
||||
export 'on_boarding_page_model.dart';
|
||||
|
||||
class OnBoardingPageWidget extends StatefulWidget {
|
||||
const OnBoardingPageWidget({super.key});
|
||||
|
||||
@override
|
||||
State<OnBoardingPageWidget> createState() => _OnBoardingPageWidgetState();
|
||||
}
|
||||
|
||||
class _OnBoardingPageWidgetState extends State<OnBoardingPageWidget> {
|
||||
late OnBoardingPageModel _model;
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => OnBoardingPageModel());
|
||||
|
||||
// On page load action.
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||
if (FFAppState().isLogged == true) {
|
||||
context.pushNamed(
|
||||
'homePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.fade,
|
||||
duration: Duration(milliseconds: 0),
|
||||
),
|
||||
},
|
||||
);
|
||||
} else {
|
||||
if (isAndroid == true) {
|
||||
FFAppState().device = 'Android';
|
||||
setState(() {});
|
||||
} else if (isiOS == true) {
|
||||
FFAppState().device = 'iOS';
|
||||
setState(() {});
|
||||
} else {
|
||||
FFAppState().device = 'Web';
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@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: Stack(
|
||||
children: [
|
||||
if (_model.toggleIdx == 'SignIn')
|
||||
wrapWithModel(
|
||||
model: _model.signInTemplateComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: SignInTemplateComponentWidget(
|
||||
toggleOnBoardingPageAction: (toggleValueSignInParam) async {
|
||||
await _model.toggleOnBoardingActionPage(
|
||||
context,
|
||||
toggleValue: toggleValueSignInParam,
|
||||
);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
if (_model.toggleIdx == 'SignUp')
|
||||
wrapWithModel(
|
||||
model: _model.signUpTemplateComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: SignUpTemplateComponentWidget(
|
||||
toggleOnBoardingPageAction: (toggleValueSignUpParam) async {
|
||||
await _model.toggleOnBoardingActionPage(
|
||||
context,
|
||||
toggleValue: toggleValueSignUpParam,
|
||||
);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
if (_model.toggleIdx == 'welcome')
|
||||
wrapWithModel(
|
||||
model: _model.welcomeTemplateComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: WelcomeTemplateComponentWidget(
|
||||
toggleOnboardingPageAction:
|
||||
(toggleValueWelcomeParam) async {
|
||||
await _model.toggleOnBoardingActionPage(
|
||||
context,
|
||||
toggleValue: toggleValueWelcomeParam,
|
||||
);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
import '/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'sign_in_page_widget.dart' show SignInPageWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SignInPageModel extends FlutterFlowModel<SignInPageWidget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// Model for signInTemplateComponent component.
|
||||
late SignInTemplateComponentModel signInTemplateComponentModel;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
signInTemplateComponentModel =
|
||||
createModel(context, () => SignInTemplateComponentModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
signInTemplateComponentModel.dispose();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
import '/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/actions/actions.dart' as action_blocks;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'sign_in_page_model.dart';
|
||||
export 'sign_in_page_model.dart';
|
||||
|
||||
class SignInPageWidget extends StatefulWidget {
|
||||
const SignInPageWidget({super.key});
|
||||
|
||||
@override
|
||||
State<SignInPageWidget> createState() => _SignInPageWidgetState();
|
||||
}
|
||||
|
||||
class _SignInPageWidgetState extends State<SignInPageWidget> {
|
||||
late SignInPageModel _model;
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => SignInPageModel());
|
||||
}
|
||||
|
||||
@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: wrapWithModel(
|
||||
model: _model.signInTemplateComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: SignInTemplateComponentWidget(
|
||||
toggleSignUpPage: () async {
|
||||
await action_blocks.toggleSignUpPage(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
import '/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'sign_up_page_widget.dart' show SignUpPageWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SignUpPageModel extends FlutterFlowModel<SignUpPageWidget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// Model for signUpTemplateComponent component.
|
||||
late SignUpTemplateComponentModel signUpTemplateComponentModel;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
signUpTemplateComponentModel =
|
||||
createModel(context, () => SignUpTemplateComponentModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
signUpTemplateComponentModel.dispose();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
import '/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/actions/actions.dart' as action_blocks;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'sign_up_page_model.dart';
|
||||
export 'sign_up_page_model.dart';
|
||||
|
||||
class SignUpPageWidget extends StatefulWidget {
|
||||
const SignUpPageWidget({super.key});
|
||||
|
||||
@override
|
||||
State<SignUpPageWidget> createState() => _SignUpPageWidgetState();
|
||||
}
|
||||
|
||||
class _SignUpPageWidgetState extends State<SignUpPageWidget> {
|
||||
late SignUpPageModel _model;
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => SignUpPageModel());
|
||||
}
|
||||
|
||||
@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: wrapWithModel(
|
||||
model: _model.signUpTemplateComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: SignUpTemplateComponentWidget(
|
||||
toggleSignInPage: () async {
|
||||
await action_blocks.toggleSignInPage(context);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
import '/components/templates_components/welcome_template_component/welcome_template_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'welcome_page_widget.dart' show WelcomePageWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class WelcomePageModel extends FlutterFlowModel<WelcomePageWidget> {
|
||||
/// Local state fields for this page.
|
||||
|
||||
String toggleIdx = 'welcome';
|
||||
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// Model for welcomeTemplateComponent component.
|
||||
late WelcomeTemplateComponentModel welcomeTemplateComponentModel;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
welcomeTemplateComponentModel =
|
||||
createModel(context, () => WelcomeTemplateComponentModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
welcomeTemplateComponentModel.dispose();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
import '/components/templates_components/welcome_template_component/welcome_template_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/actions/actions.dart' as action_blocks;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.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> {
|
||||
late WelcomePageModel _model;
|
||||
|
||||
final scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@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(() {});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@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: wrapWithModel(
|
||||
model: _model.welcomeTemplateComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: WelcomeTemplateComponentWidget(
|
||||
toggleSignUpPage: () async {
|
||||
await action_blocks.toggleSignUpPage(context);
|
||||
},
|
||||
toggleSignInPage: () async {
|
||||
await action_blocks.toggleSignInPage(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue