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>"; };
|
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>"; };
|
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>"; };
|
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>"; };
|
6436409127A31CDD00820AF7 /* 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>"; };
|
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>"; };
|
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
@ -225,8 +225,8 @@
|
||||||
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
|
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
|
||||||
isa = PBXVariantGroup;
|
isa = PBXVariantGroup;
|
||||||
children = (
|
children = (
|
||||||
6436409027A31CD300820AF7 /* pt */,
|
6436409127A31CDD00820AF7 /* pt */,
|
||||||
6436409A27A31CDE00820AF7 /* en */,
|
6436409C27A31CDB00820AF7 /* en */,
|
||||||
);
|
);
|
||||||
name = InfoPlist.strings;
|
name = InfoPlist.strings;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
|
|
@ -2,6 +2,7 @@ import '/backend/api_requests/api_calls.dart';
|
||||||
import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
|
import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
|
||||||
import '/flutter_flow/flutter_flow_theme.dart';
|
import '/flutter_flow/flutter_flow_theme.dart';
|
||||||
import '/flutter_flow/flutter_flow_util.dart';
|
import '/flutter_flow/flutter_flow_util.dart';
|
||||||
|
import '/actions/actions.dart' as action_blocks;
|
||||||
import '/custom_code/actions/index.dart' as actions;
|
import '/custom_code/actions/index.dart' as actions;
|
||||||
import '/flutter_flow/random_data_util.dart' as random_data;
|
import '/flutter_flow/random_data_util.dart' as random_data;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -79,7 +80,7 @@ Future<Color> manageStatusColorAction(
|
||||||
return FlutterFlowTheme.of(context).warning;
|
return FlutterFlowTheme.of(context).warning;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future singInActionApp(
|
Future singInLoginAction(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
String? emailAdress,
|
String? emailAdress,
|
||||||
String? password,
|
String? password,
|
||||||
|
@ -136,16 +137,8 @@ Future singInActionApp(
|
||||||
(loginCall.jsonBody ?? ''),
|
(loginCall.jsonBody ?? ''),
|
||||||
)!;
|
)!;
|
||||||
FFAppState().isLogged = true;
|
FFAppState().isLogged = true;
|
||||||
|
await action_blocks.toggleHomePage(context);
|
||||||
context.goNamed(
|
return;
|
||||||
'homePage',
|
|
||||||
extra: <String, dynamic>{
|
|
||||||
kTransitionInfoKey: const TransitionInfo(
|
|
||||||
hasTransition: true,
|
|
||||||
transitionType: PageTransitionType.fade,
|
|
||||||
),
|
|
||||||
},
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
await showModalBottomSheet(
|
await showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
|
@ -172,12 +165,14 @@ Future singInActionApp(
|
||||||
|
|
||||||
FFAppState().update(() {});
|
FFAppState().update(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<bool> signUpActionApp(
|
Future<bool> signUpRegisterAction(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required String? name,
|
required String? name,
|
||||||
String? passwd,
|
String? passwd,
|
||||||
|
@ -272,10 +267,8 @@ Future forgotPasswdAction(
|
||||||
|
|
||||||
if (PhpGroup.forgotPasswordCall.error(
|
if (PhpGroup.forgotPasswordCall.error(
|
||||||
(forgotPasswd.jsonBody ?? ''),
|
(forgotPasswd.jsonBody ?? ''),
|
||||||
) ==
|
) !=
|
||||||
false) {
|
false) {
|
||||||
context.pushNamed('null');
|
|
||||||
} else {
|
|
||||||
return;
|
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,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
|
|
||||||
context.pushNamed('fastPassPage');
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 100.0,
|
width: 100.0,
|
||||||
|
|
|
@ -14,11 +14,10 @@ export 'sign_in_template_component_model.dart';
|
||||||
class SignInTemplateComponentWidget extends StatefulWidget {
|
class SignInTemplateComponentWidget extends StatefulWidget {
|
||||||
const SignInTemplateComponentWidget({
|
const SignInTemplateComponentWidget({
|
||||||
super.key,
|
super.key,
|
||||||
required this.toggleOnBoardingPageAction,
|
required this.toggleSignUpPage,
|
||||||
});
|
});
|
||||||
|
|
||||||
final Future Function(String toggleValueSignInParam)?
|
final Future Function()? toggleSignUpPage;
|
||||||
toggleOnBoardingPageAction;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<SignInTemplateComponentWidget> createState() =>
|
State<SignInTemplateComponentWidget> createState() =>
|
||||||
|
@ -518,7 +517,7 @@ class _SignInTemplateComponentWidgetState
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
await action_blocks
|
await action_blocks
|
||||||
.singInActionApp(
|
.singInLoginAction(
|
||||||
context,
|
context,
|
||||||
emailAdress: _model
|
emailAdress: _model
|
||||||
.emailAddressTextController
|
.emailAddressTextController
|
||||||
|
@ -598,10 +597,8 @@ class _SignInTemplateComponentWidgetState
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget
|
await widget
|
||||||
.toggleOnBoardingPageAction
|
.toggleSignUpPage
|
||||||
?.call(
|
?.call();
|
||||||
'SignUp',
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(
|
text: FFLocalizations.of(
|
||||||
context)
|
context)
|
||||||
|
@ -696,7 +693,7 @@ class _SignInTemplateComponentWidgetState
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
await action_blocks
|
await action_blocks
|
||||||
.singInActionApp(
|
.singInLoginAction(
|
||||||
context,
|
context,
|
||||||
emailAdress: _model
|
emailAdress: _model
|
||||||
.emailAddressTextController
|
.emailAddressTextController
|
||||||
|
@ -742,7 +739,7 @@ class _SignInTemplateComponentWidgetState
|
||||||
'Plus Jakarta Sans',
|
'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(
|
color: FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
.secondaryText,
|
.info,
|
||||||
fontSize:
|
fontSize:
|
||||||
16.0,
|
16.0,
|
||||||
letterSpacing:
|
letterSpacing:
|
||||||
|
@ -780,8 +777,9 @@ class _SignInTemplateComponentWidgetState
|
||||||
0.0, 16.0),
|
0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
context
|
await widget
|
||||||
.pushNamed('null');
|
.toggleSignUpPage
|
||||||
|
?.call();
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(
|
text: FFLocalizations.of(
|
||||||
context)
|
context)
|
||||||
|
@ -856,90 +854,116 @@ class _SignInTemplateComponentWidgetState
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||||
0.0, 12.0, 0.0, 12.0),
|
0.0, 12.0, 0.0, 12.0),
|
||||||
child: RichText(
|
child: InkWell(
|
||||||
textScaler:
|
splashColor: Colors.transparent,
|
||||||
MediaQuery.of(context).textScaler,
|
focusColor: Colors.transparent,
|
||||||
text: TextSpan(
|
hoverColor: Colors.transparent,
|
||||||
children: [
|
highlightColor: Colors.transparent,
|
||||||
TextSpan(
|
onTap: () async {
|
||||||
text:
|
await showModalBottomSheet(
|
||||||
FFLocalizations.of(context)
|
isScrollControlled: true,
|
||||||
.getText(
|
backgroundColor:
|
||||||
'05dx91ku' /* Você esqueceu a sua senha? */,
|
Colors.transparent,
|
||||||
),
|
enableDrag: false,
|
||||||
style: TextStyle(
|
context: context,
|
||||||
color: FlutterFlowTheme.of(
|
builder: (context) {
|
||||||
|
return Padding(
|
||||||
|
padding:
|
||||||
|
MediaQuery.viewInsetsOf(
|
||||||
|
context),
|
||||||
|
child:
|
||||||
|
const ForgotPasswordTemplateComponentWidget(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
).then(
|
||||||
|
(value) => safeSetState(() {}));
|
||||||
|
},
|
||||||
|
child: RichText(
|
||||||
|
textScaler: MediaQuery.of(context)
|
||||||
|
.textScaler,
|
||||||
|
text: TextSpan(
|
||||||
|
children: [
|
||||||
|
TextSpan(
|
||||||
|
text: FFLocalizations.of(
|
||||||
context)
|
context)
|
||||||
.primaryText,
|
.getText(
|
||||||
),
|
'05dx91ku' /* Você esqueceu a sua senha? */,
|
||||||
),
|
),
|
||||||
TextSpan(
|
style: TextStyle(
|
||||||
text:
|
color: FlutterFlowTheme.of(
|
||||||
FFLocalizations.of(context)
|
context)
|
||||||
.getText(
|
.primaryText,
|
||||||
'p5c6d54y' /* 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 {
|
|
||||||
await showModalBottomSheet(
|
|
||||||
isScrollControlled:
|
|
||||||
true,
|
|
||||||
backgroundColor:
|
|
||||||
Colors
|
|
||||||
.transparent,
|
|
||||||
context: context,
|
|
||||||
builder: (context) {
|
|
||||||
return Padding(
|
|
||||||
padding: MediaQuery
|
|
||||||
.viewInsetsOf(
|
|
||||||
context),
|
|
||||||
child:
|
|
||||||
const ForgotPasswordTemplateComponentWidget(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
).then((value) =>
|
|
||||||
safeSetState(
|
|
||||||
() {}));
|
|
||||||
},
|
|
||||||
)
|
|
||||||
],
|
|
||||||
style: FlutterFlowTheme.of(context)
|
|
||||||
.bodyMedium
|
|
||||||
.override(
|
|
||||||
fontFamily:
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily,
|
|
||||||
letterSpacing: 0.0,
|
|
||||||
useGoogleFonts: GoogleFonts
|
|
||||||
.asMap()
|
|
||||||
.containsKey(
|
|
||||||
FlutterFlowTheme.of(
|
|
||||||
context)
|
|
||||||
.bodyMediumFamily),
|
|
||||||
),
|
),
|
||||||
|
TextSpan(
|
||||||
|
text: FFLocalizations.of(
|
||||||
|
context)
|
||||||
|
.getText(
|
||||||
|
'p5c6d54y' /* 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 {
|
||||||
|
await showModalBottomSheet(
|
||||||
|
isScrollControlled:
|
||||||
|
true,
|
||||||
|
backgroundColor:
|
||||||
|
Colors
|
||||||
|
.transparent,
|
||||||
|
context: context,
|
||||||
|
builder: (context) {
|
||||||
|
return Padding(
|
||||||
|
padding: MediaQuery
|
||||||
|
.viewInsetsOf(
|
||||||
|
context),
|
||||||
|
child:
|
||||||
|
const ForgotPasswordTemplateComponentWidget(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
).then((value) =>
|
||||||
|
safeSetState(
|
||||||
|
() {}));
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
style:
|
||||||
|
FlutterFlowTheme.of(context)
|
||||||
|
.bodyMedium
|
||||||
|
.override(
|
||||||
|
fontFamily:
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily,
|
||||||
|
letterSpacing: 0.0,
|
||||||
|
useGoogleFonts: GoogleFonts
|
||||||
|
.asMap()
|
||||||
|
.containsKey(
|
||||||
|
FlutterFlowTheme.of(
|
||||||
|
context)
|
||||||
|
.bodyMediumFamily),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -63,7 +63,7 @@ class SignUpTemplateComponentModel
|
||||||
return null;
|
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;
|
bool? signUp;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -15,11 +15,10 @@ export 'sign_up_template_component_model.dart';
|
||||||
class SignUpTemplateComponentWidget extends StatefulWidget {
|
class SignUpTemplateComponentWidget extends StatefulWidget {
|
||||||
const SignUpTemplateComponentWidget({
|
const SignUpTemplateComponentWidget({
|
||||||
super.key,
|
super.key,
|
||||||
required this.toggleOnBoardingPageAction,
|
required this.toggleSignInPage,
|
||||||
});
|
});
|
||||||
|
|
||||||
final Future Function(String toggleValueSignUpParam)?
|
final Future Function()? toggleSignInPage;
|
||||||
toggleOnBoardingPageAction;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<SignUpTemplateComponentWidget> createState() =>
|
State<SignUpTemplateComponentWidget> createState() =>
|
||||||
|
@ -681,7 +680,7 @@ class _SignUpTemplateComponentWidgetState
|
||||||
var shouldSetState = false;
|
var shouldSetState = false;
|
||||||
_model.signUp =
|
_model.signUp =
|
||||||
await action_blocks
|
await action_blocks
|
||||||
.signUpActionApp(
|
.signUpRegisterAction(
|
||||||
context,
|
context,
|
||||||
name: _model
|
name: _model
|
||||||
.nameRegisterFormTextController
|
.nameRegisterFormTextController
|
||||||
|
@ -697,10 +696,8 @@ class _SignUpTemplateComponentWidgetState
|
||||||
shouldSetState = true;
|
shouldSetState = true;
|
||||||
if (_model.signUp == true) {
|
if (_model.signUp == true) {
|
||||||
await widget
|
await widget
|
||||||
.toggleOnBoardingPageAction
|
.toggleSignInPage
|
||||||
?.call(
|
?.call();
|
||||||
'SignIn',
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
if (shouldSetState) {
|
if (shouldSetState) {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
@ -766,11 +763,8 @@ class _SignUpTemplateComponentWidgetState
|
||||||
hoverColor: Colors.transparent,
|
hoverColor: Colors.transparent,
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await widget
|
await widget.toggleSignInPage
|
||||||
.toggleOnBoardingPageAction
|
?.call();
|
||||||
?.call(
|
|
||||||
'SignIn',
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
child: RichText(
|
child: RichText(
|
||||||
textScaler: MediaQuery.of(context)
|
textScaler: MediaQuery.of(context)
|
||||||
|
|
|
@ -12,11 +12,12 @@ export 'welcome_template_component_model.dart';
|
||||||
class WelcomeTemplateComponentWidget extends StatefulWidget {
|
class WelcomeTemplateComponentWidget extends StatefulWidget {
|
||||||
const WelcomeTemplateComponentWidget({
|
const WelcomeTemplateComponentWidget({
|
||||||
super.key,
|
super.key,
|
||||||
required this.toggleOnboardingPageAction,
|
required this.toggleSignUpPage,
|
||||||
|
required this.toggleSignInPage,
|
||||||
});
|
});
|
||||||
|
|
||||||
final Future Function(String toggleValueWelcomeParam)?
|
final Future Function()? toggleSignUpPage;
|
||||||
toggleOnboardingPageAction;
|
final Future Function()? toggleSignInPage;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<WelcomeTemplateComponentWidget> createState() =>
|
State<WelcomeTemplateComponentWidget> createState() =>
|
||||||
|
@ -216,11 +217,7 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
0.0, 0.0, 0.0, 16.0),
|
0.0, 0.0, 0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget
|
await widget.toggleSignInPage?.call();
|
||||||
.toggleOnboardingPageAction
|
|
||||||
?.call(
|
|
||||||
'SignIn',
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
text:
|
text:
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
|
@ -269,11 +266,7 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
0.0, 0.0, 0.0, 16.0),
|
0.0, 0.0, 0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget
|
await widget.toggleSignUpPage?.call();
|
||||||
.toggleOnboardingPageAction
|
|
||||||
?.call(
|
|
||||||
'SignUp',
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
text:
|
text:
|
||||||
FFLocalizations.of(context).getText(
|
FFLocalizations.of(context).getText(
|
||||||
|
@ -297,7 +290,7 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
fontFamily: 'Plus Jakarta Sans',
|
fontFamily: 'Plus Jakarta Sans',
|
||||||
color:
|
color:
|
||||||
FlutterFlowTheme.of(context)
|
FlutterFlowTheme.of(context)
|
||||||
.customColor3,
|
.primaryBackground,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
|
@ -331,7 +324,8 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
0.0, 0.0, 0.0, 16.0),
|
0.0, 0.0, 0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
context.pushNamed('null');
|
await widget.toggleSignInPage
|
||||||
|
?.call();
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context)
|
text: FFLocalizations.of(context)
|
||||||
.getText(
|
.getText(
|
||||||
|
@ -356,7 +350,7 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
'Plus Jakarta Sans',
|
'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(
|
color: FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
.secondaryText,
|
.info,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
|
@ -383,7 +377,8 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
0.0, 0.0, 0.0, 16.0),
|
0.0, 0.0, 0.0, 16.0),
|
||||||
child: FFButtonWidget(
|
child: FFButtonWidget(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
context.pushNamed('null');
|
await widget.toggleSignUpPage
|
||||||
|
?.call();
|
||||||
},
|
},
|
||||||
text: FFLocalizations.of(context)
|
text: FFLocalizations.of(context)
|
||||||
.getText(
|
.getText(
|
||||||
|
@ -408,7 +403,7 @@ class _WelcomeTemplateComponentWidgetState
|
||||||
'Plus Jakarta Sans',
|
'Plus Jakarta Sans',
|
||||||
color: FlutterFlowTheme.of(
|
color: FlutterFlowTheme.of(
|
||||||
context)
|
context)
|
||||||
.secondaryText,
|
.info,
|
||||||
fontSize: 16.0,
|
fontSize: 16.0,
|
||||||
letterSpacing: 0.0,
|
letterSpacing: 0.0,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
|
|
|
@ -389,20 +389,6 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
'en': '',
|
'en': '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// onBoardingPage
|
|
||||||
{
|
|
||||||
'6exl3e75': {
|
|
||||||
'pt': 'Home',
|
|
||||||
'en': '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// fastPassPage
|
|
||||||
{
|
|
||||||
'koh6s96f': {
|
|
||||||
'pt': 'Home',
|
|
||||||
'en': '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// peopleOnThePropertyPage
|
// peopleOnThePropertyPage
|
||||||
{
|
{
|
||||||
'nsu13r5d': {
|
'nsu13r5d': {
|
||||||
|
@ -492,6 +478,27 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||||
'en': '',
|
'en': '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// signInPage
|
||||||
|
{
|
||||||
|
'kosqqghj': {
|
||||||
|
'pt': 'Home',
|
||||||
|
'en': '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// signUpPage
|
||||||
|
{
|
||||||
|
'bq5k4yne': {
|
||||||
|
'pt': 'Home',
|
||||||
|
'en': '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// welcomePage
|
||||||
|
{
|
||||||
|
'byab1t50': {
|
||||||
|
'pt': 'Home',
|
||||||
|
'en': '',
|
||||||
|
},
|
||||||
|
},
|
||||||
// visitorDetailsModalTemplateComponent
|
// visitorDetailsModalTemplateComponent
|
||||||
{
|
{
|
||||||
'kqzf7nx2': {
|
'kqzf7nx2': {
|
||||||
|
|
|
@ -42,7 +42,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: const LiberationHistoryWidget(),
|
: const SignUpPageWidget(),
|
||||||
routes: [
|
routes: [
|
||||||
FFRoute(
|
FFRoute(
|
||||||
name: '_initialize',
|
name: '_initialize',
|
||||||
|
@ -57,7 +57,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: const LiberationHistoryWidget(),
|
: const SignUpPageWidget(),
|
||||||
),
|
),
|
||||||
FFRoute(
|
FFRoute(
|
||||||
name: 'homePage',
|
name: 'homePage',
|
||||||
|
@ -113,16 +113,6 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
||||||
path: '/scheduleProvisionalVisitPage',
|
path: '/scheduleProvisionalVisitPage',
|
||||||
builder: (context, params) => const ScheduleProvisionalVisitPageWidget(),
|
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(
|
FFRoute(
|
||||||
name: 'peopleOnThePropertyPage',
|
name: 'peopleOnThePropertyPage',
|
||||||
path: '/peopleOnThePropertyPage',
|
path: '/peopleOnThePropertyPage',
|
||||||
|
@ -137,6 +127,21 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
||||||
name: 'liberationHistory',
|
name: 'liberationHistory',
|
||||||
path: '/liberationHistory',
|
path: '/liberationHistory',
|
||||||
builder: (context, params) => const LiberationHistoryWidget(),
|
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(),
|
].map((r) => r.toRoute(appStateNotifier)).toList(),
|
||||||
);
|
);
|
||||||
|
|
|
@ -6,13 +6,12 @@ export '/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.
|
||||||
show ScheduleCompleteVisitPageWidget;
|
show ScheduleCompleteVisitPageWidget;
|
||||||
export '/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart'
|
export '/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart'
|
||||||
show ScheduleProvisionalVisitPageWidget;
|
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'
|
export '/pages/people_on_the_property_page/people_on_the_property_page_widget.dart'
|
||||||
show PeopleOnThePropertyPageWidget;
|
show PeopleOnThePropertyPageWidget;
|
||||||
export '/pages/acess_history_page/acess_history_page_widget.dart'
|
export '/pages/acess_history_page/acess_history_page_widget.dart'
|
||||||
show AcessHistoryPageWidget;
|
show AcessHistoryPageWidget;
|
||||||
export '/pages/liberation_history/liberation_history_widget.dart'
|
export '/pages/liberation_history/liberation_history_widget.dart'
|
||||||
show LiberationHistoryWidget;
|
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(() {});
|
setState(() {});
|
||||||
|
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
'onBoardingPage',
|
'welcomePage',
|
||||||
extra: <String, dynamic>{
|
extra: <String, dynamic>{
|
||||||
kTransitionInfoKey: const TransitionInfo(
|
kTransitionInfoKey: const TransitionInfo(
|
||||||
hasTransition: true,
|
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