diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 08fca23b..a88ef9c2 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -5,8 +5,7 @@
-
-
+
: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
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 5f2695cd..19a32d68 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -44,8 +44,8 @@
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
- 6436409527A31CDE00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; };
- 6436409227A31CDC00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
+ 6436409A27A31CDE00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; };
+ 6436409A27A31CD500820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
/* 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 = "";
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index ed9b52db..f485c607 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -52,6 +52,11 @@
NSPhotoLibraryUsageDescription
In order to upload data, this app requires permission to access the photo library.
+ UIBackgroundModes
+
+ fetch
+ remote-notification
+
UILaunchStoryboardName
diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements
index 6631ffa6..2cf02109 100644
--- a/ios/Runner/Runner.entitlements
+++ b/ios/Runner/Runner.entitlements
@@ -2,5 +2,7 @@
+ aps-environment
+ development
diff --git a/lib/actions/actions.dart b/lib/actions/actions.dart
index 6cbc3c59..a5b0d07b 100644
--- a/lib/actions/actions.dart
+++ b/lib/actions/actions.dart
@@ -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? visitorJsonList,
String? visitorStrList,
@@ -56,220 +51,3 @@ Future repeatVisitScheduleAction(
}.withoutNulls,
);
}
-
-Future 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: {
- 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 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';
- }
- }
-}
diff --git a/lib/application_components/organism_components/local_profile_component/local_profile_component_widget.dart b/lib/application_components/organism_components/local_profile_component/local_profile_component_widget.dart
index ec4c3b0a..d63fabf0 100644
--- a/lib/application_components/organism_components/local_profile_component/local_profile_component_widget.dart
+++ b/lib/application_components/organism_components/local_profile_component/local_profile_component_widget.dart
@@ -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();
- 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(
- '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(
+ '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(
- 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(
+ 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'),
+ ),
+ ),
+ ],
+ ),
+ ],
),
);
}
diff --git a/lib/application_components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart b/lib/application_components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart
index 607e68af..798a0c96 100644
--- a/lib/application_components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart
+++ b/lib/application_components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart
@@ -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 createState() =>
@@ -48,6 +46,8 @@ class _MenuListViewComponentWidgetState
@override
Widget build(BuildContext context) {
+ context.watch();
+
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)),
+ ),
+ ),
+ ),
+ ),
+ ],
),
),
),
diff --git a/lib/application_components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart b/lib/application_components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart
index 8fc6e479..85226519 100644
--- a/lib/application_components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart
+++ b/lib/application_components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart
@@ -10,14 +10,10 @@ export 'menu_staggered_view_component_model.dart';
class MenuStaggeredViewComponentWidget extends StatefulWidget {
const MenuStaggeredViewComponentWidget({
super.key,
- required this.changeMenuStyleAction,
- required this.registerVisitorOptAction,
- required this.scheduleVisitOptAction,
+ required this.changeMenuStyle,
});
- final Future Function()? changeMenuStyleAction;
- final Future Function()? registerVisitorOptAction;
- final Future Function()? scheduleVisitOptAction;
+ final Future Function()? changeMenuStyle;
@override
State createState() =>
@@ -61,7 +57,7 @@ class _MenuStaggeredViewComponentWidgetState
children: [
Container(
width: double.infinity,
- height: MediaQuery.sizeOf(context).height * 0.35,
+ height: 430.0,
decoration: const BoxDecoration(),
child: Padding(
padding: const EdgeInsets.all(16.0),
@@ -72,39 +68,38 @@ class _MenuStaggeredViewComponentWidgetState
),
crossAxisSpacing: 10.0,
mainAxisSpacing: 10.0,
- itemCount: 5,
+ itemCount: 7,
shrinkWrap: true,
itemBuilder: (context, index) {
return [
- () => InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.scheduleVisitOptAction?.call();
- },
+ () => Padding(
+ padding: EdgeInsets.all(valueOrDefault(
+ () {
+ if (MediaQuery.sizeOf(context).width <
+ kBreakpointSmall) {
+ return 0.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointMedium) {
+ return 24.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointLarge) {
+ return 24.0;
+ } else {
+ return 0.0;
+ }
+ }(),
+ 0.0,
+ )),
child: Container(
width: 100.0,
height: 100.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,
),
),
@@ -141,7 +136,7 @@ class _MenuStaggeredViewComponentWidgetState
alignment: const AlignmentDirectional(
0.0, 0.0),
child: Icon(
- FFIcons.kvector1,
+ FFIcons.kfast,
color:
FlutterFlowTheme.of(context)
.accent1,
@@ -165,8 +160,8 @@ class _MenuStaggeredViewComponentWidgetState
const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
- 'ee33l0ms' /* Agendar
-Visita */
+ 'jn7p6pj6' /* Agenda
+Auto-Visita */
,
),
style: FlutterFlowTheme.of(context)
@@ -193,35 +188,34 @@ Visita */
),
),
),
- () => InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.registerVisitorOptAction?.call();
- },
+ () => Padding(
+ padding: EdgeInsets.all(valueOrDefault(
+ () {
+ if (MediaQuery.sizeOf(context).width <
+ kBreakpointSmall) {
+ return 0.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointMedium) {
+ return 24.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointLarge) {
+ return 24.0;
+ } else {
+ return 0.0;
+ }
+ }(),
+ 0.0,
+ )),
child: Container(
width: 100.0,
height: 100.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,
),
),
@@ -282,8 +276,8 @@ Visita */
const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
- 'ya37l3jt' /* Cadastrar
- Visitante */
+ 'yymmdtyv' /* Cadastrar
+Visitante */
,
),
style: FlutterFlowTheme.of(context)
@@ -310,318 +304,583 @@ Visita */
),
),
),
- () => Container(
- width: 100.0,
- height: 100.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,
- width: 0.5,
+ () => Padding(
+ padding: EdgeInsets.all(valueOrDefault(
+ () {
+ if (MediaQuery.sizeOf(context).width <
+ kBreakpointSmall) {
+ return 0.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointMedium) {
+ return 24.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointLarge) {
+ return 24.0;
+ } else {
+ return 0.0;
+ }
+ }(),
+ 0.0,
+ )),
+ child: Container(
+ width: 100.0,
+ height: 100.0,
+ 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.khome,
- color:
- FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
+ 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.khome,
+ 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(
- 'h8s3adu8' /* Vincular
+ 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(
+ 'f2jbm9jz' /* Vincular
Condomínio */
- ,
+ ,
+ ),
+ 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'),
+ ),
),
- 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)),
+ ].divide(const SizedBox(height: 0.0)),
+ ),
),
),
),
- () => Container(
- width: 100.0,
- height: 100.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,
- width: 0.5,
+ () => Padding(
+ padding: EdgeInsets.all(valueOrDefault(
+ () {
+ if (MediaQuery.sizeOf(context).width <
+ kBreakpointSmall) {
+ return 0.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointMedium) {
+ return 24.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointLarge) {
+ return 24.0;
+ } else {
+ return 0.0;
+ }
+ }(),
+ 0.0,
+ )),
+ child: Container(
+ width: 100.0,
+ height: 100.0,
+ 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.kpets,
- color:
- FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
+ 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.kpets,
+ 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(
- 'j6tfixen' /* Cadastrar
+ 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(
+ 'rs5a7h6m' /* Cadastrar
Pet */
- ,
+ ,
+ ),
+ 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'),
+ ),
),
- 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)),
+ ].divide(const SizedBox(height: 0.0)),
+ ),
),
),
),
- () => Container(
- width: 100.0,
- height: 100.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,
- width: 0.5,
+ () => Padding(
+ padding: EdgeInsets.all(valueOrDefault(
+ () {
+ if (MediaQuery.sizeOf(context).width <
+ kBreakpointSmall) {
+ return 0.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointMedium) {
+ return 24.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointLarge) {
+ return 24.0;
+ } else {
+ return 0.0;
+ }
+ }(),
+ 0.0,
+ )),
+ child: Container(
+ width: 100.0,
+ height: 100.0,
+ 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.kvector2,
- color:
- FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
+ 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.kvector1,
+ 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(
- '9tli4i2x' /* QR Code
-de Acesso */
- ,
+ 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(
+ 'if2zuaok' /* 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'),
+ ),
),
- 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)),
+ ].divide(const SizedBox(height: 0.0)),
+ ),
+ ),
+ ),
+ ),
+ () => Padding(
+ padding: EdgeInsets.all(valueOrDefault(
+ () {
+ if (MediaQuery.sizeOf(context).width <
+ kBreakpointSmall) {
+ return 0.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointMedium) {
+ return 24.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointLarge) {
+ return 24.0;
+ } else {
+ return 0.0;
+ }
+ }(),
+ 0.0,
+ )),
+ child: Container(
+ width: 100.0,
+ height: 100.0,
+ 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.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(
+ 'r4mjqq6s' /* 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: EdgeInsets.all(valueOrDefault(
+ () {
+ if (MediaQuery.sizeOf(context).width <
+ kBreakpointSmall) {
+ return 0.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointMedium) {
+ return 24.0;
+ } else if (MediaQuery.sizeOf(context).width <
+ kBreakpointLarge) {
+ return 24.0;
+ } else {
+ return 0.0;
+ }
+ }(),
+ 0.0,
+ )),
+ child: Container(
+ width: 100.0,
+ height: 100.0,
+ 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.kvector2,
+ 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(
+ 'cilu7ief' /* QR Code
+de Acesso */
+ ,
+ ),
+ 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)),
+ ),
),
),
),
@@ -655,7 +914,7 @@ de Acesso */
color: FlutterFlowTheme.of(context).primary,
),
onPressed: () async {
- await widget.changeMenuStyleAction?.call();
+ await widget.changeMenuStyle?.call();
},
),
),
diff --git a/lib/application_components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart b/lib/application_components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart
index 83d530d2..df34ecea 100644
--- a/lib/application_components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart
+++ b/lib/application_components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart
@@ -921,6 +921,7 @@ class _ScheduleVisitDetailWidgetState extends State {
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 {
functions.extractIdToStr(widget.visitResonStr!),
idNAC: functions.extractIdToStr(widget.visitLevelStr!),
obs: widget.visitObsStr,
- cliID: FFAppState().cliUUID,
);
if (PhpGroup.postScheduleVisitCall.error(
(_model.postScheduleVisit?.jsonBody ?? ''),
diff --git a/lib/application_components/organism_components/view_visit_detail/view_visit_detail_model.dart b/lib/application_components/organism_components/view_visit_detail/view_visit_detail_model.dart
index 32e250ab..883791c9 100644
--- a/lib/application_components/organism_components/view_visit_detail/view_visit_detail_model.dart
+++ b/lib/application_components/organism_components/view_visit_detail/view_visit_detail_model.dart
@@ -4,10 +4,12 @@ import 'view_visit_detail_widget.dart' show ViewVisitDetailWidget;
import 'package:flutter/material.dart';
class ViewVisitDetailModel extends FlutterFlowModel {
+ /// 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;
diff --git a/lib/application_components/organism_components/view_visit_detail/view_visit_detail_widget.dart b/lib/application_components/organism_components/view_visit_detail/view_visit_detail_widget.dart
index a19cff25..d48a2c31 100644
--- a/lib/application_components/organism_components/view_visit_detail/view_visit_detail_widget.dart
+++ b/lib/application_components/organism_components/view_visit_detail/view_visit_detail_widget.dart
@@ -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 {
// 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 {
width: double.infinity,
height: 35.0,
decoration: BoxDecoration(
- color: valueOrDefault(
- _model.visitStatusColor,
- FlutterFlowTheme.of(context).primary,
- ),
+ color: _model.statusColor,
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(0.0),
bottomRight: Radius.circular(0.0),
diff --git a/lib/application_components/templates_components/menu_component/menu_component_model.dart b/lib/application_components/templates_components/menu_component/menu_component_model.dart
index b7be1afb..1fe72b77 100644
--- a/lib/application_components/templates_components/menu_component/menu_component_model.dart
+++ b/lib/application_components/templates_components/menu_component/menu_component_model.dart
@@ -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 {
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');
- }
}
diff --git a/lib/application_components/templates_components/menu_component/menu_component_widget.dart b/lib/application_components/templates_components/menu_component/menu_component_widget.dart
index b03e32ff..b89f8671 100644
--- a/lib/application_components/templates_components/menu_component/menu_component_widget.dart
+++ b/lib/application_components/templates_components/menu_component/menu_component_widget.dart
@@ -50,14 +50,6 @@ class _MenuComponentWidgetState extends State {
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 {
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(() {});
- },
),
);
}
diff --git a/lib/application_components/templates_components/visit_history_component/visit_history_component_model.dart b/lib/application_components/templates_components/visit_history_component/visit_history_component_model.dart
deleted file mode 100644
index 03f37209..00000000
--- a/lib/application_components/templates_components/visit_history_component/visit_history_component_model.dart
+++ /dev/null
@@ -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 {
- @override
- void initState(BuildContext context) {}
-
- @override
- void dispose() {}
-}
diff --git a/lib/application_components/templates_components/visit_history_component/visit_history_component_widget.dart b/lib/application_components/templates_components/visit_history_component/visit_history_component_widget.dart
deleted file mode 100644
index b33ddd82..00000000
--- a/lib/application_components/templates_components/visit_history_component/visit_history_component_widget.dart
+++ /dev/null
@@ -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 createState() =>
- _VisitHistoryComponentWidgetState();
-}
-
-class _VisitHistoryComponentWidgetState
- extends State {
- 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();
-
- 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(
- 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(
- () {
- 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(
- '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(
- '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(
- () {
- 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),
- ),
- ),
- ),
- ),
- ],
- ),
- );
- },
- );
- },
- );
- },
- ),
- ),
- ),
- ],
- ),
- );
- }
-}
diff --git a/lib/application_components/templates_components/visitor_search_component/visitor_search_component_widget.dart b/lib/application_components/templates_components/visitor_search_component/visitor_search_component_widget.dart
index 42495373..15cd8948 100644
--- a/lib/application_components/templates_components/visitor_search_component/visitor_search_component_widget.dart
+++ b/lib/application_components/templates_components/visitor_search_component/visitor_search_component_widget.dart
@@ -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(
- '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,
diff --git a/lib/application_pages/fast_pass_page/fast_pass_page_model.dart b/lib/application_pages/fast_pass_page/fast_pass_page_model.dart
deleted file mode 100644
index 2b4d9d53..00000000
--- a/lib/application_pages/fast_pass_page/fast_pass_page_model.dart
+++ /dev/null
@@ -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 {
- /// State fields for stateful widgets in this page.
-
- final unfocusNode = FocusNode();
-
- @override
- void initState(BuildContext context) {}
-
- @override
- void dispose() {
- unfocusNode.dispose();
- }
-}
diff --git a/lib/application_pages/fast_pass_page/fast_pass_page_widget.dart b/lib/application_pages/fast_pass_page/fast_pass_page_widget.dart
deleted file mode 100644
index 5edf4ae4..00000000
--- a/lib/application_pages/fast_pass_page/fast_pass_page_widget.dart
+++ /dev/null
@@ -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 createState() => _FastPassPageWidgetState();
-}
-
-class _FastPassPageWidgetState extends State {
- late FastPassPageModel _model;
-
- final scaffoldKey = GlobalKey();
-
- @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,
- ),
- );
- }
-}
diff --git a/lib/on_boarding/on_boarding_legacy/forgot_password_page/forgot_password_page_model.dart b/lib/application_pages/forgot_password_page/forgot_password_page_model.dart
similarity index 100%
rename from lib/on_boarding/on_boarding_legacy/forgot_password_page/forgot_password_page_model.dart
rename to lib/application_pages/forgot_password_page/forgot_password_page_model.dart
diff --git a/lib/on_boarding/on_boarding_legacy/forgot_password_page/forgot_password_page_widget.dart b/lib/application_pages/forgot_password_page/forgot_password_page_widget.dart
similarity index 97%
rename from lib/on_boarding/on_boarding_legacy/forgot_password_page/forgot_password_page_widget.dart
rename to lib/application_pages/forgot_password_page/forgot_password_page_widget.dart
index 51646517..b30452d5 100644
--- a/lib/on_boarding/on_boarding_legacy/forgot_password_page/forgot_password_page_widget.dart
+++ b/lib/application_pages/forgot_password_page/forgot_password_page_widget.dart
@@ -52,7 +52,7 @@ class _ForgotPasswordPageWidgetState extends State {
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 {
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 {
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 {
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 {
.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 {
if (shouldSetState) setState(() {});
},
text: FFLocalizations.of(context).getText(
- 'e7hdgc4q' /* Enviar */,
+ 'z9ghb8dz' /* Enviar */,
),
options: FFButtonOptions(
width: 270.0,
diff --git a/lib/application_pages/home_page/home_page_widget.dart b/lib/application_pages/home_page/home_page_widget.dart
index cfe4a776..592e11b6 100644
--- a/lib/application_pages/home_page/home_page_widget.dart
+++ b/lib/application_pages/home_page/home_page_widget.dart
@@ -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 createState() => _HomePageWidgetState();
@@ -829,16 +836,7 @@ class _HomePageWidgetState extends State {
FFAppState().isLogged = false;
setState(() {});
- context.goNamed(
- 'onBoardingPage',
- extra: {
- 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 {
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 {
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 {
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 {
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 {
),
),
),
- 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(),
),
],
),
diff --git a/lib/on_boarding/on_boarding_beta/sign_in_component/sign_in_component_model.dart b/lib/application_pages/login_page/login_page_model.dart
similarity index 65%
rename from lib/on_boarding/on_boarding_beta/sign_in_component/sign_in_component_model.dart
rename to lib/application_pages/login_page/login_page_model.dart
index 9642203c..92a3fd94 100644
--- a/lib/on_boarding/on_boarding_beta/sign_in_component/sign_in_component_model.dart
+++ b/lib/application_pages/login_page/login_page_model.dart
@@ -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 {
- /// State fields for stateful widgets in this component.
+class LoginPageModel extends FlutterFlowModel {
+ /// 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 {
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 {
@override
void dispose() {
+ unfocusNode.dispose();
emailAddressFocusNode?.dispose();
emailAddressTextController?.dispose();
diff --git a/lib/on_boarding/on_boarding_legacy/login_page/login_page_widget.dart b/lib/application_pages/login_page/login_page_widget.dart
similarity index 80%
rename from lib/on_boarding/on_boarding_legacy/login_page/login_page_widget.dart
rename to lib/application_pages/login_page/login_page_widget.dart
index ab64048d..19b87afc 100644
--- a/lib/on_boarding/on_boarding_legacy/login_page/login_page_widget.dart
+++ b/lib/application_pages/login_page/login_page_widget.dart
@@ -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
@override
Widget build(BuildContext context) {
+ context.watch();
+
return GestureDetector(
onTap: () => _model.unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(_model.unfocusNode)
@@ -141,26 +146,28 @@ class _LoginPageWidgetState extends State
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
FFLocalizations.of(
context)
.getText(
- 'f2go5a71' /* Email */,
+ '90ls8ppo' /* Email */,
),
labelStyle:
FlutterFlowTheme.of(
@@ -364,7 +371,7 @@ class _LoginPageWidgetState extends State
FFLocalizations.of(
context)
.getText(
- 'paon3y0v' /* Senha */,
+ 'rvlumyaw' /* Senha */,
),
labelStyle:
FlutterFlowTheme.of(
@@ -507,21 +514,182 @@ class _LoginPageWidgetState extends State
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: {
+ 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
text: FFLocalizations
.of(context)
.getText(
- 'j8567afe' /* Cadastrar */,
+ 'zj6pyujp' /* Cadastrar */,
),
options:
FFButtonOptions(
@@ -682,7 +850,7 @@ class _LoginPageWidgetState extends State
text: FFLocalizations
.of(context)
.getText(
- 'y3wd9q18' /* Entrar */,
+ 'iqhyif1d' /* Entrar */,
),
options:
FFButtonOptions(
@@ -763,7 +931,7 @@ class _LoginPageWidgetState extends State
text: FFLocalizations
.of(context)
.getText(
- 'j6ufb6sq' /* Cadastrar */,
+ '5x5bp2u1' /* Cadastrar */,
),
options:
FFButtonOptions(
@@ -860,7 +1028,7 @@ class _LoginPageWidgetState extends State
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
text: FFLocalizations
.of(context)
.getText(
- 'di48hdaj' /* Recupere aqui */,
+ '7miyd406' /* Recupere aqui */,
),
style: FlutterFlowTheme
.of(context)
@@ -938,7 +1106,7 @@ class _LoginPageWidgetState extends State
),
Text(
FFLocalizations.of(context).getText(
- 'gx2fp6zq' /* Termo de Uso */,
+ '63xv5ewj' /* Termo de Uso */,
),
style: FlutterFlowTheme.of(context)
.bodyMedium
diff --git a/lib/on_boarding/on_boarding_legacy/register_page/register_page_model.dart b/lib/application_pages/register_page/register_page_model.dart
similarity index 89%
rename from lib/on_boarding/on_boarding_legacy/register_page/register_page_model.dart
rename to lib/application_pages/register_page/register_page_model.dart
index 4583ef8e..46bc3a25 100644
--- a/lib/on_boarding/on_boarding_legacy/register_page/register_page_model.dart
+++ b/lib/application_pages/register_page/register_page_model.dart
@@ -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 {
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) {
diff --git a/lib/on_boarding/on_boarding_legacy/register_page/register_page_widget.dart b/lib/application_pages/register_page/register_page_widget.dart
similarity index 81%
rename from lib/on_boarding/on_boarding_legacy/register_page/register_page_widget.dart
rename to lib/application_pages/register_page/register_page_widget.dart
index da8f34cc..16a5ef67 100644
--- a/lib/on_boarding/on_boarding_legacy/register_page/register_page_widget.dart
+++ b/lib/application_pages/register_page/register_page_widget.dart
@@ -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
@override
Widget build(BuildContext context) {
- context.watch();
-
return GestureDetector(
onTap: () => _model.unfocusNode.canRequestFocus
? FocusScope.of(context).requestFocus(_model.unfocusNode)
@@ -160,7 +158,7 @@ class _RegisterPageWidgetState extends State
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
.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
FFLocalizations.of(
context)
.getText(
- '8kjhi406' /* Nome */,
+ 'w0y3fz89' /* Nome */,
),
labelStyle: FlutterFlowTheme
.of(context)
@@ -398,7 +396,7 @@ class _RegisterPageWidgetState extends State
FFLocalizations.of(
context)
.getText(
- 'ro4zkkxp' /* Email */,
+ '4bfdpd0o' /* Email */,
),
labelStyle: FlutterFlowTheme
.of(context)
@@ -541,7 +539,7 @@ class _RegisterPageWidgetState extends State
FFLocalizations.of(
context)
.getText(
- 'lzgobioa' /* Senha */,
+ 'byjglkpk' /* Senha */,
),
labelStyle: FlutterFlowTheme
.of(context)
@@ -667,25 +665,171 @@ class _RegisterPageWidgetState extends State
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: {
+ 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
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
FFLocalizations.of(
context)
.getText(
- 'hfcm0td9' /* Clique aqui */,
+ 'tl8k1ld9' /* Clique aqui */,
),
style:
FlutterFlowTheme.of(
@@ -836,7 +980,7 @@ class _RegisterPageWidgetState extends State
),
Text(
FFLocalizations.of(context).getText(
- 'c3kno4t9' /* Termo de Uso */,
+ 'dbtzii7i' /* Termo de Uso */,
),
style: FlutterFlowTheme.of(context)
.bodyMedium
diff --git a/lib/application_pages/register_visitor_page/register_visitor_page_widget.dart b/lib/application_pages/register_visitor_page/register_visitor_page_widget.dart
index cb72f361..bd438bfb 100644
--- a/lib/application_pages/register_visitor_page/register_visitor_page_widget.dart
+++ b/lib/application_pages/register_visitor_page/register_visitor_page_widget.dart
@@ -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 createState() =>
diff --git a/lib/application_pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart b/lib/application_pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart
index 061b4853..e3316b73 100644
--- a/lib/application_pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart
+++ b/lib/application_pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart
@@ -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 {
/// Local state fields for this page.
+ bool toggleIdx = true;
+
List 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? visitorsJsonList,
- }) async {
- visitorJsonList = visitorsJsonList!.toList().cast();
- }
-
- Future toggleCurrentSelectionHeader(
- BuildContext context, {
- required bool? toggleIndexValue,
- }) async {
- if (toggleIndexValue == true) {
- return true;
- }
-
- return false;
- }
}
diff --git a/lib/application_pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart b/lib/application_pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart
index 71159cbe..52258ac8 100644
--- a/lib/application_pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart
+++ b/lib/application_pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart
@@ -4,7 +4,6 @@ import '/application_components/templates_components/visit_details_modal/visit_d
import '/application_components/templates_components/visitor_details_modal/visitor_details_modal_widget.dart';
import '/application_components/templates_components/visitor_search_component/visitor_search_component_widget.dart';
import '/backend/api_requests/api_calls.dart';
-import '/components/select_header_component_widget.dart';
import '/flutter_flow/flutter_flow_drop_down.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
import '/flutter_flow/flutter_flow_theme.dart';
@@ -12,8 +11,8 @@ import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/flutter_flow_widgets.dart';
import '/flutter_flow/form_field_controller.dart';
import '/flutter_flow/custom_functions.dart' as functions;
-import 'package:auto_size_text/auto_size_text.dart';
import 'package:cached_network_image/cached_network_image.dart';
+import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
@@ -83,13 +82,16 @@ class _ScheduleCompleteVisitPageWidgetState
}
});
- _model.textController1 ??= TextEditingController();
+ _model.textController1 ??= TextEditingController(
+ text: widget.visitStartDateStr != null && widget.visitStartDateStr != ''
+ ? widget.visitStartDateStr
+ : '');
_model.textFieldFocusNode1 ??= FocusNode();
_model.textController2 ??= TextEditingController();
_model.textFieldFocusNode2 ??= FocusNode();
- _model.switchValue = true;
+ _model.switchValue = false;
_model.textController3 ??= TextEditingController();
_model.textFieldFocusNode3 ??= FocusNode();
}
@@ -112,209 +114,275 @@ class _ScheduleCompleteVisitPageWidgetState
child: Scaffold(
key: scaffoldKey,
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
- appBar: AppBar(
- backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
- automaticallyImplyLeading: false,
- leading: FlutterFlowIconButton(
- borderColor: Colors.transparent,
- borderRadius: 30.0,
- borderWidth: 1.0,
- buttonSize: 60.0,
- icon: Icon(
- Icons.keyboard_arrow_left,
- color: FlutterFlowTheme.of(context).primaryText,
- size: 30.0,
- ),
- onPressed: () async {
- context.pop();
- },
- ),
- title: Text(
- FFLocalizations.of(context).getText(
- '61lcxdgm' /* Agendar Visita */,
- ),
- style: FlutterFlowTheme.of(context).headlineMedium.override(
- fontFamily: 'Nunito',
- color: FlutterFlowTheme.of(context).primaryText,
- fontSize: 15.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.bold,
- useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'),
- ),
- ),
- actions: const [],
- centerTitle: true,
- ),
- body: SafeArea(
- top: true,
- child: SingleChildScrollView(
- child: Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- wrapWithModel(
- model: _model.selectHeaderComponentModel,
- updateCallback: () => setState(() {}),
- updateOnChange: true,
- child: SelectHeaderComponentWidget(
- toggleIndexValue: _model.toggleIndexValue,
- selectToggle: (toggleIndex) async {
- _model.toggleIndexValue =
- await _model.toggleCurrentSelectionHeader(
- context,
- toggleIndexValue: toggleIndex,
- );
-
- setState(() {});
- },
- ),
- ),
- if (valueOrDefault(
- _model.toggleIndexValue == true,
- true,
- ))
- Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- Stack(
- children: [
- Container(
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .primaryBackground,
+ body: SingleChildScrollView(
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 30.0, 0.0, 0.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Expanded(
+ child: InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ _model.toggleIdx = true;
+ setState(() {});
+ },
+ child: Container(
+ width: 100.0,
+ height: 40.0,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primary,
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(0.0),
+ bottomRight: Radius.circular(100.0),
+ topLeft: Radius.circular(0.0),
+ topRight: Radius.circular(100.0),
),
- child: SingleChildScrollView(
- child: Column(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment:
- MainAxisAlignment.spaceEvenly,
- children: [
- Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 20.0, 30.0, 0.0, 30.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'qo0pg2at' /* Quais visitantes você deseja c... */,
- ),
- textAlign: TextAlign.start,
- style: FlutterFlowTheme.of(context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing: 0.0,
- fontWeight: FontWeight.bold,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily),
- ),
+ ),
+ child: Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'e4w9lbke' /* Criar Agendamento */,
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ color: FlutterFlowTheme.of(context).info,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ Expanded(
+ child: InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ _model.toggleIdx = false;
+ setState(() {});
+ },
+ child: Container(
+ width: 100.0,
+ height: 40.0,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primary,
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(100.0),
+ bottomRight: Radius.circular(0.0),
+ topLeft: Radius.circular(100.0),
+ topRight: Radius.circular(0.0),
+ ),
+ ),
+ child: Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ '47bsumoy' /* Histórico de Visitas */,
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ color: FlutterFlowTheme.of(context).info,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ Builder(
+ builder: (context) {
+ if (_model.toggleIdx == true) {
+ return Column(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 10.0, 0.0, 0.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Align(
+ alignment: const AlignmentDirectional(-1.0, -1.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 20.0, 0.0, 20.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ '15ekd1ge' /* Agendar Visita */,
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyLarge
+ .override(
+ fontFamily: 'Nunito',
+ fontSize: 21.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.bold,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey('Nunito'),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ Stack(
+ children: [
+ Container(
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context)
+ .primaryBackground,
+ ),
+ child: SingleChildScrollView(
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment:
+ MainAxisAlignment.spaceEvenly,
+ children: [
+ Divider(
+ thickness: 0.5,
+ color:
+ FlutterFlowTheme.of(context).accent1,
+ ),
+ Align(
+ alignment:
+ const AlignmentDirectional(-1.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 30.0, 0.0, 30.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'qo0pg2at' /* Quais visitantes você deseja c... */,
),
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.bold,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
),
),
- if (_model.visitorJsonList.isNotEmpty)
- Builder(
- builder: (context) {
- final visitorListView = _model
- .visitorJsonList
- .map((e) => e)
- .toList();
- return ListView.separated(
- padding: const EdgeInsets.fromLTRB(
- 0,
- 0,
- 0,
- 20.0,
- ),
- shrinkWrap: true,
- scrollDirection: Axis.vertical,
- itemCount: visitorListView.length,
- separatorBuilder: (_, __) =>
- const SizedBox(height: 5.0),
- itemBuilder: (context,
- visitorListViewIndex) {
- final visitorListViewItem =
- visitorListView[
- visitorListViewIndex];
- return 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 VisitorDetailsModalWidget(),
- ),
- );
- },
- ).then((value) =>
- safeSetState(() {}));
- },
- onLongPress: () async {
- _model
- .removeFromVisitorJsonList(
- visitorListViewItem);
- setState(() {});
- },
- child: Container(
- width: 100.0,
- height: 70.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme
- .of(context)
- .secondaryBackground,
- ),
- child: Row(
- mainAxisSize:
- MainAxisSize.max,
- children: [
- Container(
- width: 50.0,
- height: 50.0,
- clipBehavior:
- Clip.antiAlias,
- decoration:
- const BoxDecoration(
- shape:
- BoxShape.circle,
- ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ if (_model.visitorJsonList.isNotEmpty)
+ Builder(
+ builder: (context) {
+ final visitorList = _model
+ .visitorJsonList
+ .map((e) => e)
+ .toList();
+ return SizedBox(
+ width: double.infinity,
+ height: 180.0,
+ child: CarouselSlider.builder(
+ itemCount: visitorList.length,
+ itemBuilder: (context,
+ visitorListIndex, _) {
+ final visitorListItem =
+ visitorList[
+ visitorListIndex];
+ return Padding(
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0,
+ 0.0,
+ 0.0,
+ 20.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 VisitorDetailsModalWidget(),
+ ),
+ );
+ },
+ ).then((value) =>
+ safeSetState(
+ () {}));
+ },
+ onLongPress: () async {
+ _model.removeFromVisitorJsonList(
+ visitorListItem);
+ setState(() {});
+ },
+ child: ClipRRect(
+ borderRadius:
+ BorderRadius
+ .circular(
+ 8.0),
child:
CachedNetworkImage(
fadeInDuration:
@@ -329,1310 +397,185 @@ class _ScheduleCompleteVisitPageWidgetState
valueOrDefault<
String>(
'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
- visitorListViewItem,
+ visitorListItem,
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: 200.0,
+ height: 100.0,
fit: BoxFit.cover,
),
),
- Column(
- mainAxisSize:
- MainAxisSize.max,
- mainAxisAlignment:
- MainAxisAlignment
- .center,
- children: [
- Text(
- getJsonField(
- visitorListViewItem,
- r'''$.VTE_NOME''',
- ).toString(),
- style: FlutterFlowTheme
- .of(context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(context)
- .bodyMediumFamily,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context).bodyMediumFamily),
- ),
- ),
- Text(
- getJsonField(
- visitorListViewItem,
- r'''$.VTE_TIPO''',
- ).toString(),
- style: FlutterFlowTheme
- .of(context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(context)
- .bodyMediumFamily,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context).bodyMediumFamily),
- ),
- ),
- ],
- ),
- ]
- .divide(const SizedBox(
- width: 30.0))
- .addToStart(const SizedBox(
- width: 30.0)),
- ),
- ),
- );
- },
- );
- },
- ),
- Stack(
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.01, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(
- 0.0, 0.0, 0.0, 20.0),
- child: FFButtonWidget(
- onPressed: () async {
- await showModalBottomSheet(
- isScrollControlled: true,
- backgroundColor:
- FlutterFlowTheme.of(
- context)
- .primaryBackground,
- 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:
- VisitorSearchComponentWidget(
- getVisitors:
- (visitorsParam) async {
- _model.visitorJsonList =
- visitorsParam!
- .toList()
- .cast<
- dynamic>();
- setState(() {});
- },
- getDocs:
- (docsParam) async {
- _model.visitorStrList =
- functions.strListToStr(
- docsParam!
- .toList());
- setState(() {});
- },
- ),
- ),
- );
- },
- ).then((value) =>
- safeSetState(() {}));
- },
- text: '',
- icon: Icon(
- Icons.add,
- color: FlutterFlowTheme.of(
- context)
- .primary,
- size: 30.0,
- ),
- options: FFButtonOptions(
- width:
- MediaQuery.sizeOf(context)
- .width *
- 0.8,
- height: 80.0,
- padding: const EdgeInsetsDirectional
- .fromSTEB(
- 0.0, 0.0, 0.0, 0.0),
- iconPadding:
- const EdgeInsetsDirectional
- .fromSTEB(14.0, 0.0,
- 0.0, 20.0),
- color: FlutterFlowTheme.of(
- context)
- .primaryBackground,
- textStyle: FlutterFlowTheme
- .of(context)
- .titleSmall
- .override(
- fontFamily:
- FlutterFlowTheme.of(
- context)
- .titleSmallFamily,
- color:
- FlutterFlowTheme.of(
- context)
- .primaryText,
- fontSize: 16.0,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(
- context)
- .titleSmallFamily),
),
- borderSide: BorderSide(
- color: FlutterFlowTheme.of(
- context)
- .accent4,
- width: 1.0,
+ );
+ },
+ carouselController: _model
+ .carouselController ??=
+ CarouselController(),
+ options: CarouselOptions(
+ initialPage: max(
+ 0,
+ min(
+ 1,
+ visitorList.length -
+ 1)),
+ viewportFraction: 0.5,
+ disableCenter: true,
+ enlargeCenterPage: true,
+ enlargeFactor: 0.25,
+ enableInfiniteScroll: true,
+ scrollDirection:
+ Axis.horizontal,
+ autoPlay: false,
+ onPageChanged: (index, _) =>
+ _model.carouselCurrentIndex =
+ index,
),
- borderRadius:
- BorderRadius.circular(
- 8.0),
),
- ),
- ),
+ );
+ },
),
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(
- 0.0, 50.0, 0.0, 0.0),
- child: Container(
- width:
- MediaQuery.sizeOf(context)
- .width *
- 0.8,
- height: 20.0,
- decoration: const BoxDecoration(),
- child: Align(
- alignment:
- const AlignmentDirectional(
- 0.0, 0.0),
- child: AutoSizeText(
- FFLocalizations.of(context)
- .getText(
- 'i0jhuu3e' /* Clique para adicionar um visit... */,
- ),
- style: FlutterFlowTheme.of(
- context)
- .bodyMedium
+ ],
+ ),
+ Stack(
+ children: [
+ Align(
+ alignment:
+ const AlignmentDirectional(0.01, 0.0),
+ child: Padding(
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 20.0),
+ child: FFButtonWidget(
+ onPressed: () async {
+ await showModalBottomSheet(
+ isScrollControlled: true,
+ backgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primaryBackground,
+ 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:
+ VisitorSearchComponentWidget(
+ getVisitors:
+ (visitorsParam) async {
+ _model.visitorJsonList =
+ visitorsParam!
+ .toList()
+ .cast<
+ dynamic>();
+ setState(() {});
+ },
+ getDocs:
+ (docsParam) async {
+ _model.visitorStrList =
+ functions.strListToStr(
+ docsParam!
+ .toList());
+ setState(() {});
+ },
+ ),
+ ),
+ );
+ },
+ ).then((value) =>
+ safeSetState(() {}));
+ },
+ text: '',
+ icon: Icon(
+ Icons.add,
+ color:
+ FlutterFlowTheme.of(context)
+ .primary,
+ size: 30.0,
+ ),
+ options: FFButtonOptions(
+ width: 300.0,
+ height: 80.0,
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional
+ .fromSTEB(14.0, 0.0,
+ 0.0, 20.0),
+ color:
+ FlutterFlowTheme.of(context)
+ .primaryBackground,
+ textStyle:
+ FlutterFlowTheme.of(context)
+ .titleSmall
.override(
fontFamily:
FlutterFlowTheme.of(
context)
- .bodyMediumFamily,
+ .titleSmallFamily,
color: FlutterFlowTheme
.of(context)
.primaryText,
+ fontSize: 16.0,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
FlutterFlowTheme.of(
context)
- .bodyMediumFamily),
+ .titleSmallFamily),
),
- ),
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .primary,
+ width: 1.0,
),
+ borderRadius:
+ BorderRadius.circular(8.0),
),
),
),
- ],
- ),
- ],
- ),
- Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 20.0, 24.0, 0.0, 24.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'z4ry3tge' /* Qual o período de validade da ... */,
- ),
- textAlign: TextAlign.start,
- style: FlutterFlowTheme.of(context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing: 0.0,
- fontWeight: FontWeight.bold,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily),
- ),
- ),
),
- ),
- Row(
- mainAxisSize: MainAxisSize.max,
- children: [
- Padding(
+ Align(
+ alignment:
+ const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
padding:
const EdgeInsetsDirectional.fromSTEB(
- 20.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 100.0,
- height: 40.0,
- decoration: const BoxDecoration(),
- child: Align(
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Text(
- FFLocalizations.of(context)
- .getText(
- 'hjp5mzbd' /* Inicio da Visita */,
- ),
- style: FlutterFlowTheme.of(
- context)
+ 0.0, 50.0, 0.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context)
+ .getText(
+ 'i0jhuu3e' /* Clique para adicionar um visit... */,
+ ),
+ style:
+ FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily:
FlutterFlowTheme.of(
context)
.bodyMediumFamily,
- fontSize: 14.0,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily),
- ),
- ),
- ),
- ),
- ),
- Expanded(
- child: Container(
- width: 100.0,
- height: 40.0,
- decoration: const BoxDecoration(),
- child: SizedBox(
- height: double.infinity,
- child: Stack(
- children: [
- Padding(
- padding:
- const EdgeInsetsDirectional
- .fromSTEB(
- 10.0,
- 0.0,
- 24.0,
- 0.0),
- child: TextFormField(
- controller: _model
- .textController1,
- focusNode: _model
- .textFieldFocusNode1,
- autofocus: false,
- obscureText: false,
- decoration:
- InputDecoration(
- isDense: true,
- labelStyle:
- FlutterFlowTheme.of(
- context)
- .labelMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(context)
- .labelMediumFamily,
- color: FlutterFlowTheme.of(
- context)
- .primaryText,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context).labelMediumFamily),
- ),
- hintText:
- FFLocalizations.of(
- context)
- .getText(
- 'ce6xryf4' /* Quando você inicia a visita? */,
- ),
- hintStyle:
- FlutterFlowTheme.of(
- context)
- .labelMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(context)
- .labelMediumFamily,
- color: FlutterFlowTheme.of(
- context)
- .primaryText,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context).labelMediumFamily),
- lineHeight:
- 1.0,
- ),
- enabledBorder:
- OutlineInputBorder(
- borderSide:
- BorderSide(
- color: FlutterFlowTheme
- .of(context)
- .accent4,
- width: 0.5,
- ),
- borderRadius:
- BorderRadius
- .circular(
- 8.0),
- ),
- focusedBorder:
- OutlineInputBorder(
- borderSide:
- BorderSide(
- color: FlutterFlowTheme
- .of(context)
- .primary,
- width: 0.5,
- ),
- borderRadius:
- BorderRadius
- .circular(
- 8.0),
- ),
- errorBorder:
- OutlineInputBorder(
- borderSide:
- BorderSide(
- color: FlutterFlowTheme
- .of(context)
- .error,
- width: 0.5,
- ),
- borderRadius:
- BorderRadius
- .circular(
- 8.0),
- ),
- focusedErrorBorder:
- OutlineInputBorder(
- borderSide:
- BorderSide(
- color: FlutterFlowTheme
- .of(context)
- .error,
- width: 0.5,
- ),
- borderRadius:
- BorderRadius
- .circular(
- 8.0),
- ),
- suffixIcon: Icon(
- Icons.date_range,
- color: FlutterFlowTheme
- .of(context)
- .accent1,
- ),
- ),
- style:
- FlutterFlowTheme.of(
- context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- lineHeight:
- 1.0,
- ),
- textAlign:
- TextAlign.center,
- validator: _model
- .textController1Validator
- .asValidator(
- context),
- ),
- ),
- Padding(
- padding:
- const EdgeInsetsDirectional
- .fromSTEB(
- 10.0,
- 0.0,
- 24.0,
- 0.0),
- child: InkWell(
- splashColor:
- Colors.transparent,
- focusColor:
- Colors.transparent,
- hoverColor:
- Colors.transparent,
- highlightColor:
- Colors.transparent,
- onTap: () async {
- final datePicked1Date =
- await showDatePicker(
- context: context,
- initialDate:
- getCurrentTimestamp,
- firstDate:
- getCurrentTimestamp,
- lastDate:
- DateTime(2050),
- builder: (context,
- child) {
- return wrapInMaterialDatePickerTheme(
- context,
- child!,
- headerBackgroundColor:
- FlutterFlowTheme.of(
- context)
- .primary,
- headerForegroundColor:
- FlutterFlowTheme.of(
- context)
- .info,
- headerTextStyle:
- FlutterFlowTheme.of(
- context)
- .headlineLarge
- .override(
- fontFamily:
- FlutterFlowTheme.of(context).headlineLargeFamily,
- fontSize:
- 32.0,
- letterSpacing:
- 0.0,
- fontWeight:
- FontWeight.w600,
- useGoogleFonts:
- GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
- ),
- pickerBackgroundColor:
- FlutterFlowTheme.of(
- context)
- .secondaryBackground,
- pickerForegroundColor:
- FlutterFlowTheme.of(
- context)
- .primaryText,
- selectedDateTimeBackgroundColor:
- FlutterFlowTheme.of(
- context)
- .primary,
- selectedDateTimeForegroundColor:
- FlutterFlowTheme.of(
- context)
- .info,
- actionButtonForegroundColor:
- FlutterFlowTheme.of(
- context)
- .primaryText,
- iconSize: 24.0,
- );
- },
- );
-
- TimeOfDay?
- datePicked1Time;
- if (datePicked1Date !=
- null) {
- datePicked1Time =
- await showTimePicker(
- context: context,
- initialTime: TimeOfDay
- .fromDateTime(
- getCurrentTimestamp),
- builder: (context,
- child) {
- return wrapInMaterialTimePickerTheme(
- context,
- child!,
- headerBackgroundColor:
- FlutterFlowTheme.of(
- context)
- .primary,
- headerForegroundColor:
- FlutterFlowTheme.of(
- context)
- .info,
- headerTextStyle: FlutterFlowTheme.of(
- context)
- .headlineLarge
- .override(
- fontFamily:
- FlutterFlowTheme.of(context).headlineLargeFamily,
- fontSize:
- 32.0,
- letterSpacing:
- 0.0,
- fontWeight:
- FontWeight.w600,
- useGoogleFonts:
- GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
- ),
- pickerBackgroundColor:
- FlutterFlowTheme.of(
- context)
- .secondaryBackground,
- pickerForegroundColor:
- FlutterFlowTheme.of(
- context)
- .primaryText,
- selectedDateTimeBackgroundColor:
- FlutterFlowTheme.of(
- context)
- .primary,
- selectedDateTimeForegroundColor:
- FlutterFlowTheme.of(
- context)
- .info,
- actionButtonForegroundColor:
- FlutterFlowTheme.of(
- context)
- .primaryText,
- iconSize:
- 24.0,
- );
- },
- );
- }
-
- if (datePicked1Date !=
- null &&
- datePicked1Time !=
- null) {
- safeSetState(() {
- _model.datePicked1 =
- DateTime(
- datePicked1Date
- .year,
- datePicked1Date
- .month,
- datePicked1Date
- .day,
- datePicked1Time!
- .hour,
- datePicked1Time
- .minute,
- );
- });
- }
- setState(() {
- _model.textController1
- ?.text =
- dateTimeFormat(
- 'd/M/y H:mm:ss',
- _model
- .datePicked1,
- locale: FFLocalizations
- .of(context)
- .languageCode,
- );
- });
- },
- child: Container(
- width:
- double.infinity,
- height: 55.0,
- decoration:
- BoxDecoration(
- borderRadius:
- BorderRadius
- .circular(
- 8.0),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- ],
- ),
- Row(
- mainAxisSize: MainAxisSize.max,
- children: [
- Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 20.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 100.0,
- height: 40.0,
- decoration: const BoxDecoration(),
- child: Align(
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Text(
- FFLocalizations.of(context)
- .getText(
- 'jwsbk0xu' /* Fim da Visita */,
- ),
- style: FlutterFlowTheme.of(
- context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- fontSize: 14.0,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily),
- ),
- ),
- ),
- ),
- ),
- Expanded(
- child: Container(
- width: 100.0,
- height: 40.0,
- decoration: const BoxDecoration(),
- child: SizedBox(
- height: double.infinity,
- child: Stack(
- children: [
- Padding(
- padding:
- const EdgeInsetsDirectional
- .fromSTEB(
- 10.0,
- 0.0,
- 24.0,
- 0.0),
- child: TextFormField(
- controller: _model
- .textController2,
- focusNode: _model
- .textFieldFocusNode2,
- autofocus: false,
- obscureText: false,
- decoration:
- InputDecoration(
- isDense: true,
- labelStyle:
- FlutterFlowTheme.of(
- context)
- .labelMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(context)
- .labelMediumFamily,
- color: FlutterFlowTheme.of(
- context)
- .primaryText,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context).labelMediumFamily),
- ),
- hintText:
- FFLocalizations.of(
- context)
- .getText(
- 'lyfe46f6' /* Quando a visita terminá? */,
- ),
- hintStyle:
- FlutterFlowTheme.of(
- context)
- .labelMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(context)
- .labelMediumFamily,
- color: FlutterFlowTheme.of(
- context)
- .primaryText,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context).labelMediumFamily),
- lineHeight:
- 1.0,
- ),
- enabledBorder:
- OutlineInputBorder(
- borderSide:
- BorderSide(
- color: FlutterFlowTheme
- .of(context)
- .accent4,
- width: 0.5,
- ),
- borderRadius:
- BorderRadius
- .circular(
- 8.0),
- ),
- focusedBorder:
- OutlineInputBorder(
- borderSide:
- BorderSide(
- color: FlutterFlowTheme
- .of(context)
- .primary,
- width: 0.5,
- ),
- borderRadius:
- BorderRadius
- .circular(
- 8.0),
- ),
- errorBorder:
- OutlineInputBorder(
- borderSide:
- BorderSide(
- color: FlutterFlowTheme
- .of(context)
- .error,
- width: 0.5,
- ),
- borderRadius:
- BorderRadius
- .circular(
- 8.0),
- ),
- focusedErrorBorder:
- OutlineInputBorder(
- borderSide:
- BorderSide(
- color: FlutterFlowTheme
- .of(context)
- .error,
- width: 0.5,
- ),
- borderRadius:
- BorderRadius
- .circular(
- 8.0),
- ),
- suffixIcon: Icon(
- Icons.date_range,
- color: FlutterFlowTheme
- .of(context)
- .accent1,
- ),
- ),
- style:
- FlutterFlowTheme.of(
- context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- lineHeight:
- 1.0,
- ),
- textAlign:
- TextAlign.center,
- validator: _model
- .textController2Validator
- .asValidator(
- context),
- ),
- ),
- Padding(
- padding:
- const EdgeInsetsDirectional
- .fromSTEB(
- 10.0,
- 0.0,
- 24.0,
- 0.0),
- child: InkWell(
- splashColor:
- Colors.transparent,
- focusColor:
- Colors.transparent,
- hoverColor:
- Colors.transparent,
- highlightColor:
- Colors.transparent,
- onTap: () async {
- final datePicked2Date =
- await showDatePicker(
- context: context,
- initialDate:
- getCurrentTimestamp,
- firstDate:
- getCurrentTimestamp,
- lastDate:
- DateTime(2050),
- builder: (context,
- child) {
- return wrapInMaterialDatePickerTheme(
- context,
- child!,
- headerBackgroundColor:
- FlutterFlowTheme.of(
- context)
- .primary,
- headerForegroundColor:
- FlutterFlowTheme.of(
- context)
- .info,
- headerTextStyle:
- FlutterFlowTheme.of(
- context)
- .headlineLarge
- .override(
- fontFamily:
- FlutterFlowTheme.of(context).headlineLargeFamily,
- fontSize:
- 32.0,
- letterSpacing:
- 0.0,
- fontWeight:
- FontWeight.w600,
- useGoogleFonts:
- GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
- ),
- pickerBackgroundColor:
- FlutterFlowTheme.of(
- context)
- .secondaryBackground,
- pickerForegroundColor:
- FlutterFlowTheme.of(
- context)
- .primaryText,
- selectedDateTimeBackgroundColor:
- FlutterFlowTheme.of(
- context)
- .primary,
- selectedDateTimeForegroundColor:
- FlutterFlowTheme.of(
- context)
- .info,
- actionButtonForegroundColor:
- FlutterFlowTheme.of(
- context)
- .primaryText,
- iconSize: 24.0,
- );
- },
- );
-
- TimeOfDay?
- datePicked2Time;
- if (datePicked2Date !=
- null) {
- datePicked2Time =
- await showTimePicker(
- context: context,
- initialTime: TimeOfDay
- .fromDateTime(
- getCurrentTimestamp),
- builder: (context,
- child) {
- return wrapInMaterialTimePickerTheme(
- context,
- child!,
- headerBackgroundColor:
- FlutterFlowTheme.of(
- context)
- .primary,
- headerForegroundColor:
- FlutterFlowTheme.of(
- context)
- .info,
- headerTextStyle: FlutterFlowTheme.of(
- context)
- .headlineLarge
- .override(
- fontFamily:
- FlutterFlowTheme.of(context).headlineLargeFamily,
- fontSize:
- 32.0,
- letterSpacing:
- 0.0,
- fontWeight:
- FontWeight.w600,
- useGoogleFonts:
- GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).headlineLargeFamily),
- ),
- pickerBackgroundColor:
- FlutterFlowTheme.of(
- context)
- .secondaryBackground,
- pickerForegroundColor:
- FlutterFlowTheme.of(
- context)
- .primaryText,
- selectedDateTimeBackgroundColor:
- FlutterFlowTheme.of(
- context)
- .primary,
- selectedDateTimeForegroundColor:
- FlutterFlowTheme.of(
- context)
- .info,
- actionButtonForegroundColor:
- FlutterFlowTheme.of(
- context)
- .primaryText,
- iconSize:
- 24.0,
- );
- },
- );
- }
-
- if (datePicked2Date !=
- null &&
- datePicked2Time !=
- null) {
- safeSetState(() {
- _model.datePicked2 =
- DateTime(
- datePicked2Date
- .year,
- datePicked2Date
- .month,
- datePicked2Date
- .day,
- datePicked2Time!
- .hour,
- datePicked2Time
- .minute,
- );
- });
- }
- setState(() {
- _model.textController2
- ?.text =
- dateTimeFormat(
- 'd/M/y H:mm:ss',
- _model
- .datePicked2,
- locale: FFLocalizations
- .of(context)
- .languageCode,
- );
- });
- },
- child: Container(
- width:
- double.infinity,
- height: 39.0,
- decoration:
- BoxDecoration(
- borderRadius:
- BorderRadius
- .circular(
- 8.0),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- ],
- ),
- ].divide(const SizedBox(height: 10.0)),
- ),
- Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 20.0, 24.0, 0.0, 24.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'p81uol2v' /* Quais são os motivos da visita... */,
- ),
- textAlign: TextAlign.start,
- style: FlutterFlowTheme.of(context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing: 0.0,
- fontWeight: FontWeight.bold,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily),
- ),
- ),
- ),
- ),
- Row(
- mainAxisSize: MainAxisSize.max,
- children: [
- Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 20.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 100.0,
- height: 42.0,
- decoration: const BoxDecoration(),
- child: Align(
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Text(
- FFLocalizations.of(context)
- .getText(
- 'bbauep0b' /* Motivo da Visita */,
- ),
- style: FlutterFlowTheme.of(
- context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- fontSize: 14.0,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily),
- ),
- ),
- ),
- ),
- ),
- Expanded(
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(
- 0.0, 0.0, 24.0, 0.0),
- child: Container(
- width: 100.0,
- height: 40.0,
- decoration: const BoxDecoration(),
- child: FutureBuilder<
- ApiCallResponse>(
- future: PhpGroup.getDadosCall
- .call(
- devUUID:
- FFAppState().devUUID,
- userUUID:
- FFAppState().userUUID,
- cliUUID:
- FFAppState().cliUUID,
- atividade: 'getDados',
- ),
- 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 dropDownGetDadosResponse =
- snapshot.data!;
- return FlutterFlowDropDown<
- String>(
- controller: _model
- .dropDownValueController1 ??=
- FormFieldController<
- String>(
- _model.dropDownValue1 ??=
- '',
- ),
- options: List<
- String>.from(
- PhpGroup.getDadosCall
- .reasonsJsonList(
- dropDownGetDadosResponse
- .jsonBody,
- )!
- .map((e) =>
- e.toString())
- .toList()),
- optionLabels: PhpGroup
- .getDadosCall
- .reasonsMotDescStrList(
- dropDownGetDadosResponse
- .jsonBody,
- )!,
- onChanged: (val) =>
- setState(() => _model
- .dropDownValue1 =
- val),
- width: double.infinity,
- height: double.infinity,
- textStyle:
- FlutterFlowTheme.of(
- context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- hintText:
- FFLocalizations.of(
- context)
- .getText(
- 'x1ij847i' /* Escolha um motivo aqui */,
- ),
- icon: Icon(
- Icons
- .keyboard_arrow_down_rounded,
color:
FlutterFlowTheme.of(
context)
- .accent1,
- size: 24.0,
- ),
- elevation: 2.0,
- borderColor:
- FlutterFlowTheme.of(
- context)
- .accent4,
- borderWidth: 0.5,
- borderRadius: 10.0,
- margin:
- const EdgeInsetsDirectional
- .fromSTEB(
- 16.0,
- 0.0,
- 16.0,
- 0.0),
- hidesUnderline: true,
- isOverButton: true,
- isSearchable: false,
- isMultiSelect: false,
- );
- },
- ),
- ),
- ),
- ),
- ],
- ),
- Row(
- mainAxisSize: MainAxisSize.max,
- children: [
- Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 20.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 100.0,
- height: 42.0,
- decoration: const BoxDecoration(),
- child: Align(
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Text(
- FFLocalizations.of(context)
- .getText(
- 'etzbm8l5' /* Nível de Acesso */,
- ),
- style: FlutterFlowTheme.of(
- context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- fontSize: 14.0,
+ .primaryText,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts
.asMap()
@@ -1641,290 +584,62 @@ class _ScheduleCompleteVisitPageWidgetState
context)
.bodyMediumFamily),
),
- ),
- ),
),
),
- Expanded(
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(
- 0.0, 0.0, 24.0, 0.0),
- child: Container(
- width: 100.0,
- height: 40.0,
- decoration: const BoxDecoration(),
- child: FutureBuilder<
- ApiCallResponse>(
- future: PhpGroup.getDadosCall
- .call(
- devUUID:
- FFAppState().devUUID,
- userUUID:
- FFAppState().userUUID,
- cliUUID:
- FFAppState().cliUUID,
- atividade: 'getDados',
- ),
- 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 dropDownGetDadosResponse =
- snapshot.data!;
- return FlutterFlowDropDown<
- String>(
- controller: _model
- .dropDownValueController2 ??=
- FormFieldController<
- String>(
- _model.dropDownValue2 ??=
- '',
- ),
- options: List<
- String>.from(
- PhpGroup.getDadosCall
- .levelJsonList(
- dropDownGetDadosResponse
- .jsonBody,
- )!
- .map((e) =>
- e.toString())
- .toList()),
- optionLabels: PhpGroup
- .getDadosCall
- .levelNACDescricaoStrList(
- dropDownGetDadosResponse
- .jsonBody,
- )!,
- onChanged: (val) =>
- setState(() => _model
- .dropDownValue2 =
- val),
- width: double.infinity,
- height: double.infinity,
- textStyle:
- FlutterFlowTheme.of(
- context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- hintText:
- FFLocalizations.of(
- context)
- .getText(
- 'kmgv5j7x' /* Escolha um nível de acesso aqu... */,
- ),
- icon: Icon(
- Icons
- .keyboard_arrow_down_rounded,
- color:
- FlutterFlowTheme.of(
- context)
- .accent1,
- size: 24.0,
- ),
- elevation: 2.0,
- borderColor:
- FlutterFlowTheme.of(
- context)
- .accent4,
- borderWidth: 0.5,
- borderRadius: 10.0,
- margin:
- const EdgeInsetsDirectional
- .fromSTEB(
- 16.0,
- 0.0,
- 16.0,
- 0.0),
- hidesUnderline: true,
- isOverButton: true,
- isSearchable: false,
- isMultiSelect: false,
- );
- },
- ),
- ),
- ),
+ ),
+ ],
+ ),
+ Divider(
+ thickness: 0.5,
+ color:
+ FlutterFlowTheme.of(context).accent1,
+ ),
+ Align(
+ alignment:
+ const AlignmentDirectional(-1.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 30.0, 0.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'z4ry3tge' /* Qual o período de validade da ... */,
),
- ],
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.bold,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
+ ),
),
- ].divide(const SizedBox(height: 10.0)),
- ),
- Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
+ ),
+ Stack(
+ children: [
+ Padding(
padding:
const EdgeInsetsDirectional.fromSTEB(
- 20.0, 24.0, 0.0, 24.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'mddp33o0' /* Visita se encerra após o prime... */,
- ),
- textAlign: TextAlign.start,
- style: FlutterFlowTheme.of(context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing: 0.0,
- fontWeight: FontWeight.bold,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily),
- ),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 30.0, 0.0, 30.0, 20.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment:
- MainAxisAlignment.center,
- crossAxisAlignment:
- CrossAxisAlignment.center,
- children: [
- Flexible(
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(
- 0.0, 0.0, 130.0, 0.0),
- child: Text(
- FFLocalizations.of(context)
- .getText(
- '68j9gw4h' /* Visita única */,
- ),
- textAlign: TextAlign.start,
- style: FlutterFlowTheme.of(
- context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily),
- ),
- ),
- ),
- ),
- Switch.adaptive(
- value: _model.switchValue!,
- onChanged: (newValue) async {
- setState(() => _model
- .switchValue = newValue);
- },
- activeColor:
- FlutterFlowTheme.of(context)
- .success,
- activeTrackColor:
- FlutterFlowTheme.of(context)
- .customColor4,
- inactiveTrackColor:
- FlutterFlowTheme.of(context)
- .customColor4,
- inactiveThumbColor:
- FlutterFlowTheme.of(context)
- .error,
- ),
- ],
- ),
- ),
- ],
- ),
- Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 20.0, 0.0, 0.0, 24.0),
- child: Text(
- FFLocalizations.of(context).getText(
- '9rudpkq7' /* Você tem alguma observação sob... */,
- ),
- textAlign: TextAlign.start,
- style: FlutterFlowTheme.of(context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w600,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily),
- ),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 24.0, 0.0, 24.0, 0.0),
- child: SizedBox(
- width: double.infinity,
+ 24.0, 50.0, 24.0, 0.0),
child: TextFormField(
- controller: _model.textController3,
+ controller: _model.textController1,
focusNode:
- _model.textFieldFocusNode3,
+ _model.textFieldFocusNode1,
autofocus: false,
- textInputAction:
- TextInputAction.next,
obscureText: false,
decoration: InputDecoration(
- isDense: true,
labelText:
FFLocalizations.of(context)
.getText(
- '4rgpxrfe' /* Observações da Visita */,
+ '9mg9nv2j' /* Ínicio da Visita */,
),
labelStyle:
FlutterFlowTheme.of(context)
@@ -1949,7 +664,7 @@ class _ScheduleCompleteVisitPageWidgetState
hintText:
FFLocalizations.of(context)
.getText(
- '7knytis2' /* Escreva as suas observações aq... */,
+ 'y5s85khj' /* Quando a visitas se inicia? */,
),
hintStyle:
FlutterFlowTheme.of(context)
@@ -1975,11 +690,11 @@ class _ScheduleCompleteVisitPageWidgetState
borderSide: BorderSide(
color: FlutterFlowTheme.of(
context)
- .accent4,
+ .accent1,
width: 0.5,
),
borderRadius:
- BorderRadius.circular(10.0),
+ BorderRadius.circular(8.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
@@ -1989,7 +704,7 @@ class _ScheduleCompleteVisitPageWidgetState
width: 0.5,
),
borderRadius:
- BorderRadius.circular(10.0),
+ BorderRadius.circular(8.0),
),
errorBorder: OutlineInputBorder(
borderSide: BorderSide(
@@ -1999,7 +714,7 @@ class _ScheduleCompleteVisitPageWidgetState
width: 0.5,
),
borderRadius:
- BorderRadius.circular(10.0),
+ BorderRadius.circular(8.0),
),
focusedErrorBorder:
OutlineInputBorder(
@@ -2010,10 +725,10 @@ class _ScheduleCompleteVisitPageWidgetState
width: 0.5,
),
borderRadius:
- BorderRadius.circular(10.0),
+ BorderRadius.circular(8.0),
),
suffixIcon: Icon(
- Icons.text_fields,
+ Icons.hourglass_top,
color:
FlutterFlowTheme.of(context)
.accent1,
@@ -2026,9 +741,6 @@ class _ScheduleCompleteVisitPageWidgetState
FlutterFlowTheme.of(
context)
.bodyMediumFamily,
- color: FlutterFlowTheme.of(
- context)
- .primaryText,
letterSpacing: 0.0,
useGoogleFonts: GoogleFonts
.asMap()
@@ -2037,500 +749,1597 @@ class _ScheduleCompleteVisitPageWidgetState
context)
.bodyMediumFamily),
),
- textAlign: TextAlign.start,
- maxLines: null,
+ textAlign: TextAlign.center,
validator: _model
- .textController3Validator
+ .textController1Validator
.asValidator(context),
),
),
+ Padding(
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 24.0, 50.0, 24.0, 0.0),
+ child: InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ final datePicked1Date =
+ await showDatePicker(
+ context: context,
+ initialDate:
+ getCurrentTimestamp,
+ firstDate: getCurrentTimestamp,
+ lastDate: DateTime(2050),
+ builder: (context, child) {
+ return wrapInMaterialDatePickerTheme(
+ context,
+ child!,
+ headerBackgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primary,
+ headerForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .info,
+ headerTextStyle:
+ FlutterFlowTheme.of(
+ context)
+ .headlineLarge
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .headlineLargeFamily,
+ fontSize: 32.0,
+ letterSpacing:
+ 0.0,
+ fontWeight:
+ FontWeight
+ .w600,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .headlineLargeFamily),
+ ),
+ pickerBackgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .secondaryBackground,
+ pickerForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ selectedDateTimeBackgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primary,
+ selectedDateTimeForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .info,
+ actionButtonForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ iconSize: 24.0,
+ );
+ },
+ );
+
+ TimeOfDay? datePicked1Time;
+ if (datePicked1Date != null) {
+ datePicked1Time =
+ await showTimePicker(
+ context: context,
+ initialTime:
+ TimeOfDay.fromDateTime(
+ getCurrentTimestamp),
+ builder: (context, child) {
+ return wrapInMaterialTimePickerTheme(
+ context,
+ child!,
+ headerBackgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primary,
+ headerForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .info,
+ headerTextStyle:
+ FlutterFlowTheme.of(
+ context)
+ .headlineLarge
+ .override(
+ fontFamily: FlutterFlowTheme.of(
+ context)
+ .headlineLargeFamily,
+ fontSize: 32.0,
+ letterSpacing:
+ 0.0,
+ fontWeight:
+ FontWeight
+ .w600,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .headlineLargeFamily),
+ ),
+ pickerBackgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .secondaryBackground,
+ pickerForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ selectedDateTimeBackgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primary,
+ selectedDateTimeForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .info,
+ actionButtonForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ iconSize: 24.0,
+ );
+ },
+ );
+ }
+
+ if (datePicked1Date != null &&
+ datePicked1Time != null) {
+ safeSetState(() {
+ _model.datePicked1 = DateTime(
+ datePicked1Date.year,
+ datePicked1Date.month,
+ datePicked1Date.day,
+ datePicked1Time!.hour,
+ datePicked1Time.minute,
+ );
+ });
+ }
+ setState(() {
+ _model.textController1?.text =
+ dateTimeFormat(
+ 'd/M/y H:mm:ss',
+ _model.datePicked1,
+ locale: FFLocalizations.of(
+ context)
+ .languageCode,
+ );
+ });
+ },
+ child: Container(
+ width: double.infinity,
+ height: 50.0,
+ decoration: BoxDecoration(
+ borderRadius:
+ BorderRadius.circular(8.0),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ Stack(
+ children: [
+ Padding(
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 24.0, 50.0, 24.0, 0.0),
+ child: TextFormField(
+ controller: _model.textController2,
+ focusNode:
+ _model.textFieldFocusNode2,
+ autofocus: false,
+ obscureText: false,
+ decoration: InputDecoration(
+ labelText:
+ FFLocalizations.of(context)
+ .getText(
+ '4o0cbb70' /* Término da Visita */,
+ ),
+ labelStyle:
+ FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .labelMediumFamily,
+ color:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .labelMediumFamily),
+ ),
+ hintText:
+ FFLocalizations.of(context)
+ .getText(
+ 'bhmgddc4' /* Quando a visita terminá? */,
+ ),
+ hintStyle:
+ FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .labelMediumFamily,
+ color:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .labelMediumFamily),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .accent1,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(8.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .primary,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(8.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .error,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(8.0),
+ ),
+ focusedErrorBorder:
+ OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .error,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(8.0),
+ ),
+ suffixIcon: Icon(
+ Icons.hourglass_bottom,
+ color:
+ FlutterFlowTheme.of(context)
+ .accent1,
+ ),
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
+ textAlign: TextAlign.center,
+ validator: _model
+ .textController2Validator
+ .asValidator(context),
+ ),
+ ),
+ Padding(
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 24.0, 50.0, 24.0, 20.0),
+ child: InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ final datePicked2Date =
+ await showDatePicker(
+ context: context,
+ initialDate:
+ getCurrentTimestamp,
+ firstDate: getCurrentTimestamp,
+ lastDate: DateTime(2050),
+ builder: (context, child) {
+ return wrapInMaterialDatePickerTheme(
+ context,
+ child!,
+ headerBackgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primary,
+ headerForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .info,
+ headerTextStyle:
+ FlutterFlowTheme.of(
+ context)
+ .headlineLarge
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .headlineLargeFamily,
+ fontSize: 32.0,
+ letterSpacing:
+ 0.0,
+ fontWeight:
+ FontWeight
+ .w600,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .headlineLargeFamily),
+ ),
+ pickerBackgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .secondaryBackground,
+ pickerForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ selectedDateTimeBackgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primary,
+ selectedDateTimeForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .info,
+ actionButtonForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ iconSize: 24.0,
+ );
+ },
+ );
+
+ TimeOfDay? datePicked2Time;
+ if (datePicked2Date != null) {
+ datePicked2Time =
+ await showTimePicker(
+ context: context,
+ initialTime:
+ TimeOfDay.fromDateTime(
+ getCurrentTimestamp),
+ builder: (context, child) {
+ return wrapInMaterialTimePickerTheme(
+ context,
+ child!,
+ headerBackgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primary,
+ headerForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .info,
+ headerTextStyle:
+ FlutterFlowTheme.of(
+ context)
+ .headlineLarge
+ .override(
+ fontFamily: FlutterFlowTheme.of(
+ context)
+ .headlineLargeFamily,
+ fontSize: 32.0,
+ letterSpacing:
+ 0.0,
+ fontWeight:
+ FontWeight
+ .w600,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .headlineLargeFamily),
+ ),
+ pickerBackgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .secondaryBackground,
+ pickerForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ selectedDateTimeBackgroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primary,
+ selectedDateTimeForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .info,
+ actionButtonForegroundColor:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ iconSize: 24.0,
+ );
+ },
+ );
+ }
+
+ if (datePicked2Date != null &&
+ datePicked2Time != null) {
+ safeSetState(() {
+ _model.datePicked2 = DateTime(
+ datePicked2Date.year,
+ datePicked2Date.month,
+ datePicked2Date.day,
+ datePicked2Time!.hour,
+ datePicked2Time.minute,
+ );
+ });
+ }
+ setState(() {
+ _model.textController2?.text =
+ dateTimeFormat(
+ 'd/M/y H:mm:ss',
+ _model.datePicked2,
+ locale: FFLocalizations.of(
+ context)
+ .languageCode,
+ );
+ });
+ },
+ child: Container(
+ width: double.infinity,
+ height: 50.0,
+ decoration: BoxDecoration(
+ borderRadius:
+ BorderRadius.circular(8.0),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ Divider(
+ thickness: 0.5,
+ color:
+ FlutterFlowTheme.of(context).accent1,
+ ),
+ Align(
+ alignment:
+ const AlignmentDirectional(-1.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 30.0, 0.0, 30.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'p81uol2v' /* Quais são os motivos da visita... */,
+ ),
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w600,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
+ ),
),
- ],
- ),
- Container(
- width: 100.0,
- height: 54.0,
- decoration: const BoxDecoration(),
- ),
- ],
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 30.0, 0.0, 30.0, 0.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment:
+ MainAxisAlignment.end,
+ children: [
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0, 20.0, 0.0, 0.0),
+ child: FutureBuilder<
+ ApiCallResponse>(
+ future:
+ PhpGroup.getDadosCall.call(
+ devUUID: FFAppState().devUUID,
+ userUUID:
+ FFAppState().userUUID,
+ cliUUID: FFAppState().cliUUID,
+ atividade: 'getDados',
+ ),
+ 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 dropDownGetDadosResponse =
+ snapshot.data!;
+ return FlutterFlowDropDown<
+ String>(
+ controller: _model
+ .dropDownValueController1 ??=
+ FormFieldController<
+ String>(
+ _model.dropDownValue1 ??=
+ '',
+ ),
+ options: List.from(
+ PhpGroup.getDadosCall
+ .reasonsJsonList(
+ dropDownGetDadosResponse
+ .jsonBody,
+ )!
+ .map((e) =>
+ e.toString())
+ .toList()),
+ optionLabels: PhpGroup
+ .getDadosCall
+ .reasonsMotDescStrList(
+ dropDownGetDadosResponse
+ .jsonBody,
+ )!,
+ onChanged: (val) =>
+ setState(() => _model
+ .dropDownValue1 =
+ val),
+ width: 300.0,
+ height: 56.0,
+ textStyle: FlutterFlowTheme
+ .of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
+ hintText:
+ FFLocalizations.of(
+ context)
+ .getText(
+ 'x1ij847i' /* Escolha um motivo aqui */,
+ ),
+ icon: Icon(
+ Icons
+ .keyboard_arrow_down_rounded,
+ color:
+ FlutterFlowTheme.of(
+ context)
+ .accent1,
+ size: 24.0,
+ ),
+ fillColor:
+ FlutterFlowTheme.of(
+ context)
+ .primaryBackground,
+ elevation: 2.0,
+ borderColor:
+ FlutterFlowTheme.of(
+ context)
+ .accent1,
+ borderWidth: 0.5,
+ borderRadius: 10.0,
+ margin:
+ const EdgeInsetsDirectional
+ .fromSTEB(16.0, 4.0,
+ 16.0, 4.0),
+ hidesUnderline: true,
+ isOverButton: true,
+ isSearchable: false,
+ isMultiSelect: false,
+ );
+ },
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 30.0, 0.0, 30.0, 0.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment:
+ MainAxisAlignment.end,
+ children: [
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0, 20.0, 0.0, 20.0),
+ child: FutureBuilder<
+ ApiCallResponse>(
+ future:
+ PhpGroup.getDadosCall.call(
+ devUUID: FFAppState().devUUID,
+ userUUID:
+ FFAppState().userUUID,
+ cliUUID: FFAppState().cliUUID,
+ atividade: 'getDados',
+ ),
+ 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 dropDownGetDadosResponse =
+ snapshot.data!;
+ return FlutterFlowDropDown<
+ String>(
+ controller: _model
+ .dropDownValueController2 ??=
+ FormFieldController<
+ String>(
+ _model.dropDownValue2 ??=
+ '',
+ ),
+ options: List.from(
+ PhpGroup.getDadosCall
+ .levelJsonList(
+ dropDownGetDadosResponse
+ .jsonBody,
+ )!
+ .map((e) =>
+ e.toString())
+ .toList()),
+ optionLabels: PhpGroup
+ .getDadosCall
+ .levelNACDescricaoStrList(
+ dropDownGetDadosResponse
+ .jsonBody,
+ )!,
+ onChanged: (val) =>
+ setState(() => _model
+ .dropDownValue2 =
+ val),
+ width: 300.0,
+ height: 56.0,
+ textStyle: FlutterFlowTheme
+ .of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
+ hintText:
+ FFLocalizations.of(
+ context)
+ .getText(
+ 'kmgv5j7x' /* Escolha um nível de acesso aqu... */,
+ ),
+ icon: Icon(
+ Icons
+ .keyboard_arrow_down_rounded,
+ color:
+ FlutterFlowTheme.of(
+ context)
+ .accent1,
+ size: 24.0,
+ ),
+ fillColor:
+ FlutterFlowTheme.of(
+ context)
+ .primaryBackground,
+ elevation: 2.0,
+ borderColor:
+ FlutterFlowTheme.of(
+ context)
+ .accent1,
+ borderWidth: 0.5,
+ borderRadius: 10.0,
+ margin:
+ const EdgeInsetsDirectional
+ .fromSTEB(16.0, 4.0,
+ 16.0, 4.0),
+ hidesUnderline: true,
+ isOverButton: true,
+ isSearchable: false,
+ isMultiSelect: false,
+ );
+ },
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ Divider(
+ thickness: 0.5,
+ color:
+ FlutterFlowTheme.of(context).accent1,
+ ),
+ Align(
+ alignment:
+ const AlignmentDirectional(-1.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 30.0, 0.0, 30.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'mddp33o0' /* Visita se encerra após o prime... */,
+ ),
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w600,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 30.0, 0.0, 30.0, 20.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment:
+ MainAxisAlignment.center,
+ crossAxisAlignment:
+ CrossAxisAlignment.center,
+ children: [
+ Flexible(
+ child: Padding(
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0, 0.0, 130.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context)
+ .getText(
+ '68j9gw4h' /* Visita única */,
+ ),
+ textAlign: TextAlign.start,
+ style:
+ FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ),
+ Switch.adaptive(
+ value: _model.switchValue!,
+ onChanged: (newValue) async {
+ setState(() => _model
+ .switchValue = newValue);
+ },
+ activeTrackColor:
+ FlutterFlowTheme.of(context)
+ .primary,
+ inactiveTrackColor:
+ FlutterFlowTheme.of(context)
+ .primaryText,
+ inactiveThumbColor:
+ FlutterFlowTheme.of(context)
+ .alternate,
+ ),
+ ],
+ ),
+ ),
+ Divider(
+ thickness: 0.5,
+ color:
+ FlutterFlowTheme.of(context).accent1,
+ ),
+ Align(
+ alignment:
+ const AlignmentDirectional(-1.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 30.0, 0.0, 30.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ '9rudpkq7' /* Você tem alguma observação sob... */,
+ ),
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w600,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 24.0, 0.0, 24.0, 20.0),
+ child: SizedBox(
+ width: double.infinity,
+ child: TextFormField(
+ controller: _model.textController3,
+ focusNode: _model.textFieldFocusNode3,
+ autofocus: false,
+ textInputAction: TextInputAction.next,
+ obscureText: false,
+ decoration: InputDecoration(
+ labelText:
+ FFLocalizations.of(context)
+ .getText(
+ '4rgpxrfe' /* Observações da Visita */,
+ ),
+ labelStyle:
+ FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .labelMediumFamily,
+ color:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .labelMediumFamily),
+ ),
+ hintText:
+ FFLocalizations.of(context)
+ .getText(
+ '7knytis2' /* Escreva as suas observações aq... */,
+ ),
+ hintStyle:
+ FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .labelMediumFamily,
+ color:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .labelMediumFamily),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ FlutterFlowTheme.of(context)
+ .accent1,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(10.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ FlutterFlowTheme.of(context)
+ .primary,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(10.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ FlutterFlowTheme.of(context)
+ .error,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(10.0),
+ ),
+ focusedErrorBorder:
+ OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ FlutterFlowTheme.of(context)
+ .error,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(10.0),
+ ),
+ suffixIcon: Icon(
+ Icons.format_color_text,
+ color:
+ FlutterFlowTheme.of(context)
+ .accent1,
+ ),
+ ),
+ 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),
+ ),
+ textAlign: TextAlign.start,
+ maxLines: null,
+ validator: _model
+ .textController3Validator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ Container(
+ width: 100.0,
+ height: 54.0,
+ decoration: const BoxDecoration(),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ if ((_model.textController1.text != '') &&
+ (_model.textController2.text != '') &&
+ (_model.dropDownValue1 != null &&
+ _model.dropDownValue1 != '') &&
+ (_model.dropDownValue2 != null &&
+ _model.dropDownValue2 != '')) {
+ 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: VisitDetailsModalWidget(
+ visitStartDateStr:
+ _model.textController1.text,
+ visitEndDateStr:
+ _model.textController2.text,
+ visitReasonStr: _model.dropDownValue1,
+ visitLevelStr: _model.dropDownValue2,
+ visitTempStr: _model.switchValue == true
+ ? 'Sim'
+ : 'Não',
+ visitObsStr:
+ _model.textController3.text,
+ visitorStrList: _model.visitorStrList,
+ visitorJsonList: _model.visitorJsonList,
+ updateToggleIdx: () async {},
+ repeatVisitSchedule: () async {},
+ ),
+ ),
+ );
+ },
+ ).then((value) => safeSetState(() {}));
+ } 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: const ThrowExceptionWidget(
+ msg: 'Campos obrigatórios imcompletos.',
+ ),
+ ),
+ );
+ },
+ ).then((value) => safeSetState(() {}));
+ }
+ },
+ child: Container(
+ width: double.infinity,
+ height: 40.0,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primary,
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(0.0),
+ bottomRight: Radius.circular(0.0),
+ topLeft: Radius.circular(0.0),
+ topRight: Radius.circular(0.0),
+ ),
+ ),
+ alignment: const AlignmentDirectional(0.0, 1.0),
+ child: Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Icon(
+ Icons.save_alt,
+ color: FlutterFlowTheme.of(context).info,
+ size: 24.0,
+ ),
+ ),
+ ),
+ ),
+ ],
+ );
+ } else {
+ 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 GestureDetector(
+ onTap: () => _model
+ .unfocusNode.canRequestFocus
+ ? FocusScope.of(context)
+ .requestFocus(
+ _model.unfocusNode)
+ : FocusScope.of(context).unfocus(),
+ child: Padding(
+ padding:
+ MediaQuery.viewInsetsOf(context),
+ child: const OptModalWidget(),
+ ),
+ );
+ },
+ ).then((value) => safeSetState(() {}));
+ },
+ ),
+ ],
+ ),
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsets.all(14.0),
+ child: FutureBuilder(
+ 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(
+ () {
+ 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 GestureDetector(
+ onTap: () => _model
+ .unfocusNode
+ .canRequestFocus
+ ? FocusScope.of(
+ context)
+ .requestFocus(
+ _model
+ .unfocusNode)
+ : FocusScope.of(
+ context)
+ .unfocus(),
+ child: 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 {
+ _model.toggleIdx =
+ true;
+ 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(
+ () {
+ 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),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+ },
+ );
+ },
+ );
+ },
),
),
),
],
),
- InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- if ((_model.textController1.text != '') &&
- (_model.textController2.text != '') &&
- (_model.dropDownValue1 != null &&
- _model.dropDownValue1 != '') &&
- (_model.dropDownValue2 != null &&
- _model.dropDownValue2 != '')) {
- 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: VisitDetailsModalWidget(
- visitStartDateStr:
- _model.textController1.text,
- visitEndDateStr:
- _model.textController2.text,
- visitReasonStr: _model.dropDownValue1,
- visitLevelStr: _model.dropDownValue2,
- visitTempStr: _model.switchValue == true
- ? 'Sim'
- : 'Não',
- visitObsStr: _model.textController3.text,
- visitorStrList: _model.visitorStrList,
- visitorJsonList: _model.visitorJsonList,
- updateToggleIdx: () async {},
- repeatVisitSchedule: () async {},
- ),
- ),
- );
- },
- ).then((value) => safeSetState(() {}));
- } 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: const ThrowExceptionWidget(
- msg: 'Campos obrigatórios imcompletos.',
- ),
- ),
- );
- },
- ).then((value) => safeSetState(() {}));
- }
- },
- child: Container(
- width: MediaQuery.sizeOf(context).width * 0.5,
- height: 40.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).primary,
- borderRadius: BorderRadius.circular(10.0),
- ),
- alignment: const AlignmentDirectional(0.0, 1.0),
- child: Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Icon(
- Icons.save_alt,
- color: FlutterFlowTheme.of(context).info,
- size: 24.0,
- ),
- ),
- ),
- ),
- ].addToEnd(const SizedBox(height: 30.0)),
- ),
- if (valueOrDefault(
- _model.toggleIndexValue == false,
- true,
- ))
- 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 GestureDetector(
- onTap: () => _model
- .unfocusNode.canRequestFocus
- ? FocusScope.of(context)
- .requestFocus(_model.unfocusNode)
- : FocusScope.of(context).unfocus(),
- child: Padding(
- padding:
- MediaQuery.viewInsetsOf(context),
- child: const OptModalWidget(),
- ),
- );
- },
- ).then((value) => safeSetState(() {}));
- },
- ),
- ],
- ),
- FutureBuilder(
- 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 wrapGetVisitsResponse = snapshot.data!;
- return Builder(
- builder: (context) {
- final visitaWrap = PhpGroup.getVisitsCall
- .visitasList(
- wrapGetVisitsResponse.jsonBody,
- )
- ?.toList() ??
- [];
- return Wrap(
- spacing: 2.0,
- runSpacing: 1.0,
- alignment: WrapAlignment.start,
- crossAxisAlignment: WrapCrossAlignment.start,
- direction: Axis.horizontal,
- runAlignment: WrapAlignment.start,
- verticalDirection: VerticalDirection.down,
- clipBehavior: Clip.none,
- children: List.generate(visitaWrap.length,
- (visitaWrapIndex) {
- final visitaWrapItem =
- visitaWrap[visitaWrapIndex];
- return Card(
- clipBehavior: Clip.antiAliasWithSaveLayer,
- color: FlutterFlowTheme.of(context)
- .secondaryBackground,
- elevation: 5.0,
- shape: RoundedRectangleBorder(
- borderRadius:
- BorderRadius.circular(8.0),
- ),
- child: Container(
- width: 350.0,
- height: 115.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .secondaryBackground,
- ),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment:
- MainAxisAlignment.spaceBetween,
- children: [
- Expanded(
- child: Container(
- width: 100.0,
- height: 100.0,
- decoration: const BoxDecoration(),
- child: Column(
- mainAxisSize:
- MainAxisSize.max,
- children: [
- Row(
- mainAxisSize:
- MainAxisSize.max,
- children: [
- Text(
- FFLocalizations.of(
- context)
- .getText(
- 'd34nuw4w' /* Visitante: */,
- ),
- style: FlutterFlowTheme
- .of(context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing:
- 0.0,
- fontWeight:
- FontWeight
- .bold,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- ),
- Align(
- alignment:
- const AlignmentDirectional(
- -1.0, -1.0),
- child: Text(
- FFLocalizations.of(
- context)
- .getText(
- 'y8geteyc' /* Lucas Martin Mota */,
- ),
- style: FlutterFlowTheme
- .of(context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- ),
- ),
- ].addToStart(const SizedBox(
- width: 10.0)),
- ),
- Row(
- mainAxisSize:
- MainAxisSize.max,
- mainAxisAlignment:
- MainAxisAlignment
- .start,
- children: [
- Text(
- FFLocalizations.of(
- context)
- .getText(
- 'gxdykms1' /* Morador: */,
- ),
- style: FlutterFlowTheme
- .of(context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing:
- 0.0,
- fontWeight:
- FontWeight
- .bold,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- ),
- Text(
- FFLocalizations.of(
- context)
- .getText(
- 'ue7wkm9r' /* Lucas Martin Mota */,
- ),
- style: FlutterFlowTheme
- .of(context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- ),
- ].addToStart(const SizedBox(
- width: 10.0)),
- ),
- Row(
- mainAxisSize:
- MainAxisSize.max,
- mainAxisAlignment:
- MainAxisAlignment
- .start,
- children: [
- Text(
- FFLocalizations.of(
- context)
- .getText(
- 'zs8s0wd3' /* Validade: */,
- ),
- style: FlutterFlowTheme
- .of(context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- letterSpacing:
- 0.0,
- fontWeight:
- FontWeight
- .bold,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- ),
- Text(
- FFLocalizations.of(
- context)
- .getText(
- 'z7fset9r' /* 16/10/2024 a 16/10/2024 */,
- ),
- style: FlutterFlowTheme
- .of(context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(
- context)
- .bodyMediumFamily,
- fontSize: 13.0,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- ),
- ].addToStart(const SizedBox(
- width: 10.0)),
- ),
- Align(
- alignment:
- const AlignmentDirectional(
- -1.0, 0.0),
- child: Padding(
- padding:
- const EdgeInsetsDirectional
- .fromSTEB(
- 10.0,
- 0.0,
- 0.0,
- 0.0),
- child: Container(
- width: 200.0,
- height: 27.0,
- decoration:
- BoxDecoration(
- color: FlutterFlowTheme
- .of(context)
- .primary,
- borderRadius:
- BorderRadius
- .circular(
- 5.0),
- ),
- child: Align(
- alignment:
- const AlignmentDirectional(
- 0.0, 0.0),
- child: Text(
- FFLocalizations.of(
- context)
- .getText(
- 'fcb5avae' /* Agendamento Ativo */,
- ),
- style: FlutterFlowTheme
- .of(context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(context)
- .bodyMediumFamily,
- color: FlutterFlowTheme.of(
- context)
- .info,
- letterSpacing:
- 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(context).bodyMediumFamily),
- ),
- ),
- ),
- ),
- ),
- ),
- ].divide(
- const SizedBox(height: 2.0)),
- ),
- ),
- ),
- ClipRRect(
- borderRadius:
- BorderRadius.circular(0.0),
- child: Image.network(
- 'https://images.unsplash.com/photo-1599566150163-29194dcaad36?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w0NTYyMDF8MHwxfHNlYXJjaHwxNHx8cGVyc29ufGVufDB8fHx8MTcxNzc4MDk1Mnww&ixlib=rb-4.0.3&q=80&w=1080',
- fit: BoxFit.cover,
- ),
- ),
- ],
- ),
- ),
- );
- }),
- );
- },
- );
- },
- ),
- ],
- ),
- ),
- ],
- ),
+ );
+ }
+ },
+ ),
+ ],
),
),
),
diff --git a/lib/application_pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart b/lib/application_pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart
index f9c25f93..90e61b98 100644
--- a/lib/application_pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart
+++ b/lib/application_pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart
@@ -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(
- '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(
+ '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)),
),
diff --git a/lib/on_boarding/on_boarding_legacy/welcome_page/welcome_page_model.dart b/lib/application_pages/welcome_page/welcome_page_model.dart
similarity index 100%
rename from lib/on_boarding/on_boarding_legacy/welcome_page/welcome_page_model.dart
rename to lib/application_pages/welcome_page/welcome_page_model.dart
diff --git a/lib/on_boarding/on_boarding_legacy/welcome_page/welcome_page_widget.dart b/lib/application_pages/welcome_page/welcome_page_widget.dart
similarity index 97%
rename from lib/on_boarding/on_boarding_legacy/welcome_page/welcome_page_widget.dart
rename to lib/application_pages/welcome_page/welcome_page_widget.dart
index 1ec859fe..9484ebf9 100644
--- a/lib/on_boarding/on_boarding_legacy/welcome_page/welcome_page_widget.dart
+++ b/lib/application_pages/welcome_page/welcome_page_widget.dart
@@ -36,13 +36,16 @@ class _WelcomePageWidgetState extends State
if (FFAppState().isLogged == true) {
context.pushNamed(
'homePage',
- extra: {
- 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
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
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
text:
FFLocalizations.of(context)
.getText(
- '65nuva6j' /* Entrar */,
+ 'zt5uc5g5' /* Entrar */,
),
options: FFButtonOptions(
width: double.infinity,
@@ -320,7 +323,7 @@ class _WelcomePageWidgetState extends State
text:
FFLocalizations.of(context)
.getText(
- '9u6oaw01' /* Cadastrar */,
+ 'jteakpo0' /* Cadastrar */,
),
options: FFButtonOptions(
width: double.infinity,
@@ -395,7 +398,7 @@ class _WelcomePageWidgetState extends State
text: FFLocalizations.of(
context)
.getText(
- 'd1qem43w' /* Entrar */,
+ 'qoc86gvo' /* Entrar */,
),
options: FFButtonOptions(
width: double.infinity,
@@ -456,7 +459,7 @@ class _WelcomePageWidgetState extends State
text: FFLocalizations.of(
context)
.getText(
- 'bhowzv2u' /* Cadastrar */,
+ 'p5tgmj0c' /* Cadastrar */,
),
options: FFButtonOptions(
width: double.infinity,
diff --git a/lib/backend/api_requests/api_calls.dart b/lib/backend/api_requests/api_calls.dart
index 7204e476..33deadb3 100644
--- a/lib/backend/api_requests/api_calls.dart
+++ b/lib/backend/api_requests/api_calls.dart
@@ -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 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(getJsonField(
- response,
- r'''$.error''',
- ));
- String? errorMsg(dynamic response) => castToType(getJsonField(
- response,
- r'''$.error_msg''',
- ));
-}
-
-class DebugCallCall {
- Future 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 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 {
diff --git a/lib/backend/cloud_functions/cloud_functions.dart b/lib/backend/cloud_functions/cloud_functions.dart
new file mode 100644
index 00000000..4f4e4d18
--- /dev/null
+++ b/lib/backend/cloud_functions/cloud_functions.dart
@@ -0,0 +1,23 @@
+import 'package:cloud_functions/cloud_functions.dart';
+
+Future