Updating to latest FlutterFlow output.
This commit is contained in:
parent
c12d33c1db
commit
6bdfcf371c
|
@ -5,8 +5,7 @@
|
|||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
|
||||
|
||||
<application
|
||||
android:label="FREHub"
|
||||
tools:replace="android:label"
|
||||
|
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
|
@ -28,6 +28,7 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
|
|||
flutter_ios_podfile_setup
|
||||
|
||||
target 'Runner' do
|
||||
pod 'GoogleUtilities'
|
||||
use_frameworks! :linkage => :static
|
||||
use_modular_headers!
|
||||
|
||||
|
@ -43,3 +44,9 @@ post_install do |installer|
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
target 'ImageNotification' do
|
||||
use_frameworks! :linkage => :static
|
||||
pod 'Firebase/Messaging'
|
||||
pod 'GoogleUtilities'
|
||||
end
|
||||
|
|
|
@ -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>"; };
|
||||
6436409527A31CDE00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6436409227A31CDC00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6436409A27A31CDE00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
6436409A27A31CD500820AF7 /* 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 = (
|
||||
6436409527A31CDE00820AF7 /* pt */,
|
||||
6436409227A31CDC00820AF7 /* en */,
|
||||
6436409A27A31CDE00820AF7 /* pt */,
|
||||
6436409A27A31CD500820AF7 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
|
|
|
@ -52,6 +52,11 @@
|
|||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>In order to upload data, this app requires permission to access the photo library.</string>
|
||||
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>fetch</string>
|
||||
<string>remote-notification</string>
|
||||
</array>
|
||||
|
||||
|
||||
<key>UILaunchStoryboardName</key>
|
||||
|
|
|
@ -2,5 +2,7 @@
|
|||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
import '/application_components/molecular_components/throw_exception/throw_exception_widget.dart';
|
||||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/custom_code/actions/index.dart' as actions;
|
||||
import '/flutter_flow/random_data_util.dart' as random_data;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
Future repeatVisitScheduleAction(
|
||||
Future repeatVisitScheduleActionBlock(
|
||||
BuildContext context, {
|
||||
List<dynamic>? visitorJsonList,
|
||||
String? visitorStrList,
|
||||
|
@ -56,220 +51,3 @@ Future repeatVisitScheduleAction(
|
|||
}.withoutNulls,
|
||||
);
|
||||
}
|
||||
|
||||
Future<Color> manageStatusColorAction(
|
||||
BuildContext context, {
|
||||
required String? visitStatusStr,
|
||||
}) async {
|
||||
if (visitStatusStr == 'A') {
|
||||
return FlutterFlowTheme.of(context).success;
|
||||
} else if ((visitStatusStr == 'C') ||
|
||||
(visitStatusStr == 'F') ||
|
||||
(visitStatusStr == 'B') ||
|
||||
(visitStatusStr == 'I')) {
|
||||
return FlutterFlowTheme.of(context).error;
|
||||
}
|
||||
|
||||
return FlutterFlowTheme.of(context).warning;
|
||||
}
|
||||
|
||||
Future singInActionApp(
|
||||
BuildContext context, {
|
||||
String? emailAdress,
|
||||
String? password,
|
||||
}) async {
|
||||
String? devUUID;
|
||||
ApiCallResponse? loginCall;
|
||||
|
||||
await Future.wait([
|
||||
Future(() async {
|
||||
FFAppState().email = emailAdress!;
|
||||
}),
|
||||
Future(() async {
|
||||
FFAppState().passwd = password!;
|
||||
}),
|
||||
]);
|
||||
if ((FFAppState().email != '') &&
|
||||
(FFAppState().passwd != '')) {
|
||||
devUUID = await actions.getDevUUID();
|
||||
FFAppState().devUUID = devUUID!;
|
||||
loginCall = await PhpGroup.loginCall.call(
|
||||
email: FFAppState().email,
|
||||
password: FFAppState().passwd,
|
||||
uuid: FFAppState().devUUID,
|
||||
type: FFAppState().device,
|
||||
description: random_data.randomString(
|
||||
10,
|
||||
10,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
);
|
||||
FFAppState().userUUID = PhpGroup.loginCall.userUUID(
|
||||
(loginCall.jsonBody ?? ''),
|
||||
)!;
|
||||
if (PhpGroup.loginCall.error(
|
||||
(loginCall.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
FFAppState().isLogged = true;
|
||||
|
||||
context.goNamed(
|
||||
'homePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.fade,
|
||||
),
|
||||
},
|
||||
);
|
||||
} else {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: ThrowExceptionWidget(
|
||||
msg: PhpGroup.loginCall.msg(
|
||||
(loginCall?.jsonBody ?? ''),
|
||||
)!,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
FFAppState().email = '';
|
||||
FFAppState().passwd = '';
|
||||
FFAppState().update(() {});
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> signUpActionApp(
|
||||
BuildContext context, {
|
||||
required String? name,
|
||||
String? passwd,
|
||||
required String? email,
|
||||
String? device,
|
||||
}) async {
|
||||
ApiCallResponse? registerCall;
|
||||
|
||||
if ((email != null && email != '') &&
|
||||
(passwd != null && passwd != '') &&
|
||||
(name != null && name != '')) {
|
||||
registerCall = await PhpGroup.registerCall.call(
|
||||
name: name,
|
||||
password: passwd,
|
||||
email: email,
|
||||
token: random_data.randomString(
|
||||
36,
|
||||
36,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
),
|
||||
uuid: random_data.randomString(
|
||||
36,
|
||||
36,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
),
|
||||
tipo: device,
|
||||
descricao: random_data.randomString(
|
||||
36,
|
||||
36,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
);
|
||||
if (PhpGroup.registerCall.error(
|
||||
(registerCall.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
return true;
|
||||
}
|
||||
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (alertDialogContext) {
|
||||
return AlertDialog(
|
||||
title: const Text('ERROR2'),
|
||||
content: const Text('ERROR2'),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(alertDialogContext),
|
||||
child: const Text('ERROR2 '),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
return false;
|
||||
} else {
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (alertDialogContext) {
|
||||
return AlertDialog(
|
||||
title: const Text('ERROR1'),
|
||||
content: const Text('ERROR1'),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(alertDialogContext),
|
||||
child: const Text('ERROR1 '),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Future forgotPasswdAction(
|
||||
BuildContext context, {
|
||||
required String? email,
|
||||
}) async {
|
||||
ApiCallResponse? forgotPasswd;
|
||||
|
||||
forgotPasswd = await PhpGroup.forgotPasswordCall.call(
|
||||
email: email,
|
||||
);
|
||||
if (PhpGroup.forgotPasswordCall.error(
|
||||
(forgotPasswd.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
context.pushNamed(
|
||||
'LoginPage',
|
||||
queryParameters: {
|
||||
'device': serializeParam(
|
||||
FFAppState().device,
|
||||
ParamType.String,
|
||||
),
|
||||
}.withoutNulls,
|
||||
);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Future cachingLoginActionApp(BuildContext context) async {
|
||||
if (FFAppState().isLogged == true) {
|
||||
context.pushNamed('homePage');
|
||||
} else {
|
||||
if (isAndroid == true) {
|
||||
FFAppState().device = 'Android';
|
||||
} else if (isiOS == true) {
|
||||
FFAppState().device = 'iOS';
|
||||
} else {
|
||||
FFAppState().device = 'Web';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ import '/application_components/organism_components/bottom_arrow_linked_locals_c
|
|||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/custom_functions.dart' as functions;
|
||||
import '/flutter_flow/random_data_util.dart' as random_data;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -44,107 +43,119 @@ class _LocalProfileComponentWidgetState
|
|||
Widget build(BuildContext context) {
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return Visibility(
|
||||
visible: random_data.randomInteger(0, 10) != null,
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
elevation: 0.0,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 119.0,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF1AAB5F),
|
||||
border: Border.all(
|
||||
color: const Color(0xFF1AAB5F),
|
||||
return Container(
|
||||
height: 284.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
elevation: 0.0,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 119.0,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF1AAB5F),
|
||||
border: Border.all(
|
||||
color: const Color(0xFF1AAB5F),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: const Color(0x00FFFFFF),
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const SizedBox(
|
||||
height: double.infinity,
|
||||
child:
|
||||
BottomArrowLinkedLocalsComponentWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(200.0),
|
||||
child: Image.network(
|
||||
valueOrDefault<String>(
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png',
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
),
|
||||
width: 80.0,
|
||||
height: 80.0,
|
||||
fit: BoxFit.cover,
|
||||
alignment: const Alignment(0.0, 0.0),
|
||||
errorBuilder: (context, error, stackTrace) =>
|
||||
Image.asset(
|
||||
'assets/images/error_image.svg',
|
||||
width: 80.0,
|
||||
height: 80.0,
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Container(
|
||||
width: 200.0,
|
||||
height: 200.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: const Color(0x00FFFFFF),
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const SizedBox(
|
||||
height: double.infinity,
|
||||
child:
|
||||
BottomArrowLinkedLocalsComponentWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(200.0),
|
||||
child: Image.network(
|
||||
valueOrDefault<String>(
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png',
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
),
|
||||
width: 300.0,
|
||||
height: 200.0,
|
||||
fit: BoxFit.cover,
|
||||
alignment: const Alignment(0.0, 0.0),
|
||||
errorBuilder: (context, error, stackTrace) =>
|
||||
Image.asset(
|
||||
'assets/images/error_image.svg',
|
||||
width: 300.0,
|
||||
height: 200.0,
|
||||
fit: BoxFit.cover,
|
||||
alignment: const Alignment(0.0, 0.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
valueOrDefault<String>(
|
||||
functions.convertToUppercase(FFAppState().local),
|
||||
'NOME DO LOCAL',
|
||||
),
|
||||
style:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
]
|
||||
.divide(const SizedBox(width: 20.0))
|
||||
.addToStart(const SizedBox(width: 20.0))
|
||||
.addToEnd(const SizedBox(width: 20.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
valueOrDefault<String>(
|
||||
functions.convertToUppercase(FFAppState().local),
|
||||
'NOME DO LOCAL',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 20.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import '/application_components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'menu_list_view_component_model.dart';
|
||||
export 'menu_list_view_component_model.dart';
|
||||
|
||||
|
@ -10,13 +12,9 @@ class MenuListViewComponentWidget extends StatefulWidget {
|
|||
const MenuListViewComponentWidget({
|
||||
super.key,
|
||||
required this.changeMenuStyle,
|
||||
required this.registerVisitorAction,
|
||||
required this.scheduleVisitAction,
|
||||
});
|
||||
|
||||
final Future Function()? changeMenuStyle;
|
||||
final Future Function()? registerVisitorAction;
|
||||
final Future Function()? scheduleVisitAction;
|
||||
|
||||
@override
|
||||
State<MenuListViewComponentWidget> createState() =>
|
||||
|
@ -48,6 +46,8 @@ class _MenuListViewComponentWidgetState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return Wrap(
|
||||
spacing: 0.0,
|
||||
runSpacing: 0.0,
|
||||
|
@ -62,46 +62,42 @@ class _MenuListViewComponentWidgetState
|
|||
padding: const EdgeInsetsDirectional.fromSTEB(5.0, 0.0, 5.0, 0.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 125.0,
|
||||
height: 106.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: ListView(
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
10.0,
|
||||
0,
|
||||
10.0,
|
||||
0,
|
||||
),
|
||||
padding: EdgeInsets.zero,
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget.scheduleVisitAction?.call();
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const OptionSelectionModalWidget(),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color: FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
|
@ -186,34 +182,36 @@ Visita */
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget.registerVisitorAction?.call();
|
||||
context.pushNamed(
|
||||
'registerVisitorPage',
|
||||
queryParameters: {
|
||||
'userUUID': serializeParam(
|
||||
FFAppState().userUUID,
|
||||
ParamType.String,
|
||||
),
|
||||
'devUUID': serializeParam(
|
||||
FFAppState().devUUID,
|
||||
ParamType.String,
|
||||
),
|
||||
}.withoutNulls,
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: double.infinity,
|
||||
height: 0.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color: FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
|
@ -298,26 +296,16 @@ Visitante */
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color: FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
|
@ -400,26 +388,16 @@ Condomínio */
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color: FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
|
@ -502,26 +480,108 @@ Pet */
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
blurRadius: 4.0,
|
||||
color: FlutterFlowTheme.of(context).customColor5,
|
||||
offset: const Offset(
|
||||
0.0,
|
||||
2.0,
|
||||
),
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).alternate,
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Icon(
|
||||
FFIcons.kvector3,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'xlp8dyn6' /* Agendar
|
||||
Visita */
|
||||
,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.titleLarge
|
||||
.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(height: 0.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
|
@ -603,7 +663,99 @@ de Acesso */
|
|||
),
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(width: 15.0)),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context).customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
8.0, 0.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
alignment:
|
||||
const AlignmentDirectional(0.0, 0.0),
|
||||
child: Icon(
|
||||
FFIcons.kfast,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'45gqx8e0' /* Agenda
|
||||
Auto-Visita */
|
||||
,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.titleLarge
|
||||
.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(height: 0.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -921,6 +921,7 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
await PhpGroup.postScheduleVisitCall.call(
|
||||
devUUID: FFAppState().devUUID,
|
||||
userUUID: FFAppState().userUUID,
|
||||
cliUUID: FFAppState().cliUUID,
|
||||
atividade: 'putVisita',
|
||||
devDesc: widget.visitObsStr,
|
||||
idVisitante: widget.visitorStrList,
|
||||
|
@ -931,7 +932,6 @@ class _ScheduleVisitDetailWidgetState extends State<ScheduleVisitDetailWidget> {
|
|||
functions.extractIdToStr(widget.visitResonStr!),
|
||||
idNAC: functions.extractIdToStr(widget.visitLevelStr!),
|
||||
obs: widget.visitObsStr,
|
||||
cliID: FFAppState().cliUUID,
|
||||
);
|
||||
if (PhpGroup.postScheduleVisitCall.error(
|
||||
(_model.postScheduleVisit?.jsonBody ?? ''),
|
||||
|
|
|
@ -4,10 +4,12 @@ import 'view_visit_detail_widget.dart' show ViewVisitDetailWidget;
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class ViewVisitDetailModel extends FlutterFlowModel<ViewVisitDetailWidget> {
|
||||
/// Local state fields for this component.
|
||||
|
||||
Color? statusColor;
|
||||
|
||||
/// State fields for stateful widgets in this component.
|
||||
|
||||
// Stores action output result for [Action Block - manageStatusColorAction] action in viewVisitDetail widget.
|
||||
Color? visitStatusColor;
|
||||
// State field(s) for TextField widget.
|
||||
FocusNode? textFieldFocusNode1;
|
||||
TextEditingController? textController1;
|
||||
|
|
|
@ -4,7 +4,6 @@ import '/backend/api_requests/api_calls.dart';
|
|||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/actions/actions.dart' as action_blocks;
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
|
@ -65,14 +64,23 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
|
||||
// On component load action.
|
||||
SchedulerBinding.instance.addPostFrameCallback((_) async {
|
||||
_model.visitStatusColor = await action_blocks.manageStatusColorAction(
|
||||
context,
|
||||
visitStatusStr: widget.visitStatusStr,
|
||||
);
|
||||
if (widget.visitStatusStr == 'A') {
|
||||
_model.statusColor = FlutterFlowTheme.of(context).primary;
|
||||
setState(() {});
|
||||
} else if ((widget.visitStatusStr == 'C') ||
|
||||
(widget.visitStatusStr == 'F') ||
|
||||
(widget.visitStatusStr == 'B') ||
|
||||
(widget.visitStatusStr == 'I')) {
|
||||
_model.statusColor = FlutterFlowTheme.of(context).error;
|
||||
setState(() {});
|
||||
} else {
|
||||
_model.statusColor = FlutterFlowTheme.of(context).warning;
|
||||
setState(() {});
|
||||
}
|
||||
});
|
||||
|
||||
_model.textController1 ??= TextEditingController(
|
||||
text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr);
|
||||
_model.textController1 ??=
|
||||
TextEditingController(text: widget.visitorStrList);
|
||||
_model.textFieldFocusNode1 ??= FocusNode();
|
||||
|
||||
_model.textController2 ??=
|
||||
|
@ -759,10 +767,7 @@ class _ViewVisitDetailWidgetState extends State<ViewVisitDetailWidget> {
|
|||
width: double.infinity,
|
||||
height: 35.0,
|
||||
decoration: BoxDecoration(
|
||||
color: valueOrDefault<Color>(
|
||||
_model.visitStatusColor,
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
color: _model.statusColor,
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(0.0),
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import '/application_components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
|
||||
import '/application_components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart';
|
||||
import '/application_components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
|
@ -35,23 +34,4 @@ class MenuComponentModel extends FlutterFlowModel<MenuComponentWidget> {
|
|||
Future changeMenuStyle(BuildContext context) async {
|
||||
isGrid = !isGrid;
|
||||
}
|
||||
|
||||
Future scheduleVisitOptAction(BuildContext context) async {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const OptionSelectionModalWidget(),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future registerVisitorOptAction(BuildContext context) async {
|
||||
context.pushNamed('registerVisitorPage');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,14 +50,6 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
await _model.changeMenuStyle(context);
|
||||
setState(() {});
|
||||
},
|
||||
registerVisitorAction: () async {
|
||||
await _model.registerVisitorOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
scheduleVisitAction: () async {
|
||||
await _model.scheduleVisitOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
);
|
||||
} else {
|
||||
|
@ -66,18 +58,10 @@ class _MenuComponentWidgetState extends State<MenuComponentWidget> {
|
|||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: MenuStaggeredViewComponentWidget(
|
||||
changeMenuStyleAction: () async {
|
||||
changeMenuStyle: () async {
|
||||
await _model.changeMenuStyle(context);
|
||||
setState(() {});
|
||||
},
|
||||
registerVisitorOptAction: () async {
|
||||
await _model.registerVisitorOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
scheduleVisitOptAction: () async {
|
||||
await _model.scheduleVisitOptAction(context);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'visit_history_component_widget.dart' show VisitHistoryComponentWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class VisitHistoryComponentModel
|
||||
extends FlutterFlowModel<VisitHistoryComponentWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {}
|
||||
}
|
|
@ -1,388 +0,0 @@
|
|||
import '/application_components/molecular_components/opt_modal/opt_modal_widget.dart';
|
||||
import '/application_components/templates_components/visit_details_modal/visit_details_modal_widget.dart';
|
||||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/flutter_flow/flutter_flow_icon_button.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/custom_functions.dart' as functions;
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'visit_history_component_model.dart';
|
||||
export 'visit_history_component_model.dart';
|
||||
|
||||
class VisitHistoryComponentWidget extends StatefulWidget {
|
||||
const VisitHistoryComponentWidget({
|
||||
super.key,
|
||||
this.parameter1,
|
||||
});
|
||||
|
||||
final FFUploadedFile? parameter1;
|
||||
|
||||
@override
|
||||
State<VisitHistoryComponentWidget> createState() =>
|
||||
_VisitHistoryComponentWidgetState();
|
||||
}
|
||||
|
||||
class _VisitHistoryComponentWidgetState
|
||||
extends State<VisitHistoryComponentWidget> {
|
||||
late VisitHistoryComponentModel _model;
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => VisitHistoryComponentModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
height: 900.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
FlutterFlowIconButton(
|
||||
borderColor: Colors.transparent,
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
icon: Icon(
|
||||
Icons.settings_sharp,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
size: 24.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const OptModalWidget(),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(14.0),
|
||||
child: FutureBuilder<ApiCallResponse>(
|
||||
future: PhpGroup.getVisitsCall.call(
|
||||
devUUID: FFAppState().devUUID,
|
||||
userUUID: FFAppState().userUUID,
|
||||
cliID: FFAppState().cliUUID,
|
||||
atividade: 'getVisitas',
|
||||
),
|
||||
builder: (context, snapshot) {
|
||||
// Customize what your widget looks like when it's loading.
|
||||
if (!snapshot.hasData) {
|
||||
return Center(
|
||||
child: SizedBox(
|
||||
width: 50.0,
|
||||
height: 50.0,
|
||||
child: SpinKitCircle(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
size: 50.0,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
final gridViewGetVisitsResponse = snapshot.data!;
|
||||
return Builder(
|
||||
builder: (context) {
|
||||
final visitHistory = (PhpGroup.getVisitsCall
|
||||
.visitasList(
|
||||
gridViewGetVisitsResponse.jsonBody,
|
||||
)
|
||||
?.toList() ??
|
||||
[])
|
||||
.take(10)
|
||||
.toList();
|
||||
return GridView.builder(
|
||||
padding: EdgeInsets.zero,
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
crossAxisSpacing: 10.0,
|
||||
mainAxisSpacing: 10.0,
|
||||
childAspectRatio: 1.0,
|
||||
),
|
||||
scrollDirection: Axis.vertical,
|
||||
itemCount: visitHistory.length,
|
||||
itemBuilder: (context, visitHistoryIndex) {
|
||||
final visitHistoryItem =
|
||||
visitHistory[visitHistoryIndex];
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(50.0),
|
||||
bottomRight: Radius.circular(50.0),
|
||||
topLeft: Radius.circular(25.0),
|
||||
topRight: Radius.circular(25.0),
|
||||
),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: valueOrDefault<Color>(
|
||||
() {
|
||||
if (functions.jsonToStr(getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VAW_STATUS''',
|
||||
)) ==
|
||||
'\"A\"') {
|
||||
return FlutterFlowTheme.of(context)
|
||||
.success;
|
||||
} else if (functions
|
||||
.jsonToStr(getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VAW_STATUS''',
|
||||
)) ==
|
||||
'\"C\"') {
|
||||
return FlutterFlowTheme.of(context)
|
||||
.error;
|
||||
} else if (functions
|
||||
.jsonToStr(getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VAW_STATUS''',
|
||||
)) ==
|
||||
'\"I\"') {
|
||||
return FlutterFlowTheme.of(context)
|
||||
.warning;
|
||||
} else {
|
||||
return FlutterFlowTheme.of(context)
|
||||
.primary;
|
||||
}
|
||||
}(),
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(10.0),
|
||||
bottomRight: Radius.circular(10.0),
|
||||
topLeft: Radius.circular(25.0),
|
||||
topRight: Radius.circular(25.0),
|
||||
),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: false,
|
||||
useSafeArea: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding:
|
||||
MediaQuery.viewInsetsOf(context),
|
||||
child: VisitDetailsModalWidget(
|
||||
visitStatusStr: getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VAW_STATUS
''',
|
||||
).toString(),
|
||||
visitStartDateStr: getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VAW_DTINICIO''',
|
||||
).toString(),
|
||||
visitEndDateStr: getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VAW_DTFIM''',
|
||||
).toString(),
|
||||
visitReasonStr: getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.MOT_DESCRICAO''',
|
||||
).toString(),
|
||||
visitLevelStr: getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.NAC_DESCRICAO''',
|
||||
).toString(),
|
||||
visitTempStr: getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VTE_UNICA
''',
|
||||
).toString(),
|
||||
visitObsStr: getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VAW_OBS''',
|
||||
).toString(),
|
||||
visitorImgPath:
|
||||
valueOrDefault<String>(
|
||||
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VTE_DOCUMENTO''',
|
||||
).toString()}&tipo=E',
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
),
|
||||
visitorStrList: getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VTE_DOCUMENTO''',
|
||||
).toString(),
|
||||
visitIdStr: getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VAW_ID''',
|
||||
).toString(),
|
||||
visitorJsonList: PhpGroup
|
||||
.getVisitsCall
|
||||
.visitasList(
|
||||
gridViewGetVisitsResponse
|
||||
.jsonBody,
|
||||
),
|
||||
updateToggleIdx: () async {
|
||||
setState(() {});
|
||||
},
|
||||
repeatVisitSchedule: () async {},
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(25.0),
|
||||
bottomRight: Radius.circular(25.0),
|
||||
topLeft: Radius.circular(25.0),
|
||||
topRight: Radius.circular(25.0),
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
fadeOutDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
imageUrl: valueOrDefault<String>(
|
||||
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VTE_DOCUMENTO''',
|
||||
).toString()}&tipo=E',
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
),
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Container(
|
||||
width: 200.0,
|
||||
height: 20.0,
|
||||
decoration: BoxDecoration(
|
||||
color: valueOrDefault<Color>(
|
||||
() {
|
||||
if (functions.jsonToStr(getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VAW_STATUS''',
|
||||
)) ==
|
||||
'\"A\"') {
|
||||
return FlutterFlowTheme.of(context)
|
||||
.success;
|
||||
} else if (functions
|
||||
.jsonToStr(getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VAW_STATUS''',
|
||||
)) ==
|
||||
'\"C\"') {
|
||||
return FlutterFlowTheme.of(context)
|
||||
.error;
|
||||
} else if (functions
|
||||
.jsonToStr(getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VAW_STATUS''',
|
||||
)) ==
|
||||
'\"I\"') {
|
||||
return FlutterFlowTheme.of(context)
|
||||
.warning;
|
||||
} else {
|
||||
return FlutterFlowTheme.of(context)
|
||||
.primary;
|
||||
}
|
||||
}(),
|
||||
FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
borderRadius: const BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(0.0),
|
||||
topLeft: Radius.circular(25.0),
|
||||
topRight: Radius.circular(25.0),
|
||||
),
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
getJsonField(
|
||||
visitHistoryItem,
|
||||
r'''$.VTE_NOME''',
|
||||
).toString(),
|
||||
textAlign: TextAlign.center,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.info,
|
||||
fontSize: 12.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -5,7 +5,6 @@ import '/flutter_flow/flutter_flow_icon_button.dart';
|
|||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -326,19 +325,8 @@ class _VisitorSearchComponentWidgetState
|
|||
ClipRRect(
|
||||
borderRadius:
|
||||
BorderRadius.circular(40.0),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
fadeOutDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
imageUrl:
|
||||
valueOrDefault<String>(
|
||||
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
|
||||
visitorItem,
|
||||
r'''$.VTE_DOCUMENTO''',
|
||||
).toString()}&tipo=E',
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
),
|
||||
child: Image.asset(
|
||||
'assets/images/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
width: 60.0,
|
||||
height: 60.0,
|
||||
fit: BoxFit.cover,
|
||||
|
|
|
@ -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,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -52,7 +52,7 @@ class _ForgotPasswordPageWidgetState extends State<ForgotPasswordPageWidget> {
|
|||
children: [
|
||||
if (isWeb == false)
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(-1.0, 1.0),
|
||||
alignment: const AlignmentDirectional(-1.0, -1.0),
|
||||
child: FlutterFlowIconButton(
|
||||
borderColor: Colors.transparent,
|
||||
borderRadius: 30.0,
|
||||
|
@ -141,7 +141,7 @@ class _ForgotPasswordPageWidgetState extends State<ForgotPasswordPageWidget> {
|
|||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'gfvplb0h' /* ESQUECEU SUA SENHA? */,
|
||||
'lpduiuif' /* ESQUECEU SUA SENHA? */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
|
@ -158,7 +158,7 @@ class _ForgotPasswordPageWidgetState extends State<ForgotPasswordPageWidget> {
|
|||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'azssgpdi' /* Não se preucupe nós vamos te a... */,
|
||||
'8t05j98w' /* Não se preucupe nós vamos te a... */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
|
@ -182,7 +182,7 @@ class _ForgotPasswordPageWidgetState extends State<ForgotPasswordPageWidget> {
|
|||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'0o139961' /* Email */,
|
||||
'4gcoci7a' /* Email */,
|
||||
),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
|
@ -195,7 +195,7 @@ class _ForgotPasswordPageWidgetState extends State<ForgotPasswordPageWidget> {
|
|||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'aanw1fp3' /* digite o seu email..... */,
|
||||
'a7p2iikz' /* digite o seu email..... */,
|
||||
),
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
|
@ -296,7 +296,7 @@ class _ForgotPasswordPageWidgetState extends State<ForgotPasswordPageWidget> {
|
|||
if (shouldSetState) setState(() {});
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'e7hdgc4q' /* Enviar */,
|
||||
'z9ghb8dz' /* Enviar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 270.0,
|
|
@ -14,7 +14,14 @@ import 'home_page_model.dart';
|
|||
export 'home_page_model.dart';
|
||||
|
||||
class HomePageWidget extends StatefulWidget {
|
||||
const HomePageWidget({super.key});
|
||||
const HomePageWidget({
|
||||
super.key,
|
||||
required this.userUUID,
|
||||
required this.devUUID,
|
||||
});
|
||||
|
||||
final String? userUUID;
|
||||
final String? devUUID;
|
||||
|
||||
@override
|
||||
State<HomePageWidget> createState() => _HomePageWidgetState();
|
||||
|
@ -829,16 +836,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
FFAppState().isLogged = false;
|
||||
setState(() {});
|
||||
|
||||
context.goNamed(
|
||||
'onBoardingPage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.scale,
|
||||
alignment: Alignment.bottomCenter,
|
||||
),
|
||||
},
|
||||
);
|
||||
context.pushNamed('WelcomePage');
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'xx0db4wi' /* Sair */,
|
||||
|
@ -846,7 +844,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
options: FFButtonOptions(
|
||||
height: 40.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: const Color(0x00D70000),
|
||||
|
@ -900,7 +898,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
Expanded(
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
height: 120.0,
|
||||
decoration: const BoxDecoration(
|
||||
color: Color(0xFF1AAB5F),
|
||||
),
|
||||
|
@ -909,9 +907,8 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Container(
|
||||
height: 50.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
|
@ -935,7 +932,7 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
icon: const Icon(
|
||||
Icons.menu_rounded,
|
||||
color: Colors.white,
|
||||
size: 28.0,
|
||||
size: 34.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
scaffoldKey.currentState!
|
||||
|
@ -1002,35 +999,10 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: 50.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(1.0, 1.0),
|
||||
child: FlutterFlowIconButton(
|
||||
borderColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
fillColor: FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
icon: Icon(
|
||||
Icons.notifications_sharp,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).info,
|
||||
size: 24.0,
|
||||
),
|
||||
onPressed: () {
|
||||
print('IconButton pressed ...');
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 100.0,
|
||||
height: 100.0,
|
||||
decoration: const BoxDecoration(),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'sign_in_component_widget.dart' show SignInComponentWidget;
|
||||
import 'login_page_widget.dart' show LoginPageWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SignInComponentModel extends FlutterFlowModel<SignInComponentWidget> {
|
||||
/// State fields for stateful widgets in this component.
|
||||
class LoginPageModel extends FlutterFlowModel<LoginPageWidget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// State field(s) for emailAddress widget.
|
||||
FocusNode? emailAddressFocusNode;
|
||||
TextEditingController? emailAddressTextController;
|
||||
|
@ -14,6 +16,8 @@ class SignInComponentModel extends FlutterFlowModel<SignInComponentWidget> {
|
|||
TextEditingController? passwordTextController;
|
||||
late bool passwordVisibility;
|
||||
String? Function(BuildContext, String?)? passwordTextControllerValidator;
|
||||
// Stores action output result for [Backend Call - API (login)] action in signInButtonLoginForm widget.
|
||||
ApiCallResponse? smallDisplayApi;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
|
@ -22,6 +26,7 @@ class SignInComponentModel extends FlutterFlowModel<SignInComponentWidget> {
|
|||
|
||||
@override
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
emailAddressFocusNode?.dispose();
|
||||
emailAddressTextController?.dispose();
|
||||
|
|
@ -1,12 +1,15 @@
|
|||
import '/application_components/molecular_components/throw_exception/throw_exception_widget.dart';
|
||||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/flutter_flow/flutter_flow_animations.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||
import '/actions/actions.dart' as action_blocks;
|
||||
import '/flutter_flow/random_data_util.dart' as random_data;
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'login_page_model.dart';
|
||||
export 'login_page_model.dart';
|
||||
|
||||
|
@ -88,6 +91,8 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
|
@ -141,26 +146,28 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
|
|||
child: Text(
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'0113wf5c' /* VAMOS LA! ENTRE COM A SUA CONT... */,
|
||||
'uem0mca5' /* VAMOS LA! ENTRE COM A SUA CONT... */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.displaySmall
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.normal,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -236,7 +243,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
|
|||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'f2go5a71' /* Email */,
|
||||
'90ls8ppo' /* Email */,
|
||||
),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(
|
||||
|
@ -364,7 +371,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
|
|||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'paon3y0v' /* Senha */,
|
||||
'rvlumyaw' /* Senha */,
|
||||
),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(
|
||||
|
@ -507,21 +514,182 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
|
|||
child: FFButtonWidget(
|
||||
onPressed:
|
||||
() async {
|
||||
await action_blocks
|
||||
.singInActionApp(
|
||||
context,
|
||||
emailAdress: _model
|
||||
.emailAddressTextController
|
||||
.text,
|
||||
password: _model
|
||||
.passwordTextController
|
||||
.text,
|
||||
);
|
||||
var shouldSetState =
|
||||
false;
|
||||
await Future
|
||||
.wait([
|
||||
Future(
|
||||
() async {
|
||||
FFAppState()
|
||||
.email =
|
||||
_model
|
||||
.emailAddressTextController
|
||||
.text;
|
||||
setState(
|
||||
() {});
|
||||
}),
|
||||
Future(
|
||||
() async {
|
||||
FFAppState()
|
||||
.passwd =
|
||||
_model
|
||||
.passwordTextController
|
||||
.text;
|
||||
setState(
|
||||
() {});
|
||||
}),
|
||||
]);
|
||||
if ((FFAppState()
|
||||
.email !=
|
||||
'') &&
|
||||
(FFAppState()
|
||||
.passwd !=
|
||||
'')) {
|
||||
FFAppState()
|
||||
.devUUID =
|
||||
random_data
|
||||
.randomString(
|
||||
36,
|
||||
36,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
);
|
||||
setState(() {});
|
||||
_model.smallDisplayApi =
|
||||
await PhpGroup
|
||||
.loginCall
|
||||
.call(
|
||||
email:
|
||||
FFAppState()
|
||||
.email,
|
||||
password:
|
||||
FFAppState()
|
||||
.passwd,
|
||||
uuid: FFAppState()
|
||||
.devUUID,
|
||||
type: FFAppState()
|
||||
.device,
|
||||
description:
|
||||
'',
|
||||
);
|
||||
shouldSetState =
|
||||
true;
|
||||
FFAppState()
|
||||
.userUUID =
|
||||
PhpGroup
|
||||
.loginCall
|
||||
.userUUID(
|
||||
(_model.smallDisplayApi
|
||||
?.jsonBody ??
|
||||
''),
|
||||
)!;
|
||||
setState(() {});
|
||||
if (PhpGroup
|
||||
.loginCall
|
||||
.error(
|
||||
(_model.smallDisplayApi
|
||||
?.jsonBody ??
|
||||
''),
|
||||
) ==
|
||||
false) {
|
||||
FFAppState()
|
||||
.isLogged =
|
||||
true;
|
||||
setState(
|
||||
() {});
|
||||
|
||||
context
|
||||
.goNamed(
|
||||
'homePage',
|
||||
queryParameters:
|
||||
{
|
||||
'userUUID':
|
||||
serializeParam(
|
||||
FFAppState()
|
||||
.userUUID,
|
||||
ParamType
|
||||
.String,
|
||||
),
|
||||
'devUUID':
|
||||
serializeParam(
|
||||
FFAppState()
|
||||
.devUUID,
|
||||
ParamType
|
||||
.String,
|
||||
),
|
||||
}.withoutNulls,
|
||||
extra: <String,
|
||||
dynamic>{
|
||||
kTransitionInfoKey:
|
||||
const TransitionInfo(
|
||||
hasTransition:
|
||||
true,
|
||||
transitionType:
|
||||
PageTransitionType.fade,
|
||||
),
|
||||
},
|
||||
);
|
||||
} else {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled:
|
||||
true,
|
||||
backgroundColor:
|
||||
Colors
|
||||
.transparent,
|
||||
enableDrag:
|
||||
false,
|
||||
context:
|
||||
context,
|
||||
builder:
|
||||
(context) {
|
||||
return GestureDetector(
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child:
|
||||
Padding(
|
||||
padding:
|
||||
MediaQuery.viewInsetsOf(context),
|
||||
child:
|
||||
ThrowExceptionWidget(
|
||||
msg:
|
||||
PhpGroup.loginCall.msg(
|
||||
(_model.smallDisplayApi?.jsonBody ?? ''),
|
||||
)!,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) =>
|
||||
safeSetState(
|
||||
() {}));
|
||||
|
||||
setState(() {
|
||||
_model
|
||||
.emailAddressTextController
|
||||
?.clear();
|
||||
_model
|
||||
.passwordTextController
|
||||
?.clear();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (shouldSetState) {
|
||||
setState(
|
||||
() {});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (shouldSetState) {
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
text: FFLocalizations
|
||||
.of(context)
|
||||
.getText(
|
||||
'wmbzwstw' /* Entrar */,
|
||||
'2d3903lt' /* Entrar */,
|
||||
),
|
||||
options:
|
||||
FFButtonOptions(
|
||||
|
@ -596,7 +764,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
|
|||
text: FFLocalizations
|
||||
.of(context)
|
||||
.getText(
|
||||
'j8567afe' /* Cadastrar */,
|
||||
'zj6pyujp' /* Cadastrar */,
|
||||
),
|
||||
options:
|
||||
FFButtonOptions(
|
||||
|
@ -682,7 +850,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
|
|||
text: FFLocalizations
|
||||
.of(context)
|
||||
.getText(
|
||||
'y3wd9q18' /* Entrar */,
|
||||
'iqhyif1d' /* Entrar */,
|
||||
),
|
||||
options:
|
||||
FFButtonOptions(
|
||||
|
@ -763,7 +931,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
|
|||
text: FFLocalizations
|
||||
.of(context)
|
||||
.getText(
|
||||
'j6ufb6sq' /* Cadastrar */,
|
||||
'5x5bp2u1' /* Cadastrar */,
|
||||
),
|
||||
options:
|
||||
FFButtonOptions(
|
||||
|
@ -860,7 +1028,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
|
|||
text: FFLocalizations
|
||||
.of(context)
|
||||
.getText(
|
||||
'h85112qs' /* Você esqueceu a sua senha? */,
|
||||
'1fqjz9q7' /* Você esqueceu a sua senha? */,
|
||||
),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme
|
||||
|
@ -872,7 +1040,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
|
|||
text: FFLocalizations
|
||||
.of(context)
|
||||
.getText(
|
||||
'di48hdaj' /* Recupere aqui */,
|
||||
'7miyd406' /* Recupere aqui */,
|
||||
),
|
||||
style: FlutterFlowTheme
|
||||
.of(context)
|
||||
|
@ -938,7 +1106,7 @@ class _LoginPageWidgetState extends State<LoginPageWidget>
|
|||
),
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'gx2fp6zq' /* Termo de Uso */,
|
||||
'63xv5ewj' /* Termo de Uso */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
|
@ -1,3 +1,4 @@
|
|||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'register_page_widget.dart' show RegisterPageWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -32,6 +33,8 @@ class RegisterPageModel extends FlutterFlowModel<RegisterPageWidget> {
|
|||
late bool passwordRegisterFormVisibility;
|
||||
String? Function(BuildContext, String?)?
|
||||
passwordRegisterFormTextControllerValidator;
|
||||
// Stores action output result for [Backend Call - API (register)] action in SignUpButtonRegisterForm widget.
|
||||
ApiCallResponse? registerCall;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
|
@ -1,15 +1,15 @@
|
|||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/flutter_flow/flutter_flow_animations.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||
import '/actions/actions.dart' as action_blocks;
|
||||
import '/flutter_flow/random_data_util.dart' as random_data;
|
||||
import 'package:easy_debounce/easy_debounce.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'register_page_model.dart';
|
||||
export 'register_page_model.dart';
|
||||
|
||||
|
@ -108,8 +108,6 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () => _model.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(_model.unfocusNode)
|
||||
|
@ -160,7 +158,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
|
|||
padding: const EdgeInsets.all(4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'2d8uulm3' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
||||
'oxy0n1p4' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
|
@ -173,7 +171,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
|
|||
.primaryText,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontWeight: FontWeight.normal,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
|
@ -256,7 +254,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
|
|||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'8kjhi406' /* Nome */,
|
||||
'w0y3fz89' /* Nome */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
|
@ -398,7 +396,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
|
|||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'ro4zkkxp' /* Email */,
|
||||
'4bfdpd0o' /* Email */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
|
@ -541,7 +539,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
|
|||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'lzgobioa' /* Senha */,
|
||||
'byjglkpk' /* Senha */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme
|
||||
.of(context)
|
||||
|
@ -667,25 +665,171 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
|
|||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
await action_blocks
|
||||
.signUpActionApp(
|
||||
context,
|
||||
name: _model
|
||||
.nameRegisterFormTextController
|
||||
.text,
|
||||
passwd: _model
|
||||
.passwordRegisterFormTextController
|
||||
.text,
|
||||
email: _model
|
||||
.emailRegisterFormTextController
|
||||
.text,
|
||||
device: FFAppState().device,
|
||||
);
|
||||
await Future.wait([
|
||||
Future(() async {
|
||||
setState(() {
|
||||
_model.emailRegisterFormTextController
|
||||
?.text =
|
||||
_model
|
||||
.emailRegisterFormTextController
|
||||
.text;
|
||||
});
|
||||
}),
|
||||
Future(() async {
|
||||
setState(() {
|
||||
_model.passwordRegisterFormTextController
|
||||
?.text =
|
||||
_model
|
||||
.passwordRegisterFormTextController
|
||||
.text;
|
||||
});
|
||||
}),
|
||||
Future(() async {
|
||||
setState(() {
|
||||
_model.nameRegisterFormTextController
|
||||
?.text =
|
||||
_model
|
||||
.nameRegisterFormTextController
|
||||
.text;
|
||||
});
|
||||
}),
|
||||
]);
|
||||
if ((_model.emailRegisterFormTextController.text != '') &&
|
||||
(_model.passwordRegisterFormTextController
|
||||
.text !=
|
||||
'') &&
|
||||
(_model.nameRegisterFormTextController
|
||||
.text !=
|
||||
'')) {
|
||||
_model.registerCall =
|
||||
await PhpGroup
|
||||
.registerCall
|
||||
.call(
|
||||
name: _model
|
||||
.nameRegisterFormTextController
|
||||
.text,
|
||||
password: _model
|
||||
.passwordRegisterFormTextController
|
||||
.text,
|
||||
email: _model
|
||||
.emailRegisterFormTextController
|
||||
.text,
|
||||
token: random_data
|
||||
.randomString(
|
||||
36,
|
||||
36,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
),
|
||||
uuid: random_data
|
||||
.randomString(
|
||||
36,
|
||||
36,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
),
|
||||
tipo: _model.device,
|
||||
descricao: random_data
|
||||
.randomString(
|
||||
36,
|
||||
36,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
);
|
||||
if (PhpGroup.registerCall
|
||||
.error(
|
||||
(_model.registerCall
|
||||
?.jsonBody ??
|
||||
''),
|
||||
) ==
|
||||
false) {
|
||||
context.goNamed(
|
||||
'LoginPage',
|
||||
queryParameters: {
|
||||
'device':
|
||||
serializeParam(
|
||||
'',
|
||||
ParamType.String,
|
||||
),
|
||||
}.withoutNulls,
|
||||
extra: <String,
|
||||
dynamic>{
|
||||
kTransitionInfoKey:
|
||||
const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType:
|
||||
PageTransitionType
|
||||
.fade,
|
||||
),
|
||||
},
|
||||
);
|
||||
} else {
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder:
|
||||
(alertDialogContext) {
|
||||
return AlertDialog(
|
||||
title:
|
||||
const Text('ERROR2'),
|
||||
content:
|
||||
const Text('ERROR2'),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () =>
|
||||
Navigator.pop(
|
||||
alertDialogContext),
|
||||
child: const Text(
|
||||
'ERROR2 '),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
setState(() {
|
||||
_model
|
||||
.passwordRegisterFormTextController
|
||||
?.clear();
|
||||
_model
|
||||
.emailRegisterFormTextController
|
||||
?.clear();
|
||||
_model
|
||||
.nameRegisterFormTextController
|
||||
?.clear();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder:
|
||||
(alertDialogContext) {
|
||||
return AlertDialog(
|
||||
title: const Text('ERROR1'),
|
||||
content:
|
||||
const Text('ERROR1'),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () =>
|
||||
Navigator.pop(
|
||||
alertDialogContext),
|
||||
child: const Text(
|
||||
'ERROR1 '),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
setState(() {});
|
||||
},
|
||||
text:
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'c7sfyeh8' /* Cadastrar-se */,
|
||||
'w9vrsnmf' /* Cadastrar-se */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
|
@ -765,7 +909,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
|
|||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'jglpa1tr' /* Você já tem uma conta? */,
|
||||
'zep60lcd' /* Você já tem uma conta? */,
|
||||
),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme
|
||||
|
@ -778,7 +922,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
|
|||
FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'hfcm0td9' /* Clique aqui */,
|
||||
'tl8k1ld9' /* Clique aqui */,
|
||||
),
|
||||
style:
|
||||
FlutterFlowTheme.of(
|
||||
|
@ -836,7 +980,7 @@ class _RegisterPageWidgetState extends State<RegisterPageWidget>
|
|||
),
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'c3kno4t9' /* Termo de Uso */,
|
||||
'dbtzii7i' /* Termo de Uso */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
|
@ -14,7 +14,14 @@ import 'register_visitor_page_model.dart';
|
|||
export 'register_visitor_page_model.dart';
|
||||
|
||||
class RegisterVisitorPageWidget extends StatefulWidget {
|
||||
const RegisterVisitorPageWidget({super.key});
|
||||
const RegisterVisitorPageWidget({
|
||||
super.key,
|
||||
required this.userUUID,
|
||||
required this.devUUID,
|
||||
});
|
||||
|
||||
final String? userUUID;
|
||||
final String? devUUID;
|
||||
|
||||
@override
|
||||
State<RegisterVisitorPageWidget> createState() =>
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
import '/components/select_header_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/form_field_controller.dart';
|
||||
import 'schedule_complete_visit_page_widget.dart'
|
||||
show ScheduleCompleteVisitPageWidget;
|
||||
import 'package:carousel_slider/carousel_slider.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ScheduleCompleteVisitPageModel
|
||||
extends FlutterFlowModel<ScheduleCompleteVisitPageWidget> {
|
||||
/// Local state fields for this page.
|
||||
|
||||
bool toggleIdx = true;
|
||||
|
||||
List<dynamic> visitorJsonList = [];
|
||||
void addToVisitorJsonList(dynamic item) => visitorJsonList.add(item);
|
||||
void removeFromVisitorJsonList(dynamic item) => visitorJsonList.remove(item);
|
||||
|
@ -24,10 +26,11 @@ class ScheduleCompleteVisitPageModel
|
|||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// Model for selectHeaderComponent component.
|
||||
late SelectHeaderComponentModel selectHeaderComponentModel;
|
||||
// Stores action output result for [Action Block - toggleCurrentSelectionHeader] action in selectHeaderComponent widget.
|
||||
bool? toggleIndexValue;
|
||||
// State field(s) for Carousel widget.
|
||||
CarouselController? carouselController;
|
||||
|
||||
int carouselCurrentIndex = 1;
|
||||
|
||||
// State field(s) for TextField widget.
|
||||
FocusNode? textFieldFocusNode1;
|
||||
TextEditingController? textController1;
|
||||
|
@ -52,15 +55,11 @@ class ScheduleCompleteVisitPageModel
|
|||
String? Function(BuildContext, String?)? textController3Validator;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
selectHeaderComponentModel =
|
||||
createModel(context, () => SelectHeaderComponentModel());
|
||||
}
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
selectHeaderComponentModel.dispose();
|
||||
textFieldFocusNode1?.dispose();
|
||||
textController1?.dispose();
|
||||
|
||||
|
@ -70,23 +69,4 @@ class ScheduleCompleteVisitPageModel
|
|||
textFieldFocusNode3?.dispose();
|
||||
textController3?.dispose();
|
||||
}
|
||||
|
||||
/// Action blocks.
|
||||
Future getVisitorsActionPage(
|
||||
BuildContext context, {
|
||||
List<dynamic>? visitorsJsonList,
|
||||
}) async {
|
||||
visitorJsonList = visitorsJsonList!.toList().cast<dynamic>();
|
||||
}
|
||||
|
||||
Future<bool> toggleCurrentSelectionHeader(
|
||||
BuildContext context, {
|
||||
required bool? toggleIndexValue,
|
||||
}) async {
|
||||
if (toggleIndexValue == true) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,8 +3,6 @@ import '/application_components/organism_components/bottom_arrow_linked_locals_c
|
|||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/flutter_flow_widgets.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -191,92 +189,93 @@ class _ScheduleProvisionalVisitPageWidgetState
|
|||
),
|
||||
),
|
||||
),
|
||||
Stack(
|
||||
children: [
|
||||
FFButtonWidget(
|
||||
onPressed: () async {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => _model
|
||||
.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context)
|
||||
.requestFocus(
|
||||
_model.unfocusNode)
|
||||
: FocusScope.of(context)
|
||||
.unfocus(),
|
||||
child: Padding(
|
||||
padding: MediaQuery.viewInsetsOf(
|
||||
context),
|
||||
child:
|
||||
const BottomArrowLinkedLocalsComponentWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
text: FFAppState().local,
|
||||
options: FFButtonOptions(
|
||||
width: 320.0,
|
||||
height: 51.0,
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
24.0, 0.0, 24.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
textStyle: FlutterFlowTheme.of(context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily,
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.titleSmallFamily),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
25.0, 0.0, 25.0, 0.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 GestureDetector(
|
||||
onTap: () => _model
|
||||
.unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context)
|
||||
.requestFocus(
|
||||
_model.unfocusNode)
|
||||
: FocusScope.of(context)
|
||||
.unfocus(),
|
||||
child: Padding(
|
||||
padding: MediaQuery.viewInsetsOf(
|
||||
context),
|
||||
child:
|
||||
const BottomArrowLinkedLocalsComponentWidget(),
|
||||
),
|
||||
borderSide: BorderSide(
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 51.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.secondaryBackground,
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
border: Border.all(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
width: 0.3,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(24.0),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
20.0, 10.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: 35.0,
|
||||
height: 35.0,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: CachedNetworkImage(
|
||||
fadeInDuration:
|
||||
const Duration(milliseconds: 100),
|
||||
fadeOutDuration:
|
||||
const Duration(milliseconds: 100),
|
||||
imageUrl: valueOrDefault<String>(
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png',
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Container(
|
||||
width: 35.0,
|
||||
height: 35.0,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Image.network(
|
||||
valueOrDefault<String>(
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png',
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
Text(
|
||||
FFAppState().local,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
].addToEnd(const SizedBox(height: 20.0)),
|
||||
),
|
||||
|
|
|
@ -36,13 +36,16 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
|
|||
if (FFAppState().isLogged == true) {
|
||||
context.pushNamed(
|
||||
'homePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.fade,
|
||||
duration: Duration(milliseconds: 0),
|
||||
queryParameters: {
|
||||
'userUUID': serializeParam(
|
||||
FFAppState().userUUID,
|
||||
ParamType.String,
|
||||
),
|
||||
},
|
||||
'devUUID': serializeParam(
|
||||
FFAppState().devUUID,
|
||||
ParamType.String,
|
||||
),
|
||||
}.withoutNulls,
|
||||
);
|
||||
} else {
|
||||
if (isAndroid == true) {
|
||||
|
@ -144,7 +147,7 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
|
|||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'xflxvs9y' /* UMA EXPERIÊCIA COMPLETA */,
|
||||
'3pl41wkq' /* UMA EXPERIÊCIA COMPLETA */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
|
@ -164,7 +167,7 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
|
|||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'5a86wzd1' /* COM CONFORTO ONDE VOCÊ ESTIVER... */,
|
||||
'13nhoxpg' /* COM CONFORTO ONDE VOCÊ ESTIVER... */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
|
@ -262,7 +265,7 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
|
|||
text:
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'65nuva6j' /* Entrar */,
|
||||
'zt5uc5g5' /* Entrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
|
@ -320,7 +323,7 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
|
|||
text:
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'9u6oaw01' /* Cadastrar */,
|
||||
'jteakpo0' /* Cadastrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
|
@ -395,7 +398,7 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
|
|||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'd1qem43w' /* Entrar */,
|
||||
'qoc86gvo' /* Entrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
|
@ -456,7 +459,7 @@ class _WelcomePageWidgetState extends State<WelcomePageWidget>
|
|||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'bhowzv2u' /* Cadastrar */,
|
||||
'p5tgmj0c' /* Cadastrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
|
@ -21,7 +21,6 @@ class PhpGroup {
|
|||
static PostScheduleVisitorCall postScheduleVisitorCall =
|
||||
PostScheduleVisitorCall();
|
||||
static PostScheduleVisitCall postScheduleVisitCall = PostScheduleVisitCall();
|
||||
static DebugCallCall debugCallCall = DebugCallCall();
|
||||
static GetScheduleVisitCall getScheduleVisitCall = GetScheduleVisitCall();
|
||||
static GetDadosCall getDadosCall = GetDadosCall();
|
||||
static GetVisitorByDocCall getVisitorByDocCall = GetVisitorByDocCall();
|
||||
|
@ -30,6 +29,7 @@ class PhpGroup {
|
|||
PostProvVisitSchedulingCall();
|
||||
static GetVisitsCall getVisitsCall = GetVisitsCall();
|
||||
static DeleteVisitCall deleteVisitCall = DeleteVisitCall();
|
||||
static DebugCall debugCall = DebugCall();
|
||||
}
|
||||
|
||||
class LoginCall {
|
||||
|
@ -341,7 +341,7 @@ class PostScheduleVisitCall {
|
|||
Future<ApiCallResponse> call({
|
||||
String? devUUID = '',
|
||||
String? userUUID = '',
|
||||
String? cliID = '',
|
||||
String? cliUUID = '',
|
||||
String? atividade = '',
|
||||
String? devDesc = '',
|
||||
String? idVisitante = '',
|
||||
|
@ -364,64 +364,7 @@ class PostScheduleVisitCall {
|
|||
params: {
|
||||
'devUUID': devUUID,
|
||||
'userUUID': userUUID,
|
||||
'cliID': cliID,
|
||||
'atividade': atividade,
|
||||
'idVisitante': idVisitante,
|
||||
'dtInicio': dtInicio,
|
||||
'dtFim': dtFim,
|
||||
'unica': unica,
|
||||
'idMotivo': idMotivo,
|
||||
'idNAC': idNAC,
|
||||
'obs': obs,
|
||||
'DevDesc': devDesc,
|
||||
},
|
||||
bodyType: BodyType.X_WWW_FORM_URL_ENCODED,
|
||||
returnBody: true,
|
||||
encodeBodyUtf8: false,
|
||||
decodeUtf8: false,
|
||||
cache: false,
|
||||
alwaysAllowBody: false,
|
||||
);
|
||||
}
|
||||
|
||||
bool? error(dynamic response) => castToType<bool>(getJsonField(
|
||||
response,
|
||||
r'''$.error''',
|
||||
));
|
||||
String? errorMsg(dynamic response) => castToType<String>(getJsonField(
|
||||
response,
|
||||
r'''$.error_msg''',
|
||||
));
|
||||
}
|
||||
|
||||
class DebugCallCall {
|
||||
Future<ApiCallResponse> call({
|
||||
String? devUUID = '',
|
||||
String? userUUID = '',
|
||||
String? cliID = '',
|
||||
String? atividade = '',
|
||||
String? devDesc = '',
|
||||
String? idVisitante = '',
|
||||
String? dtInicio = '',
|
||||
String? dtFim = '',
|
||||
String? unica = '',
|
||||
int? idMotivo,
|
||||
int? idNAC,
|
||||
String? obs = '',
|
||||
}) async {
|
||||
final baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
callName: 'debugCall',
|
||||
apiUrl: '$baseUrl/jonh.php',
|
||||
callType: ApiCallType.POST,
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
params: {
|
||||
'devUUID': devUUID,
|
||||
'userUUID': userUUID,
|
||||
'cliID': cliID,
|
||||
'cliID': cliUUID,
|
||||
'atividade': atividade,
|
||||
'DevDesc': devDesc,
|
||||
'idVisitante': idVisitante,
|
||||
|
@ -1420,6 +1363,26 @@ class DeleteVisitCall {
|
|||
));
|
||||
}
|
||||
|
||||
class DebugCall {
|
||||
Future<ApiCallResponse> call() async {
|
||||
final baseUrl = PhpGroup.getBaseUrl();
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
callName: 'debug',
|
||||
apiUrl: '$baseUrl/jonh.php',
|
||||
callType: ApiCallType.POST,
|
||||
headers: {},
|
||||
params: {},
|
||||
bodyType: BodyType.JSON,
|
||||
returnBody: true,
|
||||
encodeBodyUtf8: false,
|
||||
decodeUtf8: false,
|
||||
cache: false,
|
||||
alwaysAllowBody: false,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// End PHP Group Code
|
||||
|
||||
class ApiPagingParams {
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
import 'package:cloud_functions/cloud_functions.dart';
|
||||
|
||||
Future<Map<String, dynamic>> makeCloudCall(
|
||||
String callName,
|
||||
Map<String, dynamic> input,
|
||||
) async {
|
||||
try {
|
||||
final response = await FirebaseFunctions.instance
|
||||
.httpsCallable(callName, options: HttpsCallableOptions())
|
||||
.call(input);
|
||||
return response.data is Map
|
||||
? Map<String, dynamic>.from(response.data as Map)
|
||||
: {};
|
||||
} on FirebaseFunctionsException catch (e) {
|
||||
print(
|
||||
'Cloud call error!\n'
|
||||
'Code: ${e.code}\n'
|
||||
'Details: ${e.details}\n'
|
||||
'Message: ${e.message}',
|
||||
);
|
||||
return {};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,154 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'serialization_util.dart';
|
||||
import '../backend.dart';
|
||||
import '../../flutter_flow/flutter_flow_theme.dart';
|
||||
import '../../flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
final _handledMessageIds = <String?>{};
|
||||
|
||||
class PushNotificationsHandler extends StatefulWidget {
|
||||
const PushNotificationsHandler({super.key, required this.child});
|
||||
|
||||
final Widget child;
|
||||
|
||||
@override
|
||||
_PushNotificationsHandlerState createState() =>
|
||||
_PushNotificationsHandlerState();
|
||||
}
|
||||
|
||||
class _PushNotificationsHandlerState extends State<PushNotificationsHandler> {
|
||||
bool _loading = false;
|
||||
|
||||
Future handleOpenedPushNotification() async {
|
||||
if (isWeb) {
|
||||
return;
|
||||
}
|
||||
|
||||
final notification = await FirebaseMessaging.instance.getInitialMessage();
|
||||
if (notification != null) {
|
||||
await _handlePushNotification(notification);
|
||||
}
|
||||
FirebaseMessaging.onMessageOpenedApp.listen(_handlePushNotification);
|
||||
}
|
||||
|
||||
Future _handlePushNotification(RemoteMessage message) async {
|
||||
if (_handledMessageIds.contains(message.messageId)) {
|
||||
return;
|
||||
}
|
||||
_handledMessageIds.add(message.messageId);
|
||||
|
||||
if (mounted) {
|
||||
setState(() => _loading = true);
|
||||
}
|
||||
try {
|
||||
final initialPageName = message.data['initialPageName'] as String;
|
||||
final initialParameterData = getInitialParameterData(message.data);
|
||||
final parametersBuilder = parametersBuilderMap[initialPageName];
|
||||
if (parametersBuilder != null) {
|
||||
final parameterData = await parametersBuilder(initialParameterData);
|
||||
context.pushNamed(
|
||||
initialPageName,
|
||||
pathParameters: parameterData.pathParameters,
|
||||
extra: parameterData.extra,
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
print('Error: $e');
|
||||
} finally {
|
||||
if (mounted) {
|
||||
setState(() => _loading = false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
handleOpenedPushNotification();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => _loading
|
||||
? Container(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
child: Image.asset(
|
||||
'assets/images/logo.svg',
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)
|
||||
: widget.child;
|
||||
}
|
||||
|
||||
class ParameterData {
|
||||
const ParameterData(
|
||||
{this.requiredParams = const {}, this.allParams = const {}});
|
||||
final Map<String, String?> requiredParams;
|
||||
final Map<String, dynamic> allParams;
|
||||
|
||||
Map<String, String> get pathParameters => Map.fromEntries(
|
||||
requiredParams.entries
|
||||
.where((e) => e.value != null)
|
||||
.map((e) => MapEntry(e.key, e.value!)),
|
||||
);
|
||||
Map<String, dynamic> get extra => Map.fromEntries(
|
||||
allParams.entries.where((e) => e.value != null),
|
||||
);
|
||||
|
||||
static Future<ParameterData> Function(Map<String, dynamic>) none() =>
|
||||
(data) async => const ParameterData();
|
||||
}
|
||||
|
||||
final parametersBuilderMap =
|
||||
<String, Future<ParameterData> Function(Map<String, dynamic>)>{
|
||||
'LoginPage': (data) async => ParameterData(
|
||||
allParams: {
|
||||
'device': getParameter<String>(data, 'device'),
|
||||
},
|
||||
),
|
||||
'ForgotPasswordPage': ParameterData.none(),
|
||||
'homePage': (data) async => ParameterData(
|
||||
allParams: {
|
||||
'userUUID': getParameter<String>(data, 'userUUID'),
|
||||
'devUUID': getParameter<String>(data, 'devUUID'),
|
||||
},
|
||||
),
|
||||
'RegisterPage': ParameterData.none(),
|
||||
'WelcomePage': ParameterData.none(),
|
||||
'registerVisitorPage': (data) async => ParameterData(
|
||||
allParams: {
|
||||
'userUUID': getParameter<String>(data, 'userUUID'),
|
||||
'devUUID': getParameter<String>(data, 'devUUID'),
|
||||
},
|
||||
),
|
||||
'scheduleCompleteVisitPage': (data) async => ParameterData(
|
||||
allParams: {
|
||||
'visitorStrList': getParameter<String>(data, 'visitorStrList'),
|
||||
'visitStartDateStr': getParameter<String>(data, 'visitStartDateStr'),
|
||||
'visitEndDateStr': getParameter<String>(data, 'visitEndDateStr'),
|
||||
'visitReasonStr': getParameter<String>(data, 'visitReasonStr'),
|
||||
'visitLevelStr': getParameter<String>(data, 'visitLevelStr'),
|
||||
'visitTempBol': getParameter<bool>(data, 'visitTempBol'),
|
||||
'visitObsStr': getParameter<String>(data, 'visitObsStr'),
|
||||
},
|
||||
),
|
||||
'scheduleProvisionalVisitPage': ParameterData.none(),
|
||||
};
|
||||
|
||||
Map<String, dynamic> getInitialParameterData(Map<String, dynamic> data) {
|
||||
try {
|
||||
final parameterDataStr = data['parameterData'];
|
||||
if (parameterDataStr == null ||
|
||||
parameterDataStr is! String ||
|
||||
parameterDataStr.isEmpty) {
|
||||
return {};
|
||||
}
|
||||
return jsonDecode(parameterDataStr) as Map<String, dynamic>;
|
||||
} catch (e) {
|
||||
print('Error parsing parameter data: $e');
|
||||
return {};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
|
||||
import '../../auth/firebase_auth/auth_util.dart';
|
||||
import '../cloud_functions/cloud_functions.dart';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:stream_transform/stream_transform.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
|
||||
export 'push_notifications_handler.dart';
|
||||
export 'serialization_util.dart';
|
||||
|
||||
class UserTokenInfo {
|
||||
const UserTokenInfo(this.userPath, this.fcmToken);
|
||||
final String userPath;
|
||||
final String fcmToken;
|
||||
}
|
||||
|
||||
Stream<UserTokenInfo> getFcmTokenStream(String userPath) =>
|
||||
Stream.value(!kIsWeb && (Platform.isIOS || Platform.isAndroid))
|
||||
.where((shouldGetToken) => shouldGetToken)
|
||||
.asyncMap<String?>(
|
||||
(_) => FirebaseMessaging.instance.requestPermission().then(
|
||||
(settings) => settings.authorizationStatus ==
|
||||
AuthorizationStatus.authorized
|
||||
? FirebaseMessaging.instance.getToken()
|
||||
: null,
|
||||
))
|
||||
.switchMap((fcmToken) => Stream.value(fcmToken)
|
||||
.merge(FirebaseMessaging.instance.onTokenRefresh))
|
||||
.where((fcmToken) => fcmToken != null && fcmToken.isNotEmpty)
|
||||
.map((token) => UserTokenInfo(userPath, token!));
|
||||
final fcmTokenUserStream = authenticatedUserStream
|
||||
.where((user) => user != null)
|
||||
.map((user) => user!.reference.path)
|
||||
.distinct()
|
||||
.switchMap(getFcmTokenStream)
|
||||
.map(
|
||||
(userTokenInfo) => makeCloudCall(
|
||||
'addFcmToken',
|
||||
{
|
||||
'userDocPath': userTokenInfo.userPath,
|
||||
'fcmToken': userTokenInfo.fcmToken,
|
||||
'deviceType': Platform.isIOS ? 'iOS' : 'Android',
|
||||
},
|
||||
),
|
||||
);
|
|
@ -0,0 +1,172 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '/backend/backend.dart';
|
||||
import '/backend/schema/structs/index.dart';
|
||||
|
||||
import '../../flutter_flow/lat_lng.dart';
|
||||
import '../../flutter_flow/place.dart';
|
||||
import '../../flutter_flow/uploaded_file.dart';
|
||||
|
||||
/// SERIALIZATION HELPERS
|
||||
|
||||
String dateTimeRangeToString(DateTimeRange dateTimeRange) {
|
||||
final startStr = dateTimeRange.start.millisecondsSinceEpoch.toString();
|
||||
final endStr = dateTimeRange.end.millisecondsSinceEpoch.toString();
|
||||
return '$startStr|$endStr';
|
||||
}
|
||||
|
||||
String placeToString(FFPlace place) => jsonEncode({
|
||||
'latLng': place.latLng.serialize(),
|
||||
'name': place.name,
|
||||
'address': place.address,
|
||||
'city': place.city,
|
||||
'state': place.state,
|
||||
'country': place.country,
|
||||
'zipCode': place.zipCode,
|
||||
});
|
||||
|
||||
String uploadedFileToString(FFUploadedFile uploadedFile) =>
|
||||
uploadedFile.serialize();
|
||||
|
||||
/// Converts the input value into a value that can be JSON encoded.
|
||||
dynamic serializeParameter(dynamic value) {
|
||||
switch (value.runtimeType) {
|
||||
case DateTime:
|
||||
return (value as DateTime).millisecondsSinceEpoch;
|
||||
case DateTimeRange:
|
||||
return dateTimeRangeToString(value as DateTimeRange);
|
||||
case LatLng:
|
||||
return (value as LatLng).serialize();
|
||||
case Color:
|
||||
return (value as Color).toCssString();
|
||||
case FFPlace:
|
||||
return placeToString(value as FFPlace);
|
||||
case FFUploadedFile:
|
||||
return uploadedFileToString(value as FFUploadedFile);
|
||||
}
|
||||
|
||||
if (value is DocumentReference) {
|
||||
return value.path;
|
||||
}
|
||||
|
||||
if (value is FirestoreRecord) {
|
||||
return (value as dynamic).reference.path;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
String serializeParameterData(Map<String, dynamic> parameterData) => jsonEncode(
|
||||
parameterData.map(
|
||||
(key, value) => MapEntry(
|
||||
key,
|
||||
serializeParameter(value),
|
||||
),
|
||||
)..removeWhere((k, v) => v == null),
|
||||
);
|
||||
|
||||
/// END SERIALIZATION HELPERS
|
||||
|
||||
/// DESERIALIZATION HELPERS
|
||||
|
||||
DateTimeRange? dateTimeRangeFromString(String dateTimeRangeStr) {
|
||||
final pieces = dateTimeRangeStr.split('|');
|
||||
if (pieces.length != 2) {
|
||||
return null;
|
||||
}
|
||||
return DateTimeRange(
|
||||
start: DateTime.fromMillisecondsSinceEpoch(int.parse(pieces.first)),
|
||||
end: DateTime.fromMillisecondsSinceEpoch(int.parse(pieces.last)),
|
||||
);
|
||||
}
|
||||
|
||||
LatLng? latLngFromString(String? latLngStr) {
|
||||
final pieces = latLngStr?.split(',');
|
||||
if (pieces == null || pieces.length != 2) {
|
||||
return null;
|
||||
}
|
||||
return LatLng(
|
||||
double.parse(pieces.first.trim()),
|
||||
double.parse(pieces.last.trim()),
|
||||
);
|
||||
}
|
||||
|
||||
FFPlace placeFromString(String placeStr) {
|
||||
final serializedData = jsonDecode(placeStr) as Map<String, dynamic>;
|
||||
final data = {
|
||||
'latLng': serializedData.containsKey('latLng')
|
||||
? latLngFromString(serializedData['latLng'] as String)
|
||||
: const LatLng(0.0, 0.0),
|
||||
'name': serializedData['name'] ?? '',
|
||||
'address': serializedData['address'] ?? '',
|
||||
'city': serializedData['city'] ?? '',
|
||||
'state': serializedData['state'] ?? '',
|
||||
'country': serializedData['country'] ?? '',
|
||||
'zipCode': serializedData['zipCode'] ?? '',
|
||||
};
|
||||
return FFPlace(
|
||||
latLng: data['latLng'] as LatLng,
|
||||
name: data['name'] as String,
|
||||
address: data['address'] as String,
|
||||
city: data['city'] as String,
|
||||
state: data['state'] as String,
|
||||
country: data['country'] as String,
|
||||
zipCode: data['zipCode'] as String,
|
||||
);
|
||||
}
|
||||
|
||||
FFUploadedFile uploadedFileFromString(String uploadedFileStr) =>
|
||||
FFUploadedFile.deserialize(uploadedFileStr);
|
||||
|
||||
T? getParameter<T>(Map<String, dynamic> data, String paramName) {
|
||||
try {
|
||||
if (!data.containsKey(paramName)) {
|
||||
return null;
|
||||
}
|
||||
final param = data[paramName];
|
||||
switch (T) {
|
||||
case String:
|
||||
return param;
|
||||
case double:
|
||||
return param.toDouble();
|
||||
case DateTime:
|
||||
return DateTime.fromMillisecondsSinceEpoch(param) as T;
|
||||
case DateTimeRange:
|
||||
return dateTimeRangeFromString(param) as T;
|
||||
case LatLng:
|
||||
return latLngFromString(param) as T;
|
||||
case Color:
|
||||
return fromCssColor(param) as T;
|
||||
case FFPlace:
|
||||
return placeFromString(param) as T;
|
||||
case FFUploadedFile:
|
||||
return uploadedFileFromString(param) as T;
|
||||
}
|
||||
if (param is String) {
|
||||
return FirebaseFirestore.instance.doc(param) as T;
|
||||
}
|
||||
return param;
|
||||
} catch (e) {
|
||||
print('Error parsing parameter "$paramName": $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Future<T?> getDocumentParameter<T>(
|
||||
Map<String, dynamic> data,
|
||||
String paramName,
|
||||
RecordBuilder<T> recordBuilder,
|
||||
) {
|
||||
if (!data.containsKey(paramName)) {
|
||||
return Future.value(null);
|
||||
}
|
||||
return FirebaseFirestore.instance
|
||||
.doc(data[paramName])
|
||||
.get()
|
||||
.then((s) => recordBuilder(s));
|
||||
}
|
||||
|
||||
/// END DESERIALIZATION HELPERS
|
|
@ -1,110 +0,0 @@
|
|||
// ignore_for_file: unnecessary_getters_setters
|
||||
|
||||
import '/backend/schema/util/schema_util.dart';
|
||||
|
||||
import 'index.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
|
||||
class DeviceStruct extends BaseStruct {
|
||||
DeviceStruct({
|
||||
String? devUUID,
|
||||
String? version,
|
||||
String? description,
|
||||
}) : _devUUID = devUUID,
|
||||
_version = version,
|
||||
_description = description;
|
||||
|
||||
// "devUUID" field.
|
||||
String? _devUUID;
|
||||
String get devUUID => _devUUID ?? '';
|
||||
set devUUID(String? val) => _devUUID = val;
|
||||
bool hasDevUUID() => _devUUID != null;
|
||||
|
||||
// "version" field.
|
||||
String? _version;
|
||||
String get version => _version ?? '';
|
||||
set version(String? val) => _version = val;
|
||||
bool hasVersion() => _version != null;
|
||||
|
||||
// "description" field.
|
||||
String? _description;
|
||||
String get description => _description ?? '';
|
||||
set description(String? val) => _description = val;
|
||||
bool hasDescription() => _description != null;
|
||||
|
||||
static DeviceStruct fromMap(Map<String, dynamic> data) => DeviceStruct(
|
||||
devUUID: data['devUUID'] as String?,
|
||||
version: data['version'] as String?,
|
||||
description: data['description'] as String?,
|
||||
);
|
||||
|
||||
static DeviceStruct? maybeFromMap(dynamic data) =>
|
||||
data is Map ? DeviceStruct.fromMap(data.cast<String, dynamic>()) : null;
|
||||
|
||||
Map<String, dynamic> toMap() => {
|
||||
'devUUID': _devUUID,
|
||||
'version': _version,
|
||||
'description': _description,
|
||||
}.withoutNulls;
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toSerializableMap() => {
|
||||
'devUUID': serializeParam(
|
||||
_devUUID,
|
||||
ParamType.String,
|
||||
),
|
||||
'version': serializeParam(
|
||||
_version,
|
||||
ParamType.String,
|
||||
),
|
||||
'description': serializeParam(
|
||||
_description,
|
||||
ParamType.String,
|
||||
),
|
||||
}.withoutNulls;
|
||||
|
||||
static DeviceStruct fromSerializableMap(Map<String, dynamic> data) =>
|
||||
DeviceStruct(
|
||||
devUUID: deserializeParam(
|
||||
data['devUUID'],
|
||||
ParamType.String,
|
||||
false,
|
||||
),
|
||||
version: deserializeParam(
|
||||
data['version'],
|
||||
ParamType.String,
|
||||
false,
|
||||
),
|
||||
description: deserializeParam(
|
||||
data['description'],
|
||||
ParamType.String,
|
||||
false,
|
||||
),
|
||||
);
|
||||
|
||||
@override
|
||||
String toString() => 'DeviceStruct(${toMap()})';
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is DeviceStruct &&
|
||||
devUUID == other.devUUID &&
|
||||
version == other.version &&
|
||||
description == other.description;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
const ListEquality().hash([devUUID, version, description]);
|
||||
}
|
||||
|
||||
DeviceStruct createDeviceStruct({
|
||||
String? devUUID,
|
||||
String? version,
|
||||
String? description,
|
||||
}) =>
|
||||
DeviceStruct(
|
||||
devUUID: devUUID,
|
||||
version: version,
|
||||
description: description,
|
||||
);
|
|
@ -1,4 +1,3 @@
|
|||
export '/backend/schema/util/schema_util.dart';
|
||||
|
||||
export 'action_struct.dart';
|
||||
export 'device_struct.dart';
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'image_cropper_widget.dart' show ImageCropperWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ImageCropperModel extends FlutterFlowModel<ImageCropperWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {}
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/custom_code/widgets/index.dart' as custom_widgets;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'image_cropper_model.dart';
|
||||
export 'image_cropper_model.dart';
|
||||
|
||||
class ImageCropperWidget extends StatefulWidget {
|
||||
const ImageCropperWidget({
|
||||
super.key,
|
||||
required this.uploadImageFile,
|
||||
});
|
||||
|
||||
final FFUploadedFile? uploadImageFile;
|
||||
|
||||
@override
|
||||
State<ImageCropperWidget> createState() => _ImageCropperWidgetState();
|
||||
}
|
||||
|
||||
class _ImageCropperWidgetState extends State<ImageCropperWidget> {
|
||||
late ImageCropperModel _model;
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => ImageCropperModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: 500.0,
|
||||
height: 500.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).secondaryBackground,
|
||||
),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: custom_widgets.ImageCropper(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
imageFile: widget.uploadImageFile,
|
||||
callBackAction: (url) async {
|
||||
Navigator.pop(context, url);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'legacy_local_component_widget.dart' show LegacyLocalComponentWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LegacyLocalComponentModel
|
||||
extends FlutterFlowModel<LegacyLocalComponentWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {}
|
||||
}
|
|
@ -1,167 +0,0 @@
|
|||
import '/application_components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/flutter_flow/custom_functions.dart' as functions;
|
||||
import '/flutter_flow/random_data_util.dart' as random_data;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'legacy_local_component_model.dart';
|
||||
export 'legacy_local_component_model.dart';
|
||||
|
||||
class LegacyLocalComponentWidget extends StatefulWidget {
|
||||
const LegacyLocalComponentWidget({super.key});
|
||||
|
||||
@override
|
||||
State<LegacyLocalComponentWidget> createState() =>
|
||||
_LegacyLocalComponentWidgetState();
|
||||
}
|
||||
|
||||
class _LegacyLocalComponentWidgetState
|
||||
extends State<LegacyLocalComponentWidget> {
|
||||
late LegacyLocalComponentModel _model;
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => LegacyLocalComponentModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return Visibility(
|
||||
visible: random_data.randomInteger(0, 10) != null,
|
||||
child: Container(
|
||||
height: 284.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Stack(
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
elevation: 0.0,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 119.0,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF1AAB5F),
|
||||
border: Border.all(
|
||||
color: const Color(0xFF1AAB5F),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Container(
|
||||
width: 200.0,
|
||||
height: 200.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: const Color(0x00FFFFFF),
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: const SizedBox(
|
||||
height: double.infinity,
|
||||
child:
|
||||
BottomArrowLinkedLocalsComponentWidget(),
|
||||
),
|
||||
);
|
||||
},
|
||||
).then((value) => safeSetState(() {}));
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(200.0),
|
||||
child: Image.network(
|
||||
valueOrDefault<String>(
|
||||
'https://freaccess.com.br/freaccess/Images/Clients/${FFAppState().cliUUID}.png',
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
|
||||
),
|
||||
width: 300.0,
|
||||
height: 200.0,
|
||||
fit: BoxFit.cover,
|
||||
alignment: const Alignment(0.0, 0.0),
|
||||
errorBuilder: (context, error, stackTrace) =>
|
||||
Image.asset(
|
||||
'assets/images/error_image.svg',
|
||||
width: 300.0,
|
||||
height: 200.0,
|
||||
fit: BoxFit.cover,
|
||||
alignment: const Alignment(0.0, 0.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
valueOrDefault<String>(
|
||||
functions.convertToUppercase(FFAppState().local),
|
||||
'NOME DO LOCAL',
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Nunito',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 20.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Nunito'),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'select_header_component_widget.dart' show SelectHeaderComponentWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SelectHeaderComponentModel
|
||||
extends FlutterFlowModel<SelectHeaderComponentWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {}
|
||||
}
|
|
@ -1,185 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'select_header_component_model.dart';
|
||||
export 'select_header_component_model.dart';
|
||||
|
||||
class SelectHeaderComponentWidget extends StatefulWidget {
|
||||
const SelectHeaderComponentWidget({
|
||||
super.key,
|
||||
required this.selectToggle,
|
||||
bool? toggleIndexValue,
|
||||
}) : toggleIndexValue = toggleIndexValue ?? true;
|
||||
|
||||
final Future Function(bool toggleIndex)? selectToggle;
|
||||
final bool toggleIndexValue;
|
||||
|
||||
@override
|
||||
State<SelectHeaderComponentWidget> createState() =>
|
||||
_SelectHeaderComponentWidgetState();
|
||||
}
|
||||
|
||||
class _SelectHeaderComponentWidgetState
|
||||
extends State<SelectHeaderComponentWidget> {
|
||||
late SelectHeaderComponentModel _model;
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => SelectHeaderComponentModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 55.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget.selectToggle?.call(
|
||||
true,
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 50.0,
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(0.0),
|
||||
topLeft: Radius.circular(0.0),
|
||||
topRight: Radius.circular(0.0),
|
||||
),
|
||||
),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'1gr8ztd5' /* Criar Agendamento */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (widget.toggleIndexValue == true)
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 2.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 2.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
height: 55.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget.selectToggle?.call(
|
||||
false,
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 50.0,
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(0.0),
|
||||
bottomRight: Radius.circular(0.0),
|
||||
topLeft: Radius.circular(0.0),
|
||||
topRight: Radius.circular(0.0),
|
||||
),
|
||||
),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'xjahsbjw' /* Histórico de Visitas */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (widget.toggleIndexValue == false)
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 2.0, 0.0, 0.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 2.0,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
borderRadius: BorderRadius.circular(100.0),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
// Automatic FlutterFlow imports
|
||||
import '/backend/schema/structs/index.dart';
|
||||
import '/backend/schema/enums/enums.dart';
|
||||
import '/actions/actions.dart' as action_blocks;
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'index.dart'; // Imports other custom actions
|
||||
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
|
||||
import 'package:flutter/material.dart';
|
||||
// Begin custom action code
|
||||
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
|
||||
Future<String?> getDevUUID() async {
|
||||
var deviceInfo = DeviceInfoPlugin();
|
||||
if (Platform.isIOS) {
|
||||
// import 'dart:io'
|
||||
var iosDeviceInfo = await deviceInfo.iosInfo;
|
||||
return iosDeviceInfo.identifierForVendor; // unique ID on iOS
|
||||
} else if (Platform.isAndroid) {
|
||||
var androidDeviceInfo = await deviceInfo.androidInfo;
|
||||
print(AndroidDeviceInfo);
|
||||
return androidDeviceInfo.serialNumber; // unique ID on Android
|
||||
}
|
||||
}
|
|
@ -1,3 +1,2 @@
|
|||
export 'convert_image_file_to_base64.dart' show convertImageFileToBase64;
|
||||
export 'convert_to_upload_file.dart' show convertToUploadFile;
|
||||
export 'get_dev_u_u_i_d.dart' show getDevUUID;
|
||||
|
|
|
@ -1,179 +0,0 @@
|
|||
// Automatic FlutterFlow imports
|
||||
import '/backend/schema/structs/index.dart';
|
||||
import '/backend/schema/enums/enums.dart';
|
||||
import '/actions/actions.dart' as action_blocks;
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'index.dart'; // Imports other custom widgets
|
||||
import '/custom_code/actions/index.dart'; // Imports custom actions
|
||||
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
|
||||
import 'package:flutter/material.dart';
|
||||
// Begin custom widget code
|
||||
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
|
||||
|
||||
import 'package:crop_your_image/crop_your_image.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import '/backend/firebase_storage/storage.dart';
|
||||
|
||||
class ImageCropper extends StatefulWidget {
|
||||
const ImageCropper({
|
||||
super.key,
|
||||
this.width,
|
||||
this.height,
|
||||
this.imageFile,
|
||||
this.callBackAction,
|
||||
this.currentUserId,
|
||||
});
|
||||
|
||||
final double? width;
|
||||
final double? height;
|
||||
final FFUploadedFile? imageFile;
|
||||
final Future Function(String? url)? callBackAction;
|
||||
final String? currentUserId;
|
||||
|
||||
@override
|
||||
State<ImageCropper> createState() => _ImageCropperState();
|
||||
}
|
||||
|
||||
class _ImageCropperState extends State<ImageCropper> {
|
||||
bool loading = false;
|
||||
final _crop_controller = CropController();
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Stack(
|
||||
children: [
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: widget.width ?? double.infinity,
|
||||
height: (widget.height ?? 555) - 80,
|
||||
child: Center(
|
||||
child: Crop(
|
||||
image: Uint8List.fromList(widget.imageFile!.bytes!),
|
||||
controller: _crop_controller,
|
||||
onCropped: (image) async {
|
||||
final path = _getStoragePath(_firebasePathPrefix(),
|
||||
widget.imageFile!.name!, false, 0);
|
||||
uploadData(path, image).then((value) {
|
||||
print('image cropped');
|
||||
widget.callBackAction!.call(value!);
|
||||
loading = false;
|
||||
});
|
||||
// add error handling here
|
||||
},
|
||||
|
||||
aspectRatio: 1 / 1,
|
||||
initialSize: 0.5,
|
||||
// initialArea: Rect.fromLTWH(240, 212, 800, 600),\
|
||||
//initialAreaBuilder: (rect) => Rect.fromLTRB(rect.left + 80, rect.top + 80, rect.right - 80, rect.bottom - 80),
|
||||
withCircleUi: true,
|
||||
baseColor: Color.fromARGB(255, 0, 3, 22),
|
||||
maskColor: Colors.white.withAlpha(100),
|
||||
radius: 20,
|
||||
|
||||
onMoved: (newRect) {
|
||||
// do something with current cropping area.
|
||||
},
|
||||
onStatusChanged: (status) {
|
||||
// do something with current CropStatus
|
||||
},
|
||||
cornerDotBuilder: (size, edgeAlignment) =>
|
||||
const DotControl(color: Colors.white),
|
||||
interactive: true,
|
||||
// fixArea: true,
|
||||
))),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(8, 5, 8, 5),
|
||||
child: ElevatedButton(
|
||||
onPressed: () async {
|
||||
if (!loading) {
|
||||
setState(() {
|
||||
loading = true;
|
||||
});
|
||||
print('Button pressed ...');
|
||||
_crop_controller.crop();
|
||||
|
||||
//widget.loading = true;
|
||||
}
|
||||
},
|
||||
style: ButtonStyle(
|
||||
backgroundColor: MaterialStateProperty.all<Color>(
|
||||
FlutterFlowTheme.of(context).primaryColor,
|
||||
),
|
||||
padding: MaterialStateProperty.all<EdgeInsetsGeometry>(
|
||||
EdgeInsets.zero,
|
||||
),
|
||||
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
side: BorderSide.none,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Container(
|
||||
width: 250,
|
||||
height: 50,
|
||||
alignment: Alignment.center,
|
||||
child: loading
|
||||
? CircularProgressIndicator(
|
||||
valueColor:
|
||||
AlwaysStoppedAnimation<Color>(Colors.white),
|
||||
)
|
||||
: Text(
|
||||
'Crop',
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.subtitle2
|
||||
.override(
|
||||
fontFamily: 'Lexend',
|
||||
color: Colors.white,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.normal,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(context)
|
||||
.subtitle2Family),
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
]),
|
||||
Positioned(
|
||||
top: 4,
|
||||
right: 4,
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.close),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
))
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
String _getStoragePath(
|
||||
String? pathPrefix,
|
||||
String filePath,
|
||||
bool isVideo, [
|
||||
int? index,
|
||||
]) {
|
||||
pathPrefix ??= _firebasePathPrefix();
|
||||
pathPrefix = _removeTrailingSlash(pathPrefix);
|
||||
final timestamp = DateTime.now().microsecondsSinceEpoch;
|
||||
final prefix = 'cropped-';
|
||||
// Workaround fixed by https://github.com/flutter/plugins/pull/3685
|
||||
// (not yet in stable).
|
||||
final ext = isVideo ? 'mp4' : filePath.split('.').last;
|
||||
final indexStr = index != null ? '_$index' : '';
|
||||
return '$pathPrefix/$prefix$timestamp$indexStr.$ext';
|
||||
}
|
||||
|
||||
String? _removeTrailingSlash(String? path) =>
|
||||
path != null && path.endsWith('/')
|
||||
? path.substring(0, path.length - 1)
|
||||
: path;
|
||||
|
||||
String _firebasePathPrefix() => 'users/${widget.currentUserId}/uploads';
|
||||
}
|
||||
// Set your widget name, define your parameter, and then add the
|
||||
// boilerplate code using the green button on the right!
|
|
@ -1 +0,0 @@
|
|||
export 'image_cropper.dart' show ImageCropper;
|
|
@ -66,8 +66,6 @@ abstract class FlutterFlowTheme {
|
|||
late Color customColor1;
|
||||
late Color customColor2;
|
||||
late Color customColor3;
|
||||
late Color customColor4;
|
||||
late Color customColor5;
|
||||
|
||||
@Deprecated('Use displaySmallFamily instead')
|
||||
String get title1Family => displaySmallFamily;
|
||||
|
@ -166,7 +164,7 @@ class LightModeTheme extends FlutterFlowTheme {
|
|||
late Color accent1 = const Color(0xFF1AAB5F);
|
||||
late Color accent2 = const Color(0x4D000000);
|
||||
late Color accent3 = const Color(0xFFFFFFFF);
|
||||
late Color accent4 = const Color(0xFF1AAB5F);
|
||||
late Color accent4 = const Color(0xFFFFFFFF);
|
||||
late Color success = const Color(0xFF1AAB5F);
|
||||
late Color warning = const Color(0xFFF3C344);
|
||||
late Color error = const Color(0xFFD70000);
|
||||
|
@ -175,8 +173,6 @@ class LightModeTheme extends FlutterFlowTheme {
|
|||
late Color customColor1 = const Color(0xFF000000);
|
||||
late Color customColor2 = const Color(0xFF1AAB5F);
|
||||
late Color customColor3 = const Color(0xFFFFFFFF);
|
||||
late Color customColor4 = const Color(0xFFCFCFCF);
|
||||
late Color customColor5 = const Color(0xFF979595);
|
||||
}
|
||||
|
||||
abstract class Typography {
|
||||
|
@ -573,8 +569,6 @@ class DarkModeTheme extends FlutterFlowTheme {
|
|||
late Color customColor1 = const Color(0xFFFFFFFF);
|
||||
late Color customColor2 = const Color(0xFFFFFFFF);
|
||||
late Color customColor3 = const Color(0xFF1AAB5F);
|
||||
late Color customColor4 = const Color(0xFF232323);
|
||||
late Color customColor5 = const Color(0xFF232323);
|
||||
}
|
||||
|
||||
extension TextStyleHelper on TextStyle {
|
||||
|
|
|
@ -107,43 +107,43 @@ Locale createLocale(String language) => language.contains('_')
|
|||
final kTranslationsMap = <Map<String, Map<String, String>>>[
|
||||
// LoginPage
|
||||
{
|
||||
'0113wf5c': {
|
||||
'uem0mca5': {
|
||||
'pt': 'VAMOS LA! ENTRE COM A SUA CONTA',
|
||||
'en': 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT',
|
||||
},
|
||||
'f2go5a71': {
|
||||
'90ls8ppo': {
|
||||
'pt': 'Email',
|
||||
'en': 'Email',
|
||||
},
|
||||
'paon3y0v': {
|
||||
'rvlumyaw': {
|
||||
'pt': 'Senha',
|
||||
'en': 'Password',
|
||||
},
|
||||
'wmbzwstw': {
|
||||
'2d3903lt': {
|
||||
'pt': 'Entrar',
|
||||
'en': 'Sign-In',
|
||||
},
|
||||
'j8567afe': {
|
||||
'zj6pyujp': {
|
||||
'pt': 'Cadastrar',
|
||||
'en': 'Sign-Up',
|
||||
},
|
||||
'y3wd9q18': {
|
||||
'iqhyif1d': {
|
||||
'pt': 'Entrar',
|
||||
'en': 'Sign-In',
|
||||
},
|
||||
'j6ufb6sq': {
|
||||
'5x5bp2u1': {
|
||||
'pt': 'Cadastrar',
|
||||
'en': 'Sign-Up',
|
||||
},
|
||||
'h85112qs': {
|
||||
'1fqjz9q7': {
|
||||
'pt': 'Você esqueceu a sua senha?',
|
||||
'en': 'Have you forgotten your password?',
|
||||
},
|
||||
'di48hdaj': {
|
||||
'7miyd406': {
|
||||
'pt': ' Recupere aqui',
|
||||
'en': 'recover here',
|
||||
},
|
||||
'gx2fp6zq': {
|
||||
'63xv5ewj': {
|
||||
'pt': 'Termo de Uso',
|
||||
'en': 'Terms of use',
|
||||
},
|
||||
|
@ -154,25 +154,25 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
},
|
||||
// ForgotPasswordPage
|
||||
{
|
||||
'gfvplb0h': {
|
||||
'lpduiuif': {
|
||||
'pt': 'ESQUECEU SUA SENHA?',
|
||||
'en': 'FORGOT YOUR PASSWORD?',
|
||||
},
|
||||
'azssgpdi': {
|
||||
'8t05j98w': {
|
||||
'pt':
|
||||
'Não se preucupe nós vamos te ajudar, digite o email cadastrado no aplicativo e clique em enviar.',
|
||||
'en':
|
||||
'Don\'t worry, we will help you, enter the email registered in the application and click send.',
|
||||
},
|
||||
'0o139961': {
|
||||
'4gcoci7a': {
|
||||
'pt': 'Email',
|
||||
'en': 'Email',
|
||||
},
|
||||
'aanw1fp3': {
|
||||
'a7p2iikz': {
|
||||
'pt': 'digite o seu email.....',
|
||||
'en': 'enter your email.....',
|
||||
},
|
||||
'e7hdgc4q': {
|
||||
'z9ghb8dz': {
|
||||
'pt': 'Enviar',
|
||||
'en': 'To send',
|
||||
},
|
||||
|
@ -234,39 +234,39 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
},
|
||||
// RegisterPage
|
||||
{
|
||||
'2d8uulm3': {
|
||||
'oxy0n1p4': {
|
||||
'pt': 'INSIRA SEU EMAIL E SENHA, VAMOS TE CADASTRAR!',
|
||||
'en': 'ENTER YOUR EMAIL AND PASSWORD, LET\'S REGISTER YOU!',
|
||||
},
|
||||
'8kjhi406': {
|
||||
'w0y3fz89': {
|
||||
'pt': 'Nome',
|
||||
'en': 'Name',
|
||||
},
|
||||
'ro4zkkxp': {
|
||||
'4bfdpd0o': {
|
||||
'pt': 'Email',
|
||||
'en': 'Email',
|
||||
},
|
||||
'j5yny8ee': {
|
||||
'v0iobs5a': {
|
||||
'pt': '',
|
||||
'en': '',
|
||||
},
|
||||
'lzgobioa': {
|
||||
'byjglkpk': {
|
||||
'pt': 'Senha',
|
||||
'en': 'Password',
|
||||
},
|
||||
'c7sfyeh8': {
|
||||
'w9vrsnmf': {
|
||||
'pt': 'Cadastrar-se',
|
||||
'en': 'Sign-Up',
|
||||
},
|
||||
'jglpa1tr': {
|
||||
'zep60lcd': {
|
||||
'pt': 'Você já tem uma conta? ',
|
||||
'en': 'You already have an account?',
|
||||
},
|
||||
'hfcm0td9': {
|
||||
'tl8k1ld9': {
|
||||
'pt': 'Clique aqui',
|
||||
'en': 'Click here',
|
||||
},
|
||||
'c3kno4t9': {
|
||||
'dbtzii7i': {
|
||||
'pt': 'Termo de Uso',
|
||||
'en': '',
|
||||
},
|
||||
|
@ -277,27 +277,27 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
},
|
||||
// WelcomePage
|
||||
{
|
||||
'xflxvs9y': {
|
||||
'3pl41wkq': {
|
||||
'pt': 'UMA EXPERIÊCIA COMPLETA',
|
||||
'en': 'A COMPLETE EXPERIENCE',
|
||||
},
|
||||
'5a86wzd1': {
|
||||
'13nhoxpg': {
|
||||
'pt': 'COM CONFORTO ONDE VOCÊ ESTIVER.',
|
||||
'en': 'WITH COMFORT WHEREVER YOU ARE.',
|
||||
},
|
||||
'65nuva6j': {
|
||||
'zt5uc5g5': {
|
||||
'pt': 'Entrar',
|
||||
'en': 'Sign-In',
|
||||
},
|
||||
'9u6oaw01': {
|
||||
'jteakpo0': {
|
||||
'pt': 'Cadastrar',
|
||||
'en': 'Sign-Up',
|
||||
},
|
||||
'd1qem43w': {
|
||||
'qoc86gvo': {
|
||||
'pt': 'Entrar',
|
||||
'en': 'Sign-In',
|
||||
},
|
||||
'bhowzv2u': {
|
||||
'p5tgmj0c': {
|
||||
'pt': 'Cadastrar',
|
||||
'en': 'Sign-Up',
|
||||
},
|
||||
|
@ -371,39 +371,43 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
},
|
||||
// scheduleCompleteVisitPage
|
||||
{
|
||||
'e4w9lbke': {
|
||||
'pt': 'Criar Agendamento',
|
||||
'en': 'Create Schedule',
|
||||
},
|
||||
'47bsumoy': {
|
||||
'pt': 'Histórico de Visitas',
|
||||
'en': 'Visit History',
|
||||
},
|
||||
'15ekd1ge': {
|
||||
'pt': 'Agendar Visita',
|
||||
'en': 'Schedule Visit',
|
||||
},
|
||||
'qo0pg2at': {
|
||||
'pt': 'Quais visitantes você deseja cadastrar?',
|
||||
'en': 'Which visitors do you want to register?',
|
||||
},
|
||||
'i0jhuu3e': {
|
||||
'pt': 'Clique para adicionar um visitante',
|
||||
'en': 'Click to add a visitor',
|
||||
'en': 'Click to add photo for visitor',
|
||||
},
|
||||
'z4ry3tge': {
|
||||
'pt': 'Qual o período de validade da visita?',
|
||||
'en': 'Visit Validity Period',
|
||||
},
|
||||
'hjp5mzbd': {
|
||||
'pt': 'Inicio da Visita',
|
||||
'en': 'Start of Visit',
|
||||
'9mg9nv2j': {
|
||||
'pt': 'Ínicio da Visita',
|
||||
'en': 'Start of the Visit',
|
||||
},
|
||||
'2in5sljf': {
|
||||
'pt': '',
|
||||
'y5s85khj': {
|
||||
'pt': 'Quando a visitas se inicia?',
|
||||
'en': 'When does the visit start?',
|
||||
},
|
||||
'4o0cbb70': {
|
||||
'pt': 'Término da Visita',
|
||||
'en': 'End of Visit',
|
||||
},
|
||||
'ce6xryf4': {
|
||||
'pt': 'Quando você inicia a visita?',
|
||||
'en': 'When do you start the visit?',
|
||||
},
|
||||
'jwsbk0xu': {
|
||||
'pt': 'Fim da Visita',
|
||||
'en': 'End of Visit',
|
||||
},
|
||||
'87rlxmbk': {
|
||||
'pt': '',
|
||||
'en': 'End of Visit',
|
||||
},
|
||||
'lyfe46f6': {
|
||||
'bhmgddc4': {
|
||||
'pt': 'Quando a visita terminá?',
|
||||
'en': 'When will the visit end?',
|
||||
},
|
||||
|
@ -411,10 +415,6 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
'pt': 'Quais são os motivos da visita?',
|
||||
'en': 'What are the reasons for the visit?',
|
||||
},
|
||||
'bbauep0b': {
|
||||
'pt': 'Motivo da Visita',
|
||||
'en': 'End of Visit',
|
||||
},
|
||||
'x1ij847i': {
|
||||
'pt': 'Escolha um motivo aqui',
|
||||
'en': 'Choose a reason here',
|
||||
|
@ -423,10 +423,6 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
'pt': 'Search for an item...',
|
||||
'en': '',
|
||||
},
|
||||
'etzbm8l5': {
|
||||
'pt': 'Nível de Acesso',
|
||||
'en': 'End of Visit',
|
||||
},
|
||||
'kmgv5j7x': {
|
||||
'pt': 'Escolha um nível de acesso aqui',
|
||||
'en': 'Choose an access level here',
|
||||
|
@ -455,50 +451,6 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
'pt': 'Escreva as suas observações aqui',
|
||||
'en': 'Write your observations here',
|
||||
},
|
||||
'bvioevav': {
|
||||
'pt': 'Ativo',
|
||||
'en': 'Active',
|
||||
},
|
||||
'295oz5is': {
|
||||
'pt': '16/10/2024',
|
||||
'en': '16/10/2024',
|
||||
},
|
||||
'07h0w8ki': {
|
||||
'pt': '16/10/2024',
|
||||
'en': '16/10/2024',
|
||||
},
|
||||
'd34nuw4w': {
|
||||
'pt': 'Visitante:',
|
||||
'en': 'Visitor:',
|
||||
},
|
||||
'y8geteyc': {
|
||||
'pt': ' Lucas Martin Mota',
|
||||
'en': 'Lucas Martin Mota',
|
||||
},
|
||||
'gxdykms1': {
|
||||
'pt': 'Morador:',
|
||||
'en': 'Resident:',
|
||||
},
|
||||
'ue7wkm9r': {
|
||||
'pt': ' Lucas Martin Mota',
|
||||
'en': 'Lucas Martin Mota',
|
||||
},
|
||||
'zs8s0wd3': {
|
||||
'pt': 'Validade:',
|
||||
'en': 'Validity:',
|
||||
},
|
||||
'z7fset9r': {
|
||||
'pt': ' 16/10/2024 a 16/10/2024',
|
||||
'en': ' 16/10/2024 a 16/10/2024',
|
||||
},
|
||||
'fcb5avae': {
|
||||
'pt': 'Agendamento Ativo',
|
||||
'en': 'Active Scheduling',
|
||||
},
|
||||
'61lcxdgm': {
|
||||
'pt': 'Agendar Visita',
|
||||
'en': 'Schedule Visit',
|
||||
},
|
||||
'v3mpyspm': {
|
||||
'pt': 'scheduleVisit',
|
||||
'en': '',
|
||||
|
@ -559,20 +511,6 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
'en': '',
|
||||
},
|
||||
},
|
||||
// onBoardingPage
|
||||
{
|
||||
'6exl3e75': {
|
||||
'pt': 'Home',
|
||||
'en': '',
|
||||
},
|
||||
},
|
||||
// fastPassPage
|
||||
{
|
||||
'koh6s96f': {
|
||||
'pt': 'Home',
|
||||
'en': '',
|
||||
},
|
||||
},
|
||||
// visitorDetailsModal
|
||||
{
|
||||
'kqzf7nx2': {
|
||||
|
@ -821,31 +759,47 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
'pt': 'Cadastrar \nPet',
|
||||
'en': 'Register\npet',
|
||||
},
|
||||
'xlp8dyn6': {
|
||||
'pt': 'Agendar \nVisita',
|
||||
'en': 'To schedule\nVisit',
|
||||
},
|
||||
'l6b9o7yn': {
|
||||
'pt': 'QR Code \nde Acesso',
|
||||
'en': 'QR Code\nAccess',
|
||||
},
|
||||
'45gqx8e0': {
|
||||
'pt': 'Agenda \nAuto-Visita',
|
||||
'en': 'Schedule\nSelf-Visit',
|
||||
},
|
||||
},
|
||||
// menuStaggeredViewComponent
|
||||
{
|
||||
'ee33l0ms': {
|
||||
'pt': 'Agendar \nVisita',
|
||||
'en': 'Schedule \nVisit',
|
||||
'jn7p6pj6': {
|
||||
'pt': 'Agenda \nAuto-Visita',
|
||||
'en': 'Schedule\nSelf-Visit',
|
||||
},
|
||||
'ya37l3jt': {
|
||||
'pt': 'Cadastrar\n Visitante',
|
||||
'en': 'Register\n Visitor',
|
||||
'yymmdtyv': {
|
||||
'pt': 'Cadastrar\nVisitante',
|
||||
'en': 'Register\nVisitor',
|
||||
},
|
||||
'h8s3adu8': {
|
||||
'pt': 'Vincular\nCondomínio',
|
||||
'f2jbm9jz': {
|
||||
'pt': 'Vincular \nCondomínio',
|
||||
'en': 'Link\nCondominium',
|
||||
},
|
||||
'j6tfixen': {
|
||||
'pt': 'Cadastrar\nPet',
|
||||
'rs5a7h6m': {
|
||||
'pt': 'Cadastrar \nPet',
|
||||
'en': 'Register\npet',
|
||||
},
|
||||
'9tli4i2x': {
|
||||
'pt': 'QR Code\nde Acesso',
|
||||
'if2zuaok': {
|
||||
'pt': 'Agendar \nVisita',
|
||||
'en': 'To schedule\nVisit',
|
||||
},
|
||||
'r4mjqq6s': {
|
||||
'pt': 'Agendar \nVisita',
|
||||
'en': 'To schedule\nVisit',
|
||||
},
|
||||
'cilu7ief': {
|
||||
'pt': 'QR Code \nde Acesso',
|
||||
'en': 'QR Code\nAccess',
|
||||
},
|
||||
},
|
||||
|
@ -860,151 +814,6 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
'en': 'All',
|
||||
},
|
||||
},
|
||||
// signInComponent
|
||||
{
|
||||
'9hbdjxrz': {
|
||||
'pt': 'VAMOS LA! ENTRE COM A SUA CONTA',
|
||||
'en': 'LET\'S GO! SIGN IN WITH YOUR ACCOUNT',
|
||||
},
|
||||
'1ltg0ylb': {
|
||||
'pt': 'Email',
|
||||
'en': 'Email',
|
||||
},
|
||||
'2x19ce8k': {
|
||||
'pt': 'Senha',
|
||||
'en': 'Password',
|
||||
},
|
||||
'k44tm7wo': {
|
||||
'pt': 'Entrar',
|
||||
'en': 'Sign-In',
|
||||
},
|
||||
'14u7ipws': {
|
||||
'pt': 'Cadastrar',
|
||||
'en': 'Sign-Up',
|
||||
},
|
||||
'1x926nsn': {
|
||||
'pt': 'Entrar',
|
||||
'en': 'Sign-In',
|
||||
},
|
||||
'jwvd4ai1': {
|
||||
'pt': 'Cadastrar',
|
||||
'en': 'Sign-Up',
|
||||
},
|
||||
'05dx91ku': {
|
||||
'pt': 'Você esqueceu a sua senha?',
|
||||
'en': 'Have you forgotten your password?',
|
||||
},
|
||||
'p5c6d54y': {
|
||||
'pt': ' Recupere aqui',
|
||||
'en': 'recover here',
|
||||
},
|
||||
'olf967cj': {
|
||||
'pt': 'Termo de Uso',
|
||||
'en': 'Terms of use',
|
||||
},
|
||||
},
|
||||
// signUpComponent
|
||||
{
|
||||
'49609olv': {
|
||||
'pt': 'INSIRA SEU EMAIL E SENHA, VAMOS TE CADASTRAR!',
|
||||
'en': 'ENTER YOUR EMAIL AND PASSWORD, LET\'S REGISTER YOU!',
|
||||
},
|
||||
'3corpwhd': {
|
||||
'pt': 'Nome',
|
||||
'en': 'Name',
|
||||
},
|
||||
'80wonb69': {
|
||||
'pt': 'Email',
|
||||
'en': 'Email',
|
||||
},
|
||||
'ws143wf4': {
|
||||
'pt': '',
|
||||
'en': '',
|
||||
},
|
||||
'0firji8l': {
|
||||
'pt': 'Senha',
|
||||
'en': 'Password',
|
||||
},
|
||||
'rnvdwzei': {
|
||||
'pt': 'Cadastrar-se',
|
||||
'en': 'Sign-Up',
|
||||
},
|
||||
'a9smhn5b': {
|
||||
'pt': 'Você já tem uma conta? ',
|
||||
'en': 'You already have an account?',
|
||||
},
|
||||
'09xv5ctc': {
|
||||
'pt': 'Clique aqui',
|
||||
'en': 'Click here',
|
||||
},
|
||||
'huygnka2': {
|
||||
'pt': 'Termo de Uso',
|
||||
'en': '',
|
||||
},
|
||||
},
|
||||
// welcomeComponent
|
||||
{
|
||||
'dsc9tuc8': {
|
||||
'pt': 'UMA EXPERIÊCIA COMPLETA',
|
||||
'en': 'A COMPLETE EXPERIENCE',
|
||||
},
|
||||
'5bgqn16z': {
|
||||
'pt': 'COM CONFORTO ONDE VOCÊ ESTIVER.',
|
||||
'en': 'WITH COMFORT WHEREVER YOU ARE.',
|
||||
},
|
||||
'dynet730': {
|
||||
'pt': 'Entrar',
|
||||
'en': 'Sign-In',
|
||||
},
|
||||
'hha60cg7': {
|
||||
'pt': 'Cadastrar',
|
||||
'en': 'Sign-Up',
|
||||
},
|
||||
'zvtay8ee': {
|
||||
'pt': 'Entrar',
|
||||
'en': 'Sign-In',
|
||||
},
|
||||
'o6zob50a': {
|
||||
'pt': 'Cadastrar',
|
||||
'en': 'Sign-Up',
|
||||
},
|
||||
},
|
||||
// forgotPasswordComponent
|
||||
{
|
||||
'xxm3ajsy': {
|
||||
'pt': 'ESQUECEU SUA SENHA?',
|
||||
'en': 'FORGOT YOUR PASSWORD?',
|
||||
},
|
||||
'wu2f7yzo': {
|
||||
'pt':
|
||||
'Não se preucupe nós vamos te ajudar, digite o email cadastrado no aplicativo e clique em enviar.',
|
||||
'en':
|
||||
'Don\'t worry, we will help you, enter the email registered in the application and click send.',
|
||||
},
|
||||
'mtz8l7ft': {
|
||||
'pt': 'Email',
|
||||
'en': 'Email',
|
||||
},
|
||||
'w7y5wlnv': {
|
||||
'pt': 'digite o seu email.....',
|
||||
'en': 'enter your email.....',
|
||||
},
|
||||
'74rnd5bu': {
|
||||
'pt': 'Enviar',
|
||||
'en': 'To send',
|
||||
},
|
||||
},
|
||||
// selectHeaderComponent
|
||||
{
|
||||
'1gr8ztd5': {
|
||||
'pt': 'Criar Agendamento',
|
||||
'en': 'Create Schedule',
|
||||
},
|
||||
'xjahsbjw': {
|
||||
'pt': 'Histórico de Visitas',
|
||||
'en': 'Visit History',
|
||||
},
|
||||
},
|
||||
// Miscellaneous
|
||||
{
|
||||
'i5smty81': {
|
||||
|
@ -1015,14 +824,6 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
'pt': '',
|
||||
'en': '',
|
||||
},
|
||||
'7zjyxhuq': {
|
||||
'pt': '',
|
||||
'en': '',
|
||||
},
|
||||
'd86ioepz': {
|
||||
'pt': '',
|
||||
'en': '',
|
||||
},
|
||||
'lt3ssl76': {
|
||||
'pt': '',
|
||||
'en': '',
|
||||
|
|
|
@ -42,7 +42,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
),
|
||||
),
|
||||
)
|
||||
: const OnBoardingPageWidget(),
|
||||
: const WelcomePageWidget(),
|
||||
routes: [
|
||||
FFRoute(
|
||||
name: '_initialize',
|
||||
|
@ -57,7 +57,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
),
|
||||
),
|
||||
)
|
||||
: const OnBoardingPageWidget(),
|
||||
: const WelcomePageWidget(),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'LoginPage',
|
||||
|
@ -77,7 +77,16 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
FFRoute(
|
||||
name: 'homePage',
|
||||
path: '/homePage',
|
||||
builder: (context, params) => const HomePageWidget(),
|
||||
builder: (context, params) => HomePageWidget(
|
||||
userUUID: params.getParam(
|
||||
'userUUID',
|
||||
ParamType.String,
|
||||
),
|
||||
devUUID: params.getParam(
|
||||
'devUUID',
|
||||
ParamType.String,
|
||||
),
|
||||
),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'RegisterPage',
|
||||
|
@ -92,7 +101,16 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
FFRoute(
|
||||
name: 'registerVisitorPage',
|
||||
path: '/registerVisitorPage',
|
||||
builder: (context, params) => const RegisterVisitorPageWidget(),
|
||||
builder: (context, params) => RegisterVisitorPageWidget(
|
||||
userUUID: params.getParam(
|
||||
'userUUID',
|
||||
ParamType.String,
|
||||
),
|
||||
devUUID: params.getParam(
|
||||
'devUUID',
|
||||
ParamType.String,
|
||||
),
|
||||
),
|
||||
),
|
||||
FFRoute(
|
||||
name: 'scheduleCompleteVisitPage',
|
||||
|
@ -137,16 +155,6 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter(
|
|||
name: 'scheduleProvisionalVisitPage',
|
||||
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(),
|
||||
)
|
||||
].map((r) => r.toRoute(appStateNotifier)).toList(),
|
||||
);
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// Export pages
|
||||
export '/on_boarding/on_boarding_legacy/login_page/login_page_widget.dart'
|
||||
export '/application_pages/login_page/login_page_widget.dart'
|
||||
show LoginPageWidget;
|
||||
export '/on_boarding/on_boarding_legacy/forgot_password_page/forgot_password_page_widget.dart'
|
||||
export '/application_pages/forgot_password_page/forgot_password_page_widget.dart'
|
||||
show ForgotPasswordPageWidget;
|
||||
export '/application_pages/home_page/home_page_widget.dart' show HomePageWidget;
|
||||
export '/on_boarding/on_boarding_legacy/register_page/register_page_widget.dart'
|
||||
export '/application_pages/register_page/register_page_widget.dart'
|
||||
show RegisterPageWidget;
|
||||
export '/on_boarding/on_boarding_legacy/welcome_page/welcome_page_widget.dart'
|
||||
export '/application_pages/welcome_page/welcome_page_widget.dart'
|
||||
show WelcomePageWidget;
|
||||
export '/application_pages/register_visitor_page/register_visitor_page_widget.dart'
|
||||
show RegisterVisitorPageWidget;
|
||||
|
@ -14,7 +14,3 @@ export '/application_pages/schedule_complete_visit_page/schedule_complete_visit_
|
|||
show ScheduleCompleteVisitPageWidget;
|
||||
export '/application_pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart'
|
||||
show ScheduleProvisionalVisitPageWidget;
|
||||
export '/on_boarding/on_boarding_beta/on_boarding_page/on_boarding_page_widget.dart'
|
||||
show OnBoardingPageWidget;
|
||||
export '/application_pages/fast_pass_page/fast_pass_page_widget.dart'
|
||||
show FastPassPageWidget;
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'forgot_password_component_widget.dart'
|
||||
show ForgotPasswordComponentWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ForgotPasswordComponentModel
|
||||
extends FlutterFlowModel<ForgotPasswordComponentWidget> {
|
||||
/// State fields for stateful widgets in this component.
|
||||
|
||||
// State field(s) for emailAddress widget.
|
||||
FocusNode? emailAddressFocusNode;
|
||||
TextEditingController? emailAddressTextController;
|
||||
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
||||
// Stores action output result for [Backend Call - API (forgotPassword)] action in Button-Login widget.
|
||||
ApiCallResponse? req;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
emailAddressFocusNode?.dispose();
|
||||
emailAddressTextController?.dispose();
|
||||
}
|
||||
}
|
|
@ -1,292 +0,0 @@
|
|||
import '/backend/api_requests/api_calls.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:google_fonts/google_fonts.dart';
|
||||
import 'forgot_password_component_model.dart';
|
||||
export 'forgot_password_component_model.dart';
|
||||
|
||||
class ForgotPasswordComponentWidget extends StatefulWidget {
|
||||
const ForgotPasswordComponentWidget({super.key});
|
||||
|
||||
@override
|
||||
State<ForgotPasswordComponentWidget> createState() =>
|
||||
_ForgotPasswordComponentWidgetState();
|
||||
}
|
||||
|
||||
class _ForgotPasswordComponentWidgetState
|
||||
extends State<ForgotPasswordComponentWidget> {
|
||||
late ForgotPasswordComponentModel _model;
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => ForgotPasswordComponentModel());
|
||||
|
||||
_model.emailAddressTextController ??= TextEditingController();
|
||||
_model.emailAddressFocusNode ??= FocusNode();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 300.0,
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: 570.0,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// This row exists for when the "app bar" is hidden on desktop, having a way back for the user can work well.
|
||||
if (responsiveVisibility(
|
||||
context: context,
|
||||
phone: false,
|
||||
tablet: false,
|
||||
))
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
context.safePop();
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 12.0, 0.0, 12.0),
|
||||
child: Icon(
|
||||
Icons.arrow_back_rounded,
|
||||
color: Color(0xFF15161E),
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
'',
|
||||
style:
|
||||
FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: const Color(0xFF15161E),
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'xxm3ajsy' /* ESQUECEU SUA SENHA? */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).headlineMedium.override(
|
||||
fontFamily: 'Outfit',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'wu2f7yzo' /* Não se preucupe nós vamos te a... */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts:
|
||||
GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
controller: _model.emailAddressTextController,
|
||||
focusNode: _model.emailAddressFocusNode,
|
||||
autofillHints: const [AutofillHints.email],
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelText: FFLocalizations.of(context).getText(
|
||||
'mtz8l7ft' /* Email */,
|
||||
),
|
||||
labelStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
hintText: FFLocalizations.of(context).getText(
|
||||
'w7y5wlnv' /* digite o seu email..... */,
|
||||
),
|
||||
hintStyle:
|
||||
FlutterFlowTheme.of(context).labelMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
width: 2.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).accent3,
|
||||
width: 2.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 2.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(context).error,
|
||||
width: 2.0,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
filled: true,
|
||||
fillColor: FlutterFlowTheme.of(context).primaryBackground,
|
||||
contentPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
|
||||
suffixIcon: Icon(
|
||||
Icons.email,
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
size: 22.0,
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
maxLines: null,
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
cursorColor: const Color(0xFF6F61EF),
|
||||
validator: _model.emailAddressTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
var shouldSetState = false;
|
||||
_model.req = await PhpGroup.forgotPasswordCall.call(
|
||||
email: _model.emailAddressTextController.text,
|
||||
);
|
||||
shouldSetState = true;
|
||||
if (PhpGroup.forgotPasswordCall.error(
|
||||
(_model.req?.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
Navigator.pop(context);
|
||||
} else {
|
||||
if (shouldSetState) setState(() {});
|
||||
return;
|
||||
}
|
||||
|
||||
if (shouldSetState) setState(() {});
|
||||
},
|
||||
text: FFLocalizations.of(context).getText(
|
||||
'74rnd5bu' /* Enviar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: 270.0,
|
||||
height: 50.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: const Color(0xFF1AAB5F),
|
||||
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: Colors.white,
|
||||
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,
|
||||
),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/on_boarding/on_boarding_beta/sign_in_component/sign_in_component_widget.dart';
|
||||
import '/on_boarding/on_boarding_beta/sign_up_component/sign_up_component_widget.dart';
|
||||
import '/on_boarding/on_boarding_beta/welcome_component/welcome_component_widget.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 signInComponent component.
|
||||
late SignInComponentModel signInComponentModel;
|
||||
// Model for signUpComponent component.
|
||||
late SignUpComponentModel signUpComponentModel;
|
||||
// Model for welcomeComponent component.
|
||||
late WelcomeComponentModel welcomeComponentModel;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
signInComponentModel = createModel(context, () => SignInComponentModel());
|
||||
signUpComponentModel = createModel(context, () => SignUpComponentModel());
|
||||
welcomeComponentModel = createModel(context, () => WelcomeComponentModel());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
signInComponentModel.dispose();
|
||||
signUpComponentModel.dispose();
|
||||
welcomeComponentModel.dispose();
|
||||
}
|
||||
|
||||
/// Action blocks.
|
||||
Future toggleOnBoardingActionPage(
|
||||
BuildContext context, {
|
||||
required String? toggleValue,
|
||||
}) async {
|
||||
toggleIdx = toggleValue!;
|
||||
}
|
||||
}
|
|
@ -1,131 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/on_boarding/on_boarding_beta/sign_in_component/sign_in_component_widget.dart';
|
||||
import '/on_boarding/on_boarding_beta/sign_up_component/sign_up_component_widget.dart';
|
||||
import '/on_boarding/on_boarding_beta/welcome_component/welcome_component_widget.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.signInComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: SignInComponentWidget(
|
||||
toggleOnBoardingPageAction: (toggleValueSignInParam) async {
|
||||
await _model.toggleOnBoardingActionPage(
|
||||
context,
|
||||
toggleValue: toggleValueSignInParam,
|
||||
);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
if (_model.toggleIdx == 'SignUp')
|
||||
wrapWithModel(
|
||||
model: _model.signUpComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: SignUpComponentWidget(
|
||||
toggleOnBoardingPageAction: (toggleValueSignUpParam) async {
|
||||
await _model.toggleOnBoardingActionPage(
|
||||
context,
|
||||
toggleValue: toggleValueSignUpParam,
|
||||
);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
if (_model.toggleIdx == 'welcome')
|
||||
wrapWithModel(
|
||||
model: _model.welcomeComponentModel,
|
||||
updateCallback: () => setState(() {}),
|
||||
updateOnChange: true,
|
||||
child: WelcomeComponentWidget(
|
||||
toggleOnboardingPageAction:
|
||||
(toggleValueWelcomeParam) async {
|
||||
await _model.toggleOnBoardingActionPage(
|
||||
context,
|
||||
toggleValue: toggleValueWelcomeParam,
|
||||
);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,899 +0,0 @@
|
|||
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 '/on_boarding/on_boarding_beta/forgot_password_component/forgot_password_component_widget.dart';
|
||||
import '/actions/actions.dart' as action_blocks;
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'sign_in_component_model.dart';
|
||||
export 'sign_in_component_model.dart';
|
||||
|
||||
class SignInComponentWidget extends StatefulWidget {
|
||||
const SignInComponentWidget({
|
||||
super.key,
|
||||
required this.toggleOnBoardingPageAction,
|
||||
});
|
||||
|
||||
final Future Function(String toggleValueSignInParam)?
|
||||
toggleOnBoardingPageAction;
|
||||
|
||||
@override
|
||||
State<SignInComponentWidget> createState() => _SignInComponentWidgetState();
|
||||
}
|
||||
|
||||
class _SignInComponentWidgetState extends State<SignInComponentWidget>
|
||||
with TickerProviderStateMixin {
|
||||
late SignInComponentModel _model;
|
||||
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => SignInComponentModel());
|
||||
|
||||
_model.emailAddressTextController ??= TextEditingController();
|
||||
_model.emailAddressFocusNode ??= FocusNode();
|
||||
|
||||
_model.passwordTextController ??= TextEditingController();
|
||||
_model.passwordFocusNode ??= FocusNode();
|
||||
|
||||
animationsMap.addAll({
|
||||
'containerOnPageLoadAnimation': AnimationInfo(
|
||||
trigger: AnimationTrigger.onPageLoad,
|
||||
effectsBuilder: () => [
|
||||
VisibilityEffect(duration: 1.ms),
|
||||
FadeEffect(
|
||||
curve: Curves.easeInOut,
|
||||
delay: 0.0.ms,
|
||||
duration: 300.0.ms,
|
||||
begin: 0.0,
|
||||
end: 1.0,
|
||||
),
|
||||
MoveEffect(
|
||||
curve: Curves.easeInOut,
|
||||
delay: 0.0.ms,
|
||||
duration: 300.0.ms,
|
||||
begin: const Offset(0.0, 140.0),
|
||||
end: const Offset(0.0, 0.0),
|
||||
),
|
||||
ScaleEffect(
|
||||
curve: Curves.easeInOut,
|
||||
delay: 0.0.ms,
|
||||
duration: 300.0.ms,
|
||||
begin: const Offset(0.9, 0.9),
|
||||
end: const Offset(1.0, 1.0),
|
||||
),
|
||||
TiltEffect(
|
||||
curve: Curves.easeInOut,
|
||||
delay: 0.0.ms,
|
||||
duration: 300.0.ms,
|
||||
begin: const Offset(-0.349, 0),
|
||||
end: const Offset(0, 0),
|
||||
),
|
||||
],
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: double.infinity,
|
||||
decoration: const BoxDecoration(),
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(0.0, 35.0, 0.0, 35.0),
|
||||
child: Container(
|
||||
width: 548.0,
|
||||
height: 112.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 1.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(3.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'9hbdjxrz' /* VAMOS LA! ENTRE COM A SUA CONT... */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 291.0,
|
||||
height: 167.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: Image.network(
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/sr43ucngg4a4/Vector.png',
|
||||
width: 603.0,
|
||||
height: 155.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
34.0, 0.0, 34.0, 0.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: 570.0,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
shape: BoxShape.rectangle,
|
||||
),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(32.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
controller: _model
|
||||
.emailAddressTextController,
|
||||
focusNode:
|
||||
_model.emailAddressFocusNode,
|
||||
autofocus: false,
|
||||
textCapitalization:
|
||||
TextCapitalization.none,
|
||||
textInputAction:
|
||||
TextInputAction.next,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelText:
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'1ltg0ylb' /* Email */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.success,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
suffixIcon: Icon(
|
||||
Icons.email,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 22.0,
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
keyboardType:
|
||||
TextInputType.emailAddress,
|
||||
validator: _model
|
||||
.emailAddressTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
controller:
|
||||
_model.passwordTextController,
|
||||
focusNode: _model.passwordFocusNode,
|
||||
autofocus: false,
|
||||
textInputAction:
|
||||
TextInputAction.send,
|
||||
obscureText:
|
||||
!_model.passwordVisibility,
|
||||
decoration: InputDecoration(
|
||||
labelText:
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'2x19ce8k' /* Senha */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFF1AAB5F),
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFFFF5963),
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFFFF5963),
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
filled: true,
|
||||
fillColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
suffixIcon: InkWell(
|
||||
onTap: () => setState(
|
||||
() => _model
|
||||
.passwordVisibility =
|
||||
!_model
|
||||
.passwordVisibility,
|
||||
),
|
||||
focusNode: FocusNode(
|
||||
skipTraversal: true),
|
||||
child: Icon(
|
||||
_model.passwordVisibility
|
||||
? Icons
|
||||
.visibility_outlined
|
||||
: Icons
|
||||
.visibility_off_outlined,
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
validator: _model
|
||||
.passwordTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
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: ((_model.emailAddressTextController
|
||||
.text ==
|
||||
'') &&
|
||||
(_model.passwordTextController
|
||||
.text ==
|
||||
''))
|
||||
? null
|
||||
: () async {
|
||||
await action_blocks
|
||||
.singInActionApp(
|
||||
context,
|
||||
emailAdress: _model
|
||||
.emailAddressTextController
|
||||
.text,
|
||||
password: _model
|
||||
.passwordTextController
|
||||
.text,
|
||||
);
|
||||
setState(() {});
|
||||
},
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'k44tm7wo' /* 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),
|
||||
disabledColor:
|
||||
const Color(0x951AAB5F),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional
|
||||
.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
await widget
|
||||
.toggleOnBoardingPageAction
|
||||
?.call(
|
||||
'SignUp',
|
||||
);
|
||||
},
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'14u7ipws' /* 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)
|
||||
.secondaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color:
|
||||
Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
12.0),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
} 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(
|
||||
'signInButtonLoginForm pressed ...');
|
||||
},
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'1x926nsn' /* 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)
|
||||
.accent1,
|
||||
textStyle:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
fontSize:
|
||||
16.0,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors
|
||||
.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(12.0),
|
||||
),
|
||||
showLoadingIndicator:
|
||||
false,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsetsDirectional
|
||||
.fromSTEB(0.0, 0.0,
|
||||
0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
context.pushNamed(
|
||||
'RegisterPage');
|
||||
},
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'jwvd4ai1' /* 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)
|
||||
.secondaryText,
|
||||
fontSize:
|
||||
16.0,
|
||||
letterSpacing:
|
||||
0.0,
|
||||
fontWeight:
|
||||
FontWeight
|
||||
.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors
|
||||
.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(12.0),
|
||||
),
|
||||
showLoadingIndicator:
|
||||
false,
|
||||
),
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(width: 7.0)),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
// You will have to add an action on this rich text to go to your login page.
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 12.0, 0.0, 12.0),
|
||||
child: RichText(
|
||||
textScaler:
|
||||
MediaQuery.of(context).textScaler,
|
||||
text: TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'05dx91ku' /* Você esqueceu a sua senha? */,
|
||||
),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
),
|
||||
),
|
||||
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 ForgotPasswordComponentWidget(),
|
||||
);
|
||||
},
|
||||
).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),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'olf967cj' /* Termo de Uso */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMediumFamily,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
).animateOnPageLoad(
|
||||
animationsMap['containerOnPageLoadAnimation']!),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'sign_up_component_widget.dart' show SignUpComponentWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SignUpComponentModel extends FlutterFlowModel<SignUpComponentWidget> {
|
||||
/// State fields for stateful widgets in this component.
|
||||
|
||||
// State field(s) for nameRegisterForm widget.
|
||||
FocusNode? nameRegisterFormFocusNode;
|
||||
TextEditingController? nameRegisterFormTextController;
|
||||
String? Function(BuildContext, String?)?
|
||||
nameRegisterFormTextControllerValidator;
|
||||
// State field(s) for emailRegisterForm widget.
|
||||
FocusNode? emailRegisterFormFocusNode;
|
||||
TextEditingController? emailRegisterFormTextController;
|
||||
String? Function(BuildContext, String?)?
|
||||
emailRegisterFormTextControllerValidator;
|
||||
// State field(s) for passwordRegisterForm widget.
|
||||
FocusNode? passwordRegisterFormFocusNode;
|
||||
TextEditingController? passwordRegisterFormTextController;
|
||||
late bool passwordRegisterFormVisibility;
|
||||
String? Function(BuildContext, String?)?
|
||||
passwordRegisterFormTextControllerValidator;
|
||||
// Stores action output result for [Action Block - signUpActionApp] action in SignUpButtonRegisterForm widget.
|
||||
bool? signUp;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
passwordRegisterFormVisibility = false;
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
nameRegisterFormFocusNode?.dispose();
|
||||
nameRegisterFormTextController?.dispose();
|
||||
|
||||
emailRegisterFormFocusNode?.dispose();
|
||||
emailRegisterFormTextController?.dispose();
|
||||
|
||||
passwordRegisterFormFocusNode?.dispose();
|
||||
passwordRegisterFormTextController?.dispose();
|
||||
}
|
||||
}
|
|
@ -1,770 +0,0 @@
|
|||
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 '/actions/actions.dart' as action_blocks;
|
||||
import 'package:easy_debounce/easy_debounce.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'sign_up_component_model.dart';
|
||||
export 'sign_up_component_model.dart';
|
||||
|
||||
class SignUpComponentWidget extends StatefulWidget {
|
||||
const SignUpComponentWidget({
|
||||
super.key,
|
||||
required this.toggleOnBoardingPageAction,
|
||||
});
|
||||
|
||||
final Future Function(String toggleValueSignUpParam)?
|
||||
toggleOnBoardingPageAction;
|
||||
|
||||
@override
|
||||
State<SignUpComponentWidget> createState() => _SignUpComponentWidgetState();
|
||||
}
|
||||
|
||||
class _SignUpComponentWidgetState extends State<SignUpComponentWidget>
|
||||
with TickerProviderStateMixin {
|
||||
late SignUpComponentModel _model;
|
||||
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => SignUpComponentModel());
|
||||
|
||||
_model.nameRegisterFormTextController ??= TextEditingController();
|
||||
_model.nameRegisterFormFocusNode ??= FocusNode();
|
||||
_model.nameRegisterFormFocusNode!.addListener(() => setState(() {}));
|
||||
_model.emailRegisterFormTextController ??= TextEditingController();
|
||||
_model.emailRegisterFormFocusNode ??= FocusNode();
|
||||
_model.emailRegisterFormFocusNode!.addListener(() => setState(() {}));
|
||||
_model.passwordRegisterFormTextController ??= TextEditingController();
|
||||
_model.passwordRegisterFormFocusNode ??= FocusNode();
|
||||
_model.passwordRegisterFormFocusNode!.addListener(() => setState(() {}));
|
||||
animationsMap.addAll({
|
||||
'containerOnPageLoadAnimation': AnimationInfo(
|
||||
trigger: AnimationTrigger.onPageLoad,
|
||||
effectsBuilder: () => [
|
||||
VisibilityEffect(duration: 1.ms),
|
||||
FadeEffect(
|
||||
curve: Curves.easeInOut,
|
||||
delay: 0.0.ms,
|
||||
duration: 300.0.ms,
|
||||
begin: 0.0,
|
||||
end: 1.0,
|
||||
),
|
||||
MoveEffect(
|
||||
curve: Curves.easeInOut,
|
||||
delay: 0.0.ms,
|
||||
duration: 300.0.ms,
|
||||
begin: const Offset(0.0, 140.0),
|
||||
end: const Offset(0.0, 0.0),
|
||||
),
|
||||
ScaleEffect(
|
||||
curve: Curves.easeInOut,
|
||||
delay: 0.0.ms,
|
||||
duration: 300.0.ms,
|
||||
begin: const Offset(0.9, 0.9),
|
||||
end: const Offset(1.0, 1.0),
|
||||
),
|
||||
TiltEffect(
|
||||
curve: Curves.easeInOut,
|
||||
delay: 0.0.ms,
|
||||
duration: 300.0.ms,
|
||||
begin: const Offset(-0.349, 0),
|
||||
end: const Offset(0, 0),
|
||||
),
|
||||
],
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
context.watch<FFAppState>();
|
||||
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Container(
|
||||
width: 100.0,
|
||||
height: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Container(
|
||||
width: 669.0,
|
||||
height: 112.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 291.0,
|
||||
height: 167.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: SvgPicture.network(
|
||||
'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/ug2zlyhca2sh/Frame_5.svg',
|
||||
width: 603.0,
|
||||
height: 155.0,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(34.0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
constraints: const BoxConstraints(
|
||||
maxWidth: 570.0,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
borderRadius: BorderRadius.circular(12.0),
|
||||
),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(32.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
controller: _model
|
||||
.nameRegisterFormTextController,
|
||||
focusNode: _model
|
||||
.nameRegisterFormFocusNode,
|
||||
onChanged: (_) =>
|
||||
EasyDebounce.debounce(
|
||||
'_model.nameRegisterFormTextController',
|
||||
const Duration(milliseconds: 2000),
|
||||
() => setState(() {}),
|
||||
),
|
||||
autofocus: false,
|
||||
autofillHints: const [AutofillHints.name],
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelText:
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'3corpwhd' /* Nome */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.success,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
filled: true,
|
||||
fillColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
suffixIcon: Icon(
|
||||
Icons.person,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 22.0,
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
keyboardType: TextInputType.name,
|
||||
validator: _model
|
||||
.nameRegisterFormTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
controller: _model
|
||||
.emailRegisterFormTextController,
|
||||
focusNode: _model
|
||||
.emailRegisterFormFocusNode,
|
||||
onChanged: (_) =>
|
||||
EasyDebounce.debounce(
|
||||
'_model.emailRegisterFormTextController',
|
||||
const Duration(milliseconds: 2000),
|
||||
() => setState(() {}),
|
||||
),
|
||||
autofocus: false,
|
||||
autofillHints: const [
|
||||
AutofillHints.email
|
||||
],
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
labelText:
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'80wonb69' /* Email */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.success,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.error,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
filled: true,
|
||||
fillColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
suffixIcon: Icon(
|
||||
Icons.email,
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
size: 22.0,
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor1,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
keyboardType:
|
||||
TextInputType.emailAddress,
|
||||
validator: _model
|
||||
.emailRegisterFormTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: SizedBox(
|
||||
width: double.infinity,
|
||||
child: TextFormField(
|
||||
controller: _model
|
||||
.passwordRegisterFormTextController,
|
||||
focusNode: _model
|
||||
.passwordRegisterFormFocusNode,
|
||||
onChanged: (_) =>
|
||||
EasyDebounce.debounce(
|
||||
'_model.passwordRegisterFormTextController',
|
||||
const Duration(milliseconds: 2000),
|
||||
() => setState(() {}),
|
||||
),
|
||||
autofocus: false,
|
||||
autofillHints: const [
|
||||
AutofillHints.password
|
||||
],
|
||||
obscureText: !_model
|
||||
.passwordRegisterFormVisibility,
|
||||
decoration: InputDecoration(
|
||||
labelText:
|
||||
FFLocalizations.of(context)
|
||||
.getText(
|
||||
'0firji8l' /* Senha */,
|
||||
),
|
||||
labelStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.labelLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.customColor1,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFF1AAB5F),
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFFFF5963),
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
focusedErrorBorder:
|
||||
OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
color: Color(0xFFFF5963),
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
filled: true,
|
||||
fillColor:
|
||||
FlutterFlowTheme.of(context)
|
||||
.primaryBackground,
|
||||
suffixIcon: InkWell(
|
||||
onTap: () => setState(
|
||||
() => _model
|
||||
.passwordRegisterFormVisibility =
|
||||
!_model
|
||||
.passwordRegisterFormVisibility,
|
||||
),
|
||||
focusNode: FocusNode(
|
||||
skipTraversal: true),
|
||||
child: Icon(
|
||||
_model.passwordRegisterFormVisibility
|
||||
? Icons
|
||||
.visibility_outlined
|
||||
: Icons
|
||||
.visibility_off_outlined,
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.accent1,
|
||||
size: 24.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyLarge
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
validator: _model
|
||||
.passwordRegisterFormTextControllerValidator
|
||||
.asValidator(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
var shouldSetState = false;
|
||||
_model.signUp = await action_blocks
|
||||
.signUpActionApp(
|
||||
context,
|
||||
name: _model
|
||||
.nameRegisterFormTextController
|
||||
.text,
|
||||
passwd: _model
|
||||
.passwordRegisterFormTextController
|
||||
.text,
|
||||
email: _model
|
||||
.emailRegisterFormTextController
|
||||
.text,
|
||||
device: FFAppState().device,
|
||||
);
|
||||
shouldSetState = true;
|
||||
if (_model.signUp == true) {
|
||||
await widget
|
||||
.toggleOnBoardingPageAction
|
||||
?.call(
|
||||
'SignIn',
|
||||
);
|
||||
} else {
|
||||
if (shouldSetState) {
|
||||
setState(() {});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (shouldSetState) {
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
text: FFLocalizations.of(context)
|
||||
.getText(
|
||||
'rnvdwzei' /* Cadastrar-se */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.accent1,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
),
|
||||
|
||||
// You will have to add an action on this rich text to go to your login page.
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 12.0, 0.0, 12.0),
|
||||
child: InkWell(
|
||||
splashColor: Colors.transparent,
|
||||
focusColor: Colors.transparent,
|
||||
hoverColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
onTap: () async {
|
||||
await widget
|
||||
.toggleOnBoardingPageAction
|
||||
?.call(
|
||||
'SignIn',
|
||||
);
|
||||
},
|
||||
child: RichText(
|
||||
textScaler: MediaQuery.of(context)
|
||||
.textScaler,
|
||||
text: TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'a9smhn5b' /* Você já tem uma conta? */,
|
||||
),
|
||||
style: TextStyle(
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.primaryText,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: FFLocalizations.of(
|
||||
context)
|
||||
.getText(
|
||||
'09xv5ctc' /* Clique aqui */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.primary,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
)
|
||||
],
|
||||
style:
|
||||
FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
).animateOnPageLoad(
|
||||
animationsMap['containerOnPageLoadAnimation']!),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'huygnka2' /* Termo de Uso */,
|
||||
),
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily:
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).secondaryText,
|
||||
fontSize: 14.0,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(
|
||||
FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import 'welcome_component_widget.dart' show WelcomeComponentWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class WelcomeComponentModel extends FlutterFlowModel<WelcomeComponentWidget> {
|
||||
@override
|
||||
void initState(BuildContext context) {}
|
||||
|
||||
@override
|
||||
void dispose() {}
|
||||
}
|
|
@ -1,456 +0,0 @@
|
|||
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_animate/flutter_animate.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'welcome_component_model.dart';
|
||||
export 'welcome_component_model.dart';
|
||||
|
||||
class WelcomeComponentWidget extends StatefulWidget {
|
||||
const WelcomeComponentWidget({
|
||||
super.key,
|
||||
required this.toggleOnboardingPageAction,
|
||||
});
|
||||
|
||||
final Future Function(String toggleValueWelcomeParam)?
|
||||
toggleOnboardingPageAction;
|
||||
|
||||
@override
|
||||
State<WelcomeComponentWidget> createState() => _WelcomeComponentWidgetState();
|
||||
}
|
||||
|
||||
class _WelcomeComponentWidgetState extends State<WelcomeComponentWidget>
|
||||
with TickerProviderStateMixin {
|
||||
late WelcomeComponentModel _model;
|
||||
|
||||
final animationsMap = <String, AnimationInfo>{};
|
||||
|
||||
@override
|
||||
void setState(VoidCallback callback) {
|
||||
super.setState(callback);
|
||||
_model.onUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_model = createModel(context, () => WelcomeComponentModel());
|
||||
|
||||
animationsMap.addAll({
|
||||
'containerOnPageLoadAnimation': AnimationInfo(
|
||||
trigger: AnimationTrigger.onPageLoad,
|
||||
effectsBuilder: () => [
|
||||
VisibilityEffect(duration: 1.ms),
|
||||
FadeEffect(
|
||||
curve: Curves.easeInOut,
|
||||
delay: 0.0.ms,
|
||||
duration: 300.0.ms,
|
||||
begin: 0.0,
|
||||
end: 1.0,
|
||||
),
|
||||
MoveEffect(
|
||||
curve: Curves.easeInOut,
|
||||
delay: 0.0.ms,
|
||||
duration: 300.0.ms,
|
||||
begin: const Offset(0.0, 140.0),
|
||||
end: const Offset(0.0, 0.0),
|
||||
),
|
||||
ScaleEffect(
|
||||
curve: Curves.easeInOut,
|
||||
delay: 0.0.ms,
|
||||
duration: 300.0.ms,
|
||||
begin: const Offset(0.9, 0.9),
|
||||
end: const Offset(1.0, 1.0),
|
||||
),
|
||||
TiltEffect(
|
||||
curve: Curves.easeInOut,
|
||||
delay: 0.0.ms,
|
||||
duration: 300.0.ms,
|
||||
begin: const Offset(-0.349, 0),
|
||||
end: const Offset(0, 0),
|
||||
),
|
||||
],
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_model.maybeDispose();
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: SafeArea(
|
||||
child: Container(
|
||||
width: 648.0,
|
||||
height: 208.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
),
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Align(
|
||||
alignment: const AlignmentDirectional(0.0, 0.0),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(14.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context).accent1,
|
||||
fontSize: 24.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: const AlignmentDirectional(0.0, -1.0),
|
||||
child: Text(
|
||||
FFLocalizations.of(context).getText(
|
||||
'5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.displaySmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primaryText,
|
||||
fontSize: 15.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w600,
|
||||
useGoogleFonts: GoogleFonts.asMap()
|
||||
.containsKey('Plus Jakarta Sans'),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 284.0,
|
||||
height: 200.0,
|
||||
decoration: const BoxDecoration(),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(0.0),
|
||||
child: SvgPicture.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: () async {
|
||||
await widget
|
||||
.toggleOnboardingPageAction
|
||||
?.call(
|
||||
'SignIn',
|
||||
);
|
||||
},
|
||||
text:
|
||||
FFLocalizations.of(context).getText(
|
||||
'dynet730' /* Entrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.info,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
await widget
|
||||
.toggleOnboardingPageAction
|
||||
?.call(
|
||||
'SignUp',
|
||||
);
|
||||
},
|
||||
text:
|
||||
FFLocalizations.of(context).getText(
|
||||
'hha60cg7' /* Cadastrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.customColor1,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily: 'Plus Jakarta Sans',
|
||||
color:
|
||||
FlutterFlowTheme.of(context)
|
||||
.customColor3,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
} else {
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
context.pushNamed(
|
||||
'LoginPage',
|
||||
queryParameters: {
|
||||
'device': serializeParam(
|
||||
'',
|
||||
ParamType.String,
|
||||
),
|
||||
}.withoutNulls,
|
||||
);
|
||||
},
|
||||
text: FFLocalizations.of(context)
|
||||
.getText(
|
||||
'zvtay8ee' /* Entrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 16.0),
|
||||
child: FFButtonWidget(
|
||||
onPressed: () async {
|
||||
context.pushNamed('RegisterPage');
|
||||
},
|
||||
text: FFLocalizations.of(context)
|
||||
.getText(
|
||||
'o6zob50a' /* Cadastrar */,
|
||||
),
|
||||
options: FFButtonOptions(
|
||||
width: double.infinity,
|
||||
height: 44.0,
|
||||
padding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
iconPadding:
|
||||
const EdgeInsetsDirectional.fromSTEB(
|
||||
0.0, 0.0, 0.0, 0.0),
|
||||
color: FlutterFlowTheme.of(context)
|
||||
.primary,
|
||||
textStyle: FlutterFlowTheme.of(
|
||||
context)
|
||||
.titleSmall
|
||||
.override(
|
||||
fontFamily:
|
||||
'Plus Jakarta Sans',
|
||||
color: FlutterFlowTheme.of(
|
||||
context)
|
||||
.secondaryText,
|
||||
fontSize: 16.0,
|
||||
letterSpacing: 0.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
useGoogleFonts: GoogleFonts
|
||||
.asMap()
|
||||
.containsKey(
|
||||
'Plus Jakarta Sans'),
|
||||
),
|
||||
elevation: 3.0,
|
||||
borderSide: const BorderSide(
|
||||
color: Colors.transparent,
|
||||
width: 1.0,
|
||||
),
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.0),
|
||||
),
|
||||
showLoadingIndicator: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(width: 7.0)),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
).animateOnPageLoad(
|
||||
animationsMap['containerOnPageLoadAnimation']!),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,113 +0,0 @@
|
|||
import '/application_components/molecular_components/throw_exception/throw_exception_widget.dart';
|
||||
import '/backend/api_requests/api_calls.dart';
|
||||
import '/flutter_flow/flutter_flow_util.dart';
|
||||
import '/custom_code/actions/index.dart' as actions;
|
||||
import 'login_page_widget.dart' show LoginPageWidget;
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class LoginPageModel extends FlutterFlowModel<LoginPageWidget> {
|
||||
/// State fields for stateful widgets in this page.
|
||||
|
||||
final unfocusNode = FocusNode();
|
||||
// State field(s) for emailAddress widget.
|
||||
FocusNode? emailAddressFocusNode;
|
||||
TextEditingController? emailAddressTextController;
|
||||
String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
|
||||
// State field(s) for password widget.
|
||||
FocusNode? passwordFocusNode;
|
||||
TextEditingController? passwordTextController;
|
||||
late bool passwordVisibility;
|
||||
String? Function(BuildContext, String?)? passwordTextControllerValidator;
|
||||
|
||||
@override
|
||||
void initState(BuildContext context) {
|
||||
passwordVisibility = false;
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
unfocusNode.dispose();
|
||||
emailAddressFocusNode?.dispose();
|
||||
emailAddressTextController?.dispose();
|
||||
|
||||
passwordFocusNode?.dispose();
|
||||
passwordTextController?.dispose();
|
||||
}
|
||||
|
||||
/// Action blocks.
|
||||
Future signInActionPage(
|
||||
BuildContext context, {
|
||||
required String? emailAdress,
|
||||
required String? passwd,
|
||||
}) async {
|
||||
String? devUUID;
|
||||
ApiCallResponse? loginCall;
|
||||
|
||||
await Future.wait([
|
||||
Future(() async {
|
||||
FFAppState().email = emailAdress!;
|
||||
}),
|
||||
Future(() async {
|
||||
FFAppState().passwd = passwd!;
|
||||
}),
|
||||
]);
|
||||
if ((FFAppState().email != '') &&
|
||||
(FFAppState().passwd != '')) {
|
||||
devUUID = await actions.getDevUUID();
|
||||
FFAppState().devUUID = devUUID!;
|
||||
loginCall = await PhpGroup.loginCall.call(
|
||||
email: FFAppState().email,
|
||||
password: FFAppState().passwd,
|
||||
uuid: FFAppState().devUUID,
|
||||
type: FFAppState().device,
|
||||
description: '',
|
||||
);
|
||||
FFAppState().userUUID = FFAppState().userUUID;
|
||||
if (PhpGroup.loginCall.error(
|
||||
(loginCall.jsonBody ?? ''),
|
||||
) ==
|
||||
false) {
|
||||
FFAppState().isLogged = true;
|
||||
|
||||
context.goNamed(
|
||||
'homePage',
|
||||
extra: <String, dynamic>{
|
||||
kTransitionInfoKey: const TransitionInfo(
|
||||
hasTransition: true,
|
||||
transitionType: PageTransitionType.fade,
|
||||
),
|
||||
},
|
||||
);
|
||||
} else {
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
backgroundColor: Colors.transparent,
|
||||
enableDrag: false,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return GestureDetector(
|
||||
onTap: () => unfocusNode.canRequestFocus
|
||||
? FocusScope.of(context).requestFocus(unfocusNode)
|
||||
: FocusScope.of(context).unfocus(),
|
||||
child: Padding(
|
||||
padding: MediaQuery.viewInsetsOf(context),
|
||||
child: ThrowExceptionWidget(
|
||||
msg: PhpGroup.loginCall.msg(
|
||||
(loginCall?.jsonBody ?? ''),
|
||||
)!,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
FFAppState().email = '';
|
||||
FFAppState().passwd = '';
|
||||
FFAppState().update(() {});
|
||||
}
|
||||
} else {
|
||||
FFAppState().email = '';
|
||||
FFAppState().passwd = '';
|
||||
}
|
||||
}
|
||||
}
|
12
pubspec.yaml
12
pubspec.yaml
|
@ -27,13 +27,21 @@ dependencies:
|
|||
sdk: flutter
|
||||
auto_size_text: 3.0.0
|
||||
cached_network_image: 3.3.1
|
||||
carousel_slider: 4.2.1
|
||||
cloud_functions: 4.6.7
|
||||
cloud_functions_platform_interface: 5.5.18
|
||||
cloud_functions_web: 4.7.1
|
||||
collection: 1.18.0
|
||||
crop_your_image: 1.0.0
|
||||
device_info_plus: 9.1.2
|
||||
dropdown_button2: 2.3.9
|
||||
easy_debounce: 2.0.1
|
||||
equatable: 2.0.5
|
||||
file_picker: 6.1.1
|
||||
firebase_core: 2.26.0
|
||||
firebase_core_platform_interface: 5.0.0
|
||||
firebase_core_web: 2.11.5
|
||||
firebase_messaging: 14.7.18
|
||||
firebase_messaging_platform_interface: 4.5.26
|
||||
firebase_messaging_web: 3.6.7
|
||||
flutter_animate: 4.1.1+1
|
||||
flutter_cache_manager: 3.3.1
|
||||
flutter_plugin_android_lifecycle: 2.0.17
|
||||
|
|
Loading…
Reference in New Issue