diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index a88ef9c2..08fca23b 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -5,7 +5,8 @@
-
+
+
? visitorJsonList,
String? visitorStrList,
@@ -49,5 +54,228 @@ Future repeatVisitScheduleActionBlock(
true,
),
}.withoutNulls,
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.fade,
+ ),
+ },
);
}
+
+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/molecular_components/option_selection_modal/option_selection_modal_widget.dart b/lib/application_components/molecular_components/option_selection_modal/option_selection_modal_widget.dart
index 8baf37ac..ea00bd17 100644
--- a/lib/application_components/molecular_components/option_selection_modal/option_selection_modal_widget.dart
+++ b/lib/application_components/molecular_components/option_selection_modal/option_selection_modal_widget.dart
@@ -57,41 +57,59 @@ class _OptionSelectionModalWidgetState extends State
@override
Widget build(BuildContext context) {
- return Column(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Wrap(
- spacing: 17.0,
- runSpacing: 0.0,
- alignment: WrapAlignment.start,
- crossAxisAlignment: WrapCrossAlignment.start,
- direction: Axis.horizontal,
- runAlignment: WrapAlignment.start,
- verticalDirection: VerticalDirection.down,
- clipBehavior: Clip.none,
- children: [
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 1.0),
- child: InkWell(
+ return InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ Navigator.pop(context);
+ },
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Wrap(
+ spacing: 17.0,
+ runSpacing: 0.0,
+ alignment: WrapAlignment.start,
+ crossAxisAlignment: WrapCrossAlignment.start,
+ direction: Axis.horizontal,
+ runAlignment: WrapAlignment.start,
+ verticalDirection: VerticalDirection.down,
+ clipBehavior: Clip.none,
+ children: [
+ InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
Navigator.pop(context);
+
+ context.pushNamed('fastPassPage');
},
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).customColor1,
+ color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@@ -147,8 +165,8 @@ class _OptionSelectionModalWidgetState extends State
alignment: const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
- 'omxabblt' /* Agenda
-Rápida */
+ 'bmjlmhht' /* Agenda
+Rapida */
,
),
style: FlutterFlowTheme.of(context)
@@ -173,10 +191,7 @@ Rápida */
),
),
),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 1.0),
- child: InkWell(
+ InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
@@ -191,10 +206,20 @@ Rápida */
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).customColor1,
+ color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@@ -250,7 +275,7 @@ Rápida */
alignment: const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
- 'vpy51li0' /* Agenda
+ 'ci8eyh2v' /* Agenda
Provisória */
,
),
@@ -276,10 +301,7 @@ Provisória */
),
),
),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 1.0),
- child: InkWell(
+ InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
@@ -294,10 +316,20 @@ Provisória */
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).customColor1,
+ color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@@ -353,7 +385,7 @@ Provisória */
alignment: const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
- '8ad3hms9' /* Agenda
+ 'jj2b545b' /* Agenda
Completa */
,
),
@@ -379,11 +411,11 @@ Completa */
),
),
),
- ),
- ],
- ).animateOnPageLoad(animationsMap['wrapOnPageLoadAnimation']!),
- ),
- ],
+ ],
+ ).animateOnPageLoad(animationsMap['wrapOnPageLoadAnimation']!),
+ ),
+ ],
+ ),
);
}
}
diff --git a/lib/application_components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart b/lib/application_components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart
index a6b63538..b2f4c288 100644
--- a/lib/application_components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart
+++ b/lib/application_components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart
@@ -1,4 +1,4 @@
-import '/application_components/templates_components/regisiter_vistor_component/regisiter_vistor_component_widget.dart';
+import '/application_components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
@@ -130,7 +130,7 @@ class _VisitorNotFoundComponentWidgetState
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
- child: const RegisiterVistorComponentWidget(),
+ child: const RegisiterVistorTemplateComponentWidget(),
);
},
).then((value) => safeSetState(() {}));
diff --git a/lib/application_components/templates_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart b/lib/application_components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart
similarity index 100%
rename from lib/application_components/templates_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart
rename to lib/application_components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart
diff --git a/lib/application_components/templates_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart b/lib/application_components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart
similarity index 100%
rename from lib/application_components/templates_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart
rename to lib/application_components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart
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 d63fabf0..ec4c3b0a 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,6 +2,7 @@ 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';
@@ -43,119 +44,107 @@ class _LocalProfileComponentWidgetState
Widget build(BuildContext context) {
context.watch();
- 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),
- ),
- ),
- ),
+ 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),
),
),
- 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,
+ 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,
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/templates_components/menu_component/menu_component_model.dart b/lib/application_components/organism_components/menu_component/menu_component_model.dart
similarity index 53%
rename from lib/application_components/templates_components/menu_component/menu_component_model.dart
rename to lib/application_components/organism_components/menu_component/menu_component_model.dart
index 1fe72b77..3b68346f 100644
--- a/lib/application_components/templates_components/menu_component/menu_component_model.dart
+++ b/lib/application_components/organism_components/menu_component/menu_component_model.dart
@@ -1,3 +1,4 @@
+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';
@@ -34,4 +35,43 @@ 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',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.fade,
+ ),
+ },
+ );
+ }
+
+ Future peopleOnThePropertyAction(BuildContext context) async {
+ context.pushNamed(
+ 'peopleOnThePropertyPage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.fade,
+ ),
+ },
+ );
+ }
}
diff --git a/lib/application_components/templates_components/menu_component/menu_component_widget.dart b/lib/application_components/organism_components/menu_component/menu_component_widget.dart
similarity index 65%
rename from lib/application_components/templates_components/menu_component/menu_component_widget.dart
rename to lib/application_components/organism_components/menu_component/menu_component_widget.dart
index b89f8671..b885b196 100644
--- a/lib/application_components/templates_components/menu_component/menu_component_widget.dart
+++ b/lib/application_components/organism_components/menu_component/menu_component_widget.dart
@@ -50,6 +50,18 @@ class _MenuComponentWidgetState extends State {
await _model.changeMenuStyle(context);
setState(() {});
},
+ registerVisitorOptAction: () async {
+ await _model.registerVisitorOptAction(context);
+ setState(() {});
+ },
+ scheduleVisitOptAction: () async {
+ await _model.scheduleVisitOptAction(context);
+ setState(() {});
+ },
+ peopleOnThePropertyOptAction: () async {
+ await _model.peopleOnThePropertyAction(context);
+ setState(() {});
+ },
),
);
} else {
@@ -58,10 +70,22 @@ class _MenuComponentWidgetState extends State {
updateCallback: () => setState(() {}),
updateOnChange: true,
child: MenuStaggeredViewComponentWidget(
- changeMenuStyle: () async {
+ changeMenuStyleAction: () async {
await _model.changeMenuStyle(context);
setState(() {});
},
+ registerVisitorOptAction: () async {
+ await _model.registerVisitorOptAction(context);
+ setState(() {});
+ },
+ scheduleVisitOptAction: () async {
+ await _model.scheduleVisitOptAction(context);
+ setState(() {});
+ },
+ peopleOnThePropertyOptAction: () async {
+ await _model.peopleOnThePropertyAction(context);
+ setState(() {});
+ },
),
);
}
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 798a0c96..75cd40af 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,10 +1,8 @@
-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';
@@ -12,9 +10,15 @@ class MenuListViewComponentWidget extends StatefulWidget {
const MenuListViewComponentWidget({
super.key,
required this.changeMenuStyle,
+ required this.registerVisitorOptAction,
+ required this.scheduleVisitOptAction,
+ required this.peopleOnThePropertyOptAction,
});
final Future Function()? changeMenuStyle;
+ final Future Function()? registerVisitorOptAction;
+ final Future Function()? scheduleVisitOptAction;
+ final Future Function()? peopleOnThePropertyOptAction;
@override
State createState() =>
@@ -46,8 +50,6 @@ class _MenuListViewComponentWidgetState
@override
Widget build(BuildContext context) {
- context.watch();
-
return Wrap(
spacing: 0.0,
runSpacing: 0.0,
@@ -62,42 +64,46 @@ class _MenuListViewComponentWidgetState
padding: const EdgeInsetsDirectional.fromSTEB(5.0, 0.0, 5.0, 0.0),
child: Container(
width: double.infinity,
- height: 106.0,
+ height: 125.0,
decoration: const BoxDecoration(),
child: ListView(
- padding: EdgeInsets.zero,
+ padding: const EdgeInsets.fromLTRB(
+ 10.0,
+ 0,
+ 10.0,
+ 0,
+ ),
scrollDirection: Axis.horizontal,
children: [
Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.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 Padding(
- padding: MediaQuery.viewInsetsOf(context),
- child: const OptionSelectionModalWidget(),
- );
- },
- ).then((value) => safeSetState(() {}));
+ await widget.scheduleVisitOptAction?.call();
},
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).customColor1,
+ color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@@ -182,36 +188,34 @@ Visita */
),
),
Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
- context.pushNamed(
- 'registerVisitorPage',
- queryParameters: {
- 'userUUID': serializeParam(
- FFAppState().userUUID,
- ParamType.String,
- ),
- 'devUUID': serializeParam(
- FFAppState().devUUID,
- ParamType.String,
- ),
- }.withoutNulls,
- );
+ await widget.registerVisitorOptAction?.call();
},
child: Container(
width: 100.0,
- height: 0.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).customColor1,
+ color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@@ -296,16 +300,26 @@ Visitante */
),
),
Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.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).customColor1,
+ color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@@ -388,16 +402,26 @@ Condomínio */
),
),
Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.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).customColor1,
+ color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@@ -480,108 +504,26 @@ Pet */
),
),
Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 0.0, 1.0),
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.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).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,
+ color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@@ -664,98 +606,118 @@ de Acesso */
),
),
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,
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 20.0),
+ child: InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ await widget.peopleOnThePropertyOptAction?.call();
+ },
+ 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,
+ 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,
+ 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(
+ Icons.people,
+ 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 */
- ,
+ 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(
+ 'rxnrtdau' /* Pessoas na
+Propriedade */
+ ,
+ ),
+ 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)),
+ ),
),
),
),
),
- ],
+ ].divide(const SizedBox(width: 15.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 85226519..c85631c4 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,10 +10,16 @@ export 'menu_staggered_view_component_model.dart';
class MenuStaggeredViewComponentWidget extends StatefulWidget {
const MenuStaggeredViewComponentWidget({
super.key,
- required this.changeMenuStyle,
+ required this.changeMenuStyleAction,
+ required this.registerVisitorOptAction,
+ required this.scheduleVisitOptAction,
+ required this.peopleOnThePropertyOptAction,
});
- final Future Function()? changeMenuStyle;
+ final Future Function()? changeMenuStyleAction;
+ final Future Function()? registerVisitorOptAction;
+ final Future Function()? scheduleVisitOptAction;
+ final Future Function()? peopleOnThePropertyOptAction;
@override
State createState() =>
@@ -57,7 +63,7 @@ class _MenuStaggeredViewComponentWidgetState
children: [
Container(
width: double.infinity,
- height: 430.0,
+ height: MediaQuery.sizeOf(context).height * 0.35,
decoration: const BoxDecoration(),
child: Padding(
padding: const EdgeInsets.all(16.0),
@@ -68,502 +74,39 @@ class _MenuStaggeredViewComponentWidgetState
),
crossAxisSpacing: 10.0,
mainAxisSpacing: 10.0,
- itemCount: 7,
+ itemCount: 6,
shrinkWrap: true,
itemBuilder: (context, index) {
return [
- () => 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,
- )),
+ () => InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ await widget.scheduleVisitOptAction?.call();
+ },
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).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(
- 'jn7p6pj6' /* 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)),
- ),
- ),
- ),
- ),
- () => 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.kvector,
- 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(
- 'yymmdtyv' /* Cadastrar
-Visitante */
- ,
- ),
- 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.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(
- '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'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].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.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(
- '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'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].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,
+ color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@@ -624,7 +167,7 @@ Pet */
const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
- 'if2zuaok' /* Agendar
+ 'ee33l0ms' /* Agendar
Visita */
,
),
@@ -652,34 +195,35 @@ Visita */
),
),
),
- () => 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,
- )),
+ () => InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ await widget.registerVisitorOptAction?.call();
+ },
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).customColor1,
+ color: FlutterFlowTheme.of(context).alternate,
width: 0.5,
),
),
@@ -716,7 +260,7 @@ Visita */
alignment: const AlignmentDirectional(
0.0, 0.0),
child: Icon(
- FFIcons.kvector3,
+ FFIcons.kvector,
color:
FlutterFlowTheme.of(context)
.accent1,
@@ -740,8 +284,8 @@ Visita */
const AlignmentDirectional(0.0, 0.0),
child: Text(
FFLocalizations.of(context).getText(
- 'r4mjqq6s' /* Agendar
-Visita */
+ 'ya37l3jt' /* Cadastrar
+ Visitante */
,
),
style: FlutterFlowTheme.of(context)
@@ -768,96 +312,412 @@ Visita */
),
),
),
- () => 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,
- ),
+ () => 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,
),
- 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.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(
+ ),
+ 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
+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'),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ].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,
+ ),
+ ),
+ 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(0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'cilu7ief' /* QR Code
+ 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
+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'),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ].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,
+ ),
+ ),
+ 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(
+ '9tli4i2x' /* 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)),
+ ),
+ ),
+ ),
+ () => InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ await widget.peopleOnThePropertyOptAction?.call();
+ },
+ 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,
+ 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(
+ Icons.people,
+ 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(
+ 'i22hecs8' /* Pessoas na
+Propriedade */
,
),
style: FlutterFlowTheme.of(context)
@@ -914,7 +774,7 @@ de Acesso */
color: FlutterFlowTheme.of(context).primary,
),
onPressed: () async {
- await widget.changeMenuStyle?.call();
+ await widget.changeMenuStyleAction?.call();
},
),
),
diff --git a/lib/application_components/templates_components/message_well_component/message_well_component_model.dart b/lib/application_components/organism_components/message_well_component/message_well_component_model.dart
similarity index 100%
rename from lib/application_components/templates_components/message_well_component/message_well_component_model.dart
rename to lib/application_components/organism_components/message_well_component/message_well_component_model.dart
diff --git a/lib/application_components/templates_components/message_well_component/message_well_component_widget.dart b/lib/application_components/organism_components/message_well_component/message_well_component_widget.dart
similarity index 98%
rename from lib/application_components/templates_components/message_well_component/message_well_component_widget.dart
rename to lib/application_components/organism_components/message_well_component/message_well_component_widget.dart
index 3109dce7..d8a5b8b8 100644
--- a/lib/application_components/templates_components/message_well_component/message_well_component_widget.dart
+++ b/lib/application_components/organism_components/message_well_component/message_well_component_widget.dart
@@ -84,7 +84,7 @@ class _MessageWellComponentWidgetState
.override(
fontFamily:
FlutterFlowTheme.of(context).labelMediumFamily,
- color: FlutterFlowTheme.of(context).secondaryText,
+ color: FlutterFlowTheme.of(context).customColor4,
letterSpacing: 0.0,
fontWeight: FontWeight.normal,
useGoogleFonts: GoogleFonts.asMap().containsKey(
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 df34ecea..1c6116c2 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
@@ -1,5 +1,5 @@
import '/application_components/molecular_components/throw_exception/throw_exception_widget.dart';
-import '/application_components/templates_components/visitor_details_modal/visitor_details_modal_widget.dart';
+import '/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
import '/flutter_flow/flutter_flow_theme.dart';
@@ -206,7 +206,7 @@ class _ScheduleVisitDetailWidgetState extends State {
MediaQuery.viewInsetsOf(
context),
child:
- const VisitorDetailsModalWidget(),
+ const VisitorDetailsModalTemplateComponentWidget(),
);
},
).then((value) =>
@@ -921,7 +921,6 @@ 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,
@@ -932,6 +931,7 @@ 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 883791c9..32e250ab 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,12 +4,10 @@ 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 d48a2c31..6f765217 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
@@ -1,9 +1,10 @@
import '/application_components/molecular_components/throw_exception/throw_exception_widget.dart';
-import '/application_components/templates_components/visitor_details_modal/visitor_details_modal_widget.dart';
+import '/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_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 '/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';
@@ -26,8 +27,6 @@ class ViewVisitDetailWidget extends StatefulWidget {
required this.visitorStrList,
this.visitorJsonList,
required this.visitIdStr,
- required this.updateToggleIdx,
- this.repeatVisitScheduleActionBlock,
});
final String? visitorImgPath;
@@ -41,8 +40,6 @@ class ViewVisitDetailWidget extends StatefulWidget {
final String? visitorStrList;
final List? visitorJsonList;
final String? visitIdStr;
- final Future Function()? updateToggleIdx;
- final Future Function()? repeatVisitScheduleActionBlock;
@override
State createState() => _ViewVisitDetailWidgetState();
@@ -64,23 +61,14 @@ class _ViewVisitDetailWidgetState extends State {
// On component load action.
SchedulerBinding.instance.addPostFrameCallback((_) async {
- 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.visitStatusColor = await action_blocks.manageStatusColorAction(
+ context,
+ visitStatusStr: widget.visitStatusStr,
+ );
});
- _model.textController1 ??=
- TextEditingController(text: widget.visitorStrList);
+ _model.textController1 ??= TextEditingController(
+ text: widget.visitTempStr == 'null' ? '' : widget.visitTempStr);
_model.textFieldFocusNode1 ??= FocusNode();
_model.textController2 ??=
@@ -203,7 +191,8 @@ class _ViewVisitDetailWidgetState extends State {
builder: (context) {
return Padding(
padding: MediaQuery.viewInsetsOf(context),
- child: const VisitorDetailsModalWidget(),
+ child:
+ const VisitorDetailsModalTemplateComponentWidget(),
);
},
).then((value) => safeSetState(() {}));
@@ -767,7 +756,10 @@ class _ViewVisitDetailWidgetState extends State {
width: double.infinity,
height: 35.0,
decoration: BoxDecoration(
- color: _model.statusColor,
+ color: valueOrDefault(
+ _model.visitStatusColor,
+ FlutterFlowTheme.of(context).primary,
+ ),
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(0.0),
bottomRight: Radius.circular(0.0),
@@ -857,7 +849,6 @@ class _ViewVisitDetailWidgetState extends State {
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
- await widget.updateToggleIdx?.call();
Navigator.pop(context);
context.pushNamed(
diff --git a/lib/application_components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart b/lib/application_components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart
new file mode 100644
index 00000000..4178de7c
--- /dev/null
+++ b/lib/application_components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart
@@ -0,0 +1,26 @@
+import '/backend/api_requests/api_calls.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'forgot_password_template_component_widget.dart'
+ show ForgotPasswordTemplateComponentWidget;
+import 'package:flutter/material.dart';
+
+class ForgotPasswordTemplateComponentModel
+ extends FlutterFlowModel {
+ /// State fields for stateful widgets in this component.
+
+ // State field(s) for emailAddress widget.
+ FocusNode? emailAddressFocusNode;
+ TextEditingController? emailAddressTextController;
+ String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
+ // Stores action output result for [Backend Call - API (forgotPassword)] action in Button-Login widget.
+ ApiCallResponse? req;
+
+ @override
+ void initState(BuildContext context) {}
+
+ @override
+ void dispose() {
+ emailAddressFocusNode?.dispose();
+ emailAddressTextController?.dispose();
+ }
+}
diff --git a/lib/application_components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart b/lib/application_components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart
new file mode 100644
index 00000000..f63bb7a2
--- /dev/null
+++ b/lib/application_components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart
@@ -0,0 +1,292 @@
+import '/backend/api_requests/api_calls.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
+import 'package:flutter/material.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'forgot_password_template_component_model.dart';
+export 'forgot_password_template_component_model.dart';
+
+class ForgotPasswordTemplateComponentWidget extends StatefulWidget {
+ const ForgotPasswordTemplateComponentWidget({super.key});
+
+ @override
+ State createState() =>
+ _ForgotPasswordTemplateComponentWidgetState();
+}
+
+class _ForgotPasswordTemplateComponentWidgetState
+ extends State {
+ late ForgotPasswordTemplateComponentModel _model;
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model = createModel(context, () => ForgotPasswordTemplateComponentModel());
+
+ _model.emailAddressTextController ??= TextEditingController();
+ _model.emailAddressFocusNode ??= FocusNode();
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Align(
+ alignment: const AlignmentDirectional(0.0, 1.0),
+ child: Container(
+ width: double.infinity,
+ height: 300.0,
+ constraints: const BoxConstraints(
+ maxWidth: 570.0,
+ ),
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ // This row exists for when the "app bar" is hidden on desktop, having a way back for the user can work well.
+ if (responsiveVisibility(
+ context: context,
+ phone: false,
+ tablet: false,
+ ))
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
+ child: InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ context.safePop();
+ },
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ const Padding(
+ padding: EdgeInsetsDirectional.fromSTEB(
+ 0.0, 12.0, 0.0, 12.0),
+ child: Icon(
+ Icons.arrow_back_rounded,
+ color: Color(0xFF15161E),
+ size: 24.0,
+ ),
+ ),
+ Padding(
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
+ child: Text(
+ '',
+ style:
+ FlutterFlowTheme.of(context).bodyMedium.override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: const Color(0xFF15161E),
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey('Plus Jakarta Sans'),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'xxm3ajsy' /* ESQUECEU SUA SENHA? */,
+ ),
+ style: FlutterFlowTheme.of(context).headlineMedium.override(
+ fontFamily: 'Outfit',
+ color: FlutterFlowTheme.of(context).primaryText,
+ fontSize: 24.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'wu2f7yzo' /* Não se preucupe nós vamos te a... */,
+ ),
+ style: FlutterFlowTheme.of(context).labelMedium.override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(context).primaryText,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts:
+ GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
+ child: SizedBox(
+ width: double.infinity,
+ child: TextFormField(
+ controller: _model.emailAddressTextController,
+ focusNode: _model.emailAddressFocusNode,
+ autofillHints: const [AutofillHints.email],
+ obscureText: false,
+ decoration: InputDecoration(
+ labelText: FFLocalizations.of(context).getText(
+ 'mtz8l7ft' /* Email */,
+ ),
+ labelStyle:
+ FlutterFlowTheme.of(context).labelMedium.override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(context).accent1,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey('Plus Jakarta Sans'),
+ ),
+ hintText: FFLocalizations.of(context).getText(
+ 'w7y5wlnv' /* digite o seu email..... */,
+ ),
+ hintStyle:
+ FlutterFlowTheme.of(context).labelMedium.override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(context).primaryText,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey('Plus Jakarta Sans'),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).accent1,
+ width: 2.0,
+ ),
+ borderRadius: BorderRadius.circular(12.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).accent3,
+ width: 2.0,
+ ),
+ borderRadius: BorderRadius.circular(12.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).error,
+ width: 2.0,
+ ),
+ borderRadius: BorderRadius.circular(12.0),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).error,
+ width: 2.0,
+ ),
+ borderRadius: BorderRadius.circular(12.0),
+ ),
+ filled: true,
+ fillColor: FlutterFlowTheme.of(context).primaryBackground,
+ contentPadding:
+ const EdgeInsetsDirectional.fromSTEB(24.0, 24.0, 20.0, 24.0),
+ suffixIcon: Icon(
+ Icons.email,
+ color: FlutterFlowTheme.of(context).accent1,
+ size: 22.0,
+ ),
+ ),
+ style: FlutterFlowTheme.of(context).bodyMedium.override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(context).secondaryText,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey('Plus Jakarta Sans'),
+ ),
+ maxLines: null,
+ keyboardType: TextInputType.emailAddress,
+ cursorColor: const Color(0xFF6F61EF),
+ validator: _model.emailAddressTextControllerValidator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
+ child: FFButtonWidget(
+ onPressed: () async {
+ var shouldSetState = false;
+ _model.req = await PhpGroup.forgotPasswordCall.call(
+ email: _model.emailAddressTextController.text,
+ );
+ shouldSetState = true;
+ if (PhpGroup.forgotPasswordCall.error(
+ (_model.req?.jsonBody ?? ''),
+ ) ==
+ false) {
+ Navigator.pop(context);
+ } else {
+ if (shouldSetState) setState(() {});
+ return;
+ }
+
+ if (shouldSetState) setState(() {});
+ },
+ text: FFLocalizations.of(context).getText(
+ '74rnd5bu' /* Enviar */,
+ ),
+ options: FFButtonOptions(
+ width: 270.0,
+ height: 50.0,
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
+ color: const Color(0xFF1AAB5F),
+ textStyle: FlutterFlowTheme.of(context).titleSmall.override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: Colors.white,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey('Plus Jakarta Sans'),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color: Colors.transparent,
+ width: 1.0,
+ ),
+ ),
+ showLoadingIndicator: false,
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/application_components/templates_components/regisiter_vistor_component/regisiter_vistor_component_model.dart b/lib/application_components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart
similarity index 89%
rename from lib/application_components/templates_components/regisiter_vistor_component/regisiter_vistor_component_model.dart
rename to lib/application_components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart
index 3cf3c27f..a779051b 100644
--- a/lib/application_components/templates_components/regisiter_vistor_component/regisiter_vistor_component_model.dart
+++ b/lib/application_components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart
@@ -1,12 +1,12 @@
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/flutter_flow/form_field_controller.dart';
-import 'regisiter_vistor_component_widget.dart'
- show RegisiterVistorComponentWidget;
+import 'regisiter_vistor_template_component_widget.dart'
+ show RegisiterVistorTemplateComponentWidget;
import 'package:flutter/material.dart';
-class RegisiterVistorComponentModel
- extends FlutterFlowModel {
+class RegisiterVistorTemplateComponentModel
+ extends FlutterFlowModel {
/// State fields for stateful widgets in this component.
bool isDataUploading = false;
diff --git a/lib/application_components/templates_components/regisiter_vistor_component/regisiter_vistor_component_widget.dart b/lib/application_components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart
similarity index 98%
rename from lib/application_components/templates_components/regisiter_vistor_component/regisiter_vistor_component_widget.dart
rename to lib/application_components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart
index d8d2d7ea..51e666b1 100644
--- a/lib/application_components/templates_components/regisiter_vistor_component/regisiter_vistor_component_widget.dart
+++ b/lib/application_components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart
@@ -10,20 +10,20 @@ import '/custom_code/actions/index.dart' as actions;
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
-import 'regisiter_vistor_component_model.dart';
-export 'regisiter_vistor_component_model.dart';
+import 'regisiter_vistor_template_component_model.dart';
+export 'regisiter_vistor_template_component_model.dart';
-class RegisiterVistorComponentWidget extends StatefulWidget {
- const RegisiterVistorComponentWidget({super.key});
+class RegisiterVistorTemplateComponentWidget extends StatefulWidget {
+ const RegisiterVistorTemplateComponentWidget({super.key});
@override
- State createState() =>
- _RegisiterVistorComponentWidgetState();
+ State createState() =>
+ _RegisiterVistorTemplateComponentWidgetState();
}
-class _RegisiterVistorComponentWidgetState
- extends State {
- late RegisiterVistorComponentModel _model;
+class _RegisiterVistorTemplateComponentWidgetState
+ extends State {
+ late RegisiterVistorTemplateComponentModel _model;
@override
void setState(VoidCallback callback) {
@@ -34,7 +34,8 @@ class _RegisiterVistorComponentWidgetState
@override
void initState() {
super.initState();
- _model = createModel(context, () => RegisiterVistorComponentModel());
+ _model =
+ createModel(context, () => RegisiterVistorTemplateComponentModel());
_model.textController1 ??= TextEditingController();
_model.textFieldFocusNode1 ??= FocusNode();
diff --git a/lib/application_pages/login_page/login_page_model.dart b/lib/application_components/templates_components/sign_in_template_component/sign_in_template_component_model.dart
similarity index 65%
rename from lib/application_pages/login_page/login_page_model.dart
rename to lib/application_components/templates_components/sign_in_template_component/sign_in_template_component_model.dart
index 92a3fd94..6ef3aefa 100644
--- a/lib/application_pages/login_page/login_page_model.dart
+++ b/lib/application_components/templates_components/sign_in_template_component/sign_in_template_component_model.dart
@@ -1,12 +1,12 @@
-import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_util.dart';
-import 'login_page_widget.dart' show LoginPageWidget;
+import 'sign_in_template_component_widget.dart'
+ show SignInTemplateComponentWidget;
import 'package:flutter/material.dart';
-class LoginPageModel extends FlutterFlowModel {
- /// State fields for stateful widgets in this page.
+class SignInTemplateComponentModel
+ extends FlutterFlowModel {
+ /// State fields for stateful widgets in this component.
- final unfocusNode = FocusNode();
// State field(s) for emailAddress widget.
FocusNode? emailAddressFocusNode;
TextEditingController? emailAddressTextController;
@@ -16,8 +16,6 @@ class LoginPageModel 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) {
@@ -26,7 +24,6 @@ class LoginPageModel extends FlutterFlowModel {
@override
void dispose() {
- unfocusNode.dispose();
emailAddressFocusNode?.dispose();
emailAddressTextController?.dispose();
diff --git a/lib/application_components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart b/lib/application_components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart
new file mode 100644
index 00000000..6f5f0694
--- /dev/null
+++ b/lib/application_components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart
@@ -0,0 +1,900 @@
+import '/application_components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.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 'package:flutter/gestures.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_animate/flutter_animate.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'sign_in_template_component_model.dart';
+export 'sign_in_template_component_model.dart';
+
+class SignInTemplateComponentWidget extends StatefulWidget {
+ const SignInTemplateComponentWidget({
+ super.key,
+ required this.toggleOnBoardingPageAction,
+ });
+
+ final Future Function(String toggleValueSignInParam)?
+ toggleOnBoardingPageAction;
+
+ @override
+ State createState() =>
+ _SignInTemplateComponentWidgetState();
+}
+
+class _SignInTemplateComponentWidgetState
+ extends State with TickerProviderStateMixin {
+ late SignInTemplateComponentModel _model;
+
+ final animationsMap = {};
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model = createModel(context, () => SignInTemplateComponentModel());
+
+ _model.emailAddressTextController ??= TextEditingController();
+ _model.emailAddressFocusNode ??= FocusNode();
+
+ _model.passwordTextController ??= TextEditingController();
+ _model.passwordFocusNode ??= FocusNode();
+
+ animationsMap.addAll({
+ 'containerOnPageLoadAnimation': AnimationInfo(
+ trigger: AnimationTrigger.onPageLoad,
+ effectsBuilder: () => [
+ VisibilityEffect(duration: 1.ms),
+ FadeEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 300.0.ms,
+ begin: 0.0,
+ end: 1.0,
+ ),
+ MoveEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 300.0.ms,
+ begin: const Offset(0.0, 140.0),
+ end: const Offset(0.0, 0.0),
+ ),
+ ScaleEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 300.0.ms,
+ begin: const Offset(0.9, 0.9),
+ end: const Offset(1.0, 1.0),
+ ),
+ TiltEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 300.0.ms,
+ begin: const Offset(-0.349, 0),
+ end: const Offset(0, 0),
+ ),
+ ],
+ ),
+ });
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Row(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Expanded(
+ flex: 6,
+ child: Container(
+ width: 100.0,
+ height: double.infinity,
+ decoration: const BoxDecoration(),
+ alignment: const AlignmentDirectional(0.0, -1.0),
+ child: Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: SingleChildScrollView(
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Padding(
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(0.0, 35.0, 0.0, 35.0),
+ child: Container(
+ width: 548.0,
+ height: 112.0,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(16.0),
+ ),
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsets.all(20.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Align(
+ alignment: const AlignmentDirectional(0.0, 1.0),
+ child: Padding(
+ padding: const EdgeInsets.all(3.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ '9hbdjxrz' /* VAMOS LA! ENTRE COM A SUA CONT... */,
+ ),
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .displaySmall
+ .override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ fontSize: 24.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ Container(
+ width: 291.0,
+ height: 167.0,
+ decoration: const BoxDecoration(),
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(8.0),
+ child: Image.network(
+ 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/sr43ucngg4a4/Vector.png',
+ width: 603.0,
+ height: 155.0,
+ fit: BoxFit.contain,
+ ),
+ ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 34.0, 0.0, 34.0, 0.0),
+ child: Container(
+ width: double.infinity,
+ constraints: const BoxConstraints(
+ maxWidth: 570.0,
+ ),
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context)
+ .primaryBackground,
+ borderRadius: BorderRadius.circular(12.0),
+ shape: BoxShape.rectangle,
+ ),
+ child: Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsets.all(32.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ crossAxisAlignment:
+ CrossAxisAlignment.center,
+ children: [
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 16.0),
+ child: SizedBox(
+ width: double.infinity,
+ child: TextFormField(
+ controller: _model
+ .emailAddressTextController,
+ focusNode:
+ _model.emailAddressFocusNode,
+ autofocus: false,
+ textCapitalization:
+ TextCapitalization.none,
+ textInputAction:
+ TextInputAction.next,
+ obscureText: false,
+ decoration: InputDecoration(
+ labelText:
+ FFLocalizations.of(context)
+ .getText(
+ '1ltg0ylb' /* Email */,
+ ),
+ labelStyle: FlutterFlowTheme.of(
+ context)
+ .labelLarge
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .customColor1,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .success,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .error,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ focusedErrorBorder:
+ OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .error,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ suffixIcon: Icon(
+ Icons.email,
+ color:
+ FlutterFlowTheme.of(context)
+ .accent1,
+ size: 22.0,
+ ),
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyLarge
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ keyboardType:
+ TextInputType.emailAddress,
+ validator: _model
+ .emailAddressTextControllerValidator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 16.0),
+ child: SizedBox(
+ width: double.infinity,
+ child: TextFormField(
+ controller:
+ _model.passwordTextController,
+ focusNode: _model.passwordFocusNode,
+ autofocus: false,
+ textInputAction:
+ TextInputAction.send,
+ obscureText:
+ !_model.passwordVisibility,
+ decoration: InputDecoration(
+ labelText:
+ FFLocalizations.of(context)
+ .getText(
+ '2x19ce8k' /* Senha */,
+ ),
+ labelStyle: FlutterFlowTheme.of(
+ context)
+ .labelLarge
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .customColor1,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: const BorderSide(
+ color: Color(0xFF1AAB5F),
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: const BorderSide(
+ color: Color(0xFFFF5963),
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ focusedErrorBorder:
+ OutlineInputBorder(
+ borderSide: const BorderSide(
+ color: Color(0xFFFF5963),
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ filled: true,
+ fillColor:
+ FlutterFlowTheme.of(context)
+ .primaryBackground,
+ suffixIcon: InkWell(
+ onTap: () => setState(
+ () => _model
+ .passwordVisibility =
+ !_model
+ .passwordVisibility,
+ ),
+ focusNode: FocusNode(
+ skipTraversal: true),
+ child: Icon(
+ _model.passwordVisibility
+ ? Icons
+ .visibility_outlined
+ : Icons
+ .visibility_off_outlined,
+ color: FlutterFlowTheme.of(
+ context)
+ .accent1,
+ size: 24.0,
+ ),
+ ),
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyLarge
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ validator: _model
+ .passwordTextControllerValidator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ Builder(
+ builder: (context) {
+ if (MediaQuery.sizeOf(context).width <
+ kBreakpointSmall
+ ? true
+ : false) {
+ return Column(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Padding(
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0, 0.0, 0.0, 16.0),
+ child: FFButtonWidget(
+ onPressed: ((_model.emailAddressTextController
+ .text ==
+ '') &&
+ (_model.passwordTextController
+ .text ==
+ ''))
+ ? null
+ : () async {
+ await action_blocks
+ .singInActionApp(
+ context,
+ emailAdress: _model
+ .emailAddressTextController
+ .text,
+ password: _model
+ .passwordTextController
+ .text,
+ );
+ setState(() {});
+ },
+ text: FFLocalizations.of(
+ context)
+ .getText(
+ 'k44tm7wo' /* Entrar */,
+ ),
+ options: FFButtonOptions(
+ width: double.infinity,
+ height: 44.0,
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0),
+ color:
+ FlutterFlowTheme.of(
+ context)
+ .primary,
+ textStyle:
+ FlutterFlowTheme.of(
+ context)
+ .titleSmall
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .info,
+ fontSize: 16.0,
+ letterSpacing:
+ 0.0,
+ fontWeight:
+ FontWeight
+ .w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color:
+ Colors.transparent,
+ width: 1.0,
+ ),
+ borderRadius:
+ BorderRadius.circular(
+ 12.0),
+ disabledColor:
+ const Color(0x951AAB5F),
+ ),
+ showLoadingIndicator: false,
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0, 0.0, 0.0, 16.0),
+ child: FFButtonWidget(
+ onPressed: () async {
+ await widget
+ .toggleOnBoardingPageAction
+ ?.call(
+ 'SignUp',
+ );
+ },
+ text: FFLocalizations.of(
+ context)
+ .getText(
+ '14u7ipws' /* Cadastrar */,
+ ),
+ options: FFButtonOptions(
+ width: double.infinity,
+ height: 44.0,
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0),
+ color:
+ FlutterFlowTheme.of(
+ context)
+ .customColor1,
+ textStyle:
+ FlutterFlowTheme.of(
+ context)
+ .titleSmall
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .secondaryText,
+ fontSize: 16.0,
+ letterSpacing:
+ 0.0,
+ fontWeight:
+ FontWeight
+ .w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color:
+ Colors.transparent,
+ width: 1.0,
+ ),
+ borderRadius:
+ BorderRadius.circular(
+ 12.0),
+ ),
+ showLoadingIndicator: false,
+ ),
+ ),
+ ],
+ );
+ } else {
+ return Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment:
+ MainAxisAlignment.spaceEvenly,
+ children: [
+ Expanded(
+ child: Padding(
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(0.0, 0.0,
+ 0.0, 16.0),
+ child: FFButtonWidget(
+ onPressed: () {
+ print(
+ 'signInButtonLoginForm pressed ...');
+ },
+ text: FFLocalizations.of(
+ context)
+ .getText(
+ '1x926nsn' /* Entrar */,
+ ),
+ options: FFButtonOptions(
+ width: double.infinity,
+ height: 44.0,
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0),
+ color:
+ FlutterFlowTheme.of(
+ context)
+ .accent1,
+ textStyle:
+ FlutterFlowTheme.of(
+ context)
+ .titleSmall
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .secondaryText,
+ fontSize:
+ 16.0,
+ letterSpacing:
+ 0.0,
+ fontWeight:
+ FontWeight
+ .w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color: Colors
+ .transparent,
+ width: 1.0,
+ ),
+ borderRadius:
+ BorderRadius
+ .circular(12.0),
+ ),
+ showLoadingIndicator:
+ false,
+ ),
+ ),
+ ),
+ Expanded(
+ child: Padding(
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(0.0, 0.0,
+ 0.0, 16.0),
+ child: FFButtonWidget(
+ onPressed: () async {
+ context.pushNamed(
+ 'RegisterPage');
+ },
+ text: FFLocalizations.of(
+ context)
+ .getText(
+ 'jwvd4ai1' /* Cadastrar */,
+ ),
+ options: FFButtonOptions(
+ width: double.infinity,
+ height: 44.0,
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0),
+ color:
+ FlutterFlowTheme.of(
+ context)
+ .customColor1,
+ textStyle:
+ FlutterFlowTheme.of(
+ context)
+ .titleSmall
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .secondaryText,
+ fontSize:
+ 16.0,
+ letterSpacing:
+ 0.0,
+ fontWeight:
+ FontWeight
+ .w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color: Colors
+ .transparent,
+ width: 1.0,
+ ),
+ borderRadius:
+ BorderRadius
+ .circular(12.0),
+ ),
+ showLoadingIndicator:
+ false,
+ ),
+ ),
+ ),
+ ].divide(const SizedBox(width: 7.0)),
+ );
+ }
+ },
+ ),
+
+ // You will have to add an action on this rich text to go to your login page.
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 12.0, 0.0, 12.0),
+ child: RichText(
+ textScaler:
+ MediaQuery.of(context).textScaler,
+ text: TextSpan(
+ children: [
+ TextSpan(
+ text:
+ FFLocalizations.of(context)
+ .getText(
+ '05dx91ku' /* Você esqueceu a sua senha? */,
+ ),
+ style: TextStyle(
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ ),
+ ),
+ TextSpan(
+ text:
+ FFLocalizations.of(context)
+ .getText(
+ 'p5c6d54y' /* Recupere aqui */,
+ ),
+ style:
+ FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme
+ .of(context)
+ .primary,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight:
+ FontWeight.normal,
+ useGoogleFonts:
+ GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ mouseCursor:
+ SystemMouseCursors.click,
+ recognizer:
+ TapGestureRecognizer()
+ ..onTap = () async {
+ await showModalBottomSheet(
+ isScrollControlled:
+ true,
+ backgroundColor:
+ Colors
+ .transparent,
+ context: context,
+ builder: (context) {
+ return Padding(
+ padding: MediaQuery
+ .viewInsetsOf(
+ context),
+ child:
+ const ForgotPasswordTemplateComponentWidget(),
+ );
+ },
+ ).then((value) =>
+ safeSetState(
+ () {}));
+ },
+ )
+ ],
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ),
+ Text(
+ FFLocalizations.of(context).getText(
+ 'olf967cj' /* Termo de Uso */,
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ color:
+ FlutterFlowTheme.of(context)
+ .primaryText,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ).animateOnPageLoad(
+ animationsMap['containerOnPageLoadAnimation']!),
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ );
+ }
+}
diff --git a/lib/application_components/templates_components/sign_up_template_component/sign_up_template_component_model.dart b/lib/application_components/templates_components/sign_up_template_component/sign_up_template_component_model.dart
new file mode 100644
index 00000000..8c8d3913
--- /dev/null
+++ b/lib/application_components/templates_components/sign_up_template_component/sign_up_template_component_model.dart
@@ -0,0 +1,45 @@
+import '/flutter_flow/flutter_flow_util.dart';
+import 'sign_up_template_component_widget.dart'
+ show SignUpTemplateComponentWidget;
+import 'package:flutter/material.dart';
+
+class SignUpTemplateComponentModel
+ extends FlutterFlowModel {
+ /// State fields for stateful widgets in this component.
+
+ // State field(s) for nameRegisterForm widget.
+ FocusNode? nameRegisterFormFocusNode;
+ TextEditingController? nameRegisterFormTextController;
+ String? Function(BuildContext, String?)?
+ nameRegisterFormTextControllerValidator;
+ // State field(s) for emailRegisterForm widget.
+ FocusNode? emailRegisterFormFocusNode;
+ TextEditingController? emailRegisterFormTextController;
+ String? Function(BuildContext, String?)?
+ emailRegisterFormTextControllerValidator;
+ // State field(s) for passwordRegisterForm widget.
+ FocusNode? passwordRegisterFormFocusNode;
+ TextEditingController? passwordRegisterFormTextController;
+ late bool passwordRegisterFormVisibility;
+ String? Function(BuildContext, String?)?
+ passwordRegisterFormTextControllerValidator;
+ // Stores action output result for [Action Block - signUpActionApp] action in SignUpButtonRegisterForm widget.
+ bool? signUp;
+
+ @override
+ void initState(BuildContext context) {
+ passwordRegisterFormVisibility = false;
+ }
+
+ @override
+ void dispose() {
+ nameRegisterFormFocusNode?.dispose();
+ nameRegisterFormTextController?.dispose();
+
+ emailRegisterFormFocusNode?.dispose();
+ emailRegisterFormTextController?.dispose();
+
+ passwordRegisterFormFocusNode?.dispose();
+ passwordRegisterFormTextController?.dispose();
+ }
+}
diff --git a/lib/application_components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart b/lib/application_components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart
new file mode 100644
index 00000000..b3c7d018
--- /dev/null
+++ b/lib/application_components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart
@@ -0,0 +1,771 @@
+import '/flutter_flow/flutter_flow_animations.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
+import '/actions/actions.dart' as action_blocks;
+import 'package:easy_debounce/easy_debounce.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_animate/flutter_animate.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:provider/provider.dart';
+import 'sign_up_template_component_model.dart';
+export 'sign_up_template_component_model.dart';
+
+class SignUpTemplateComponentWidget extends StatefulWidget {
+ const SignUpTemplateComponentWidget({
+ super.key,
+ required this.toggleOnBoardingPageAction,
+ });
+
+ final Future Function(String toggleValueSignUpParam)?
+ toggleOnBoardingPageAction;
+
+ @override
+ State createState() =>
+ _SignUpTemplateComponentWidgetState();
+}
+
+class _SignUpTemplateComponentWidgetState
+ extends State with TickerProviderStateMixin {
+ late SignUpTemplateComponentModel _model;
+
+ final animationsMap = {};
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model = createModel(context, () => SignUpTemplateComponentModel());
+
+ _model.nameRegisterFormTextController ??= TextEditingController();
+ _model.nameRegisterFormFocusNode ??= FocusNode();
+ _model.nameRegisterFormFocusNode!.addListener(() => setState(() {}));
+ _model.emailRegisterFormTextController ??= TextEditingController();
+ _model.emailRegisterFormFocusNode ??= FocusNode();
+ _model.emailRegisterFormFocusNode!.addListener(() => setState(() {}));
+ _model.passwordRegisterFormTextController ??= TextEditingController();
+ _model.passwordRegisterFormFocusNode ??= FocusNode();
+ _model.passwordRegisterFormFocusNode!.addListener(() => setState(() {}));
+ animationsMap.addAll({
+ 'containerOnPageLoadAnimation': AnimationInfo(
+ trigger: AnimationTrigger.onPageLoad,
+ effectsBuilder: () => [
+ VisibilityEffect(duration: 1.ms),
+ FadeEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 300.0.ms,
+ begin: 0.0,
+ end: 1.0,
+ ),
+ MoveEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 300.0.ms,
+ begin: const Offset(0.0, 140.0),
+ end: const Offset(0.0, 0.0),
+ ),
+ ScaleEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 300.0.ms,
+ begin: const Offset(0.9, 0.9),
+ end: const Offset(1.0, 1.0),
+ ),
+ TiltEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 300.0.ms,
+ begin: const Offset(-0.349, 0),
+ end: const Offset(0, 0),
+ ),
+ ],
+ ),
+ });
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ context.watch();
+
+ return Row(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Expanded(
+ flex: 6,
+ child: Container(
+ width: 100.0,
+ height: double.infinity,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ ),
+ alignment: const AlignmentDirectional(0.0, -1.0),
+ child: Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: SingleChildScrollView(
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Padding(
+ padding: const EdgeInsets.all(4.0),
+ child: Container(
+ width: 669.0,
+ height: 112.0,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(16.0),
+ ),
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsets.all(20.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Expanded(
+ child: Align(
+ alignment: const AlignmentDirectional(0.0, -1.0),
+ child: Padding(
+ padding: const EdgeInsets.all(4.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ '49609olv' /* INSIRA SEU EMAIL E SENHA, VAMO... */,
+ ),
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .displaySmall
+ .override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ fontSize: 24.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ Container(
+ width: 291.0,
+ height: 167.0,
+ decoration: const BoxDecoration(),
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(8.0),
+ child: SvgPicture.network(
+ 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/ug2zlyhca2sh/Frame_5.svg',
+ width: 603.0,
+ height: 155.0,
+ fit: BoxFit.contain,
+ ),
+ ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsets.all(34.0),
+ child: Container(
+ width: double.infinity,
+ constraints: const BoxConstraints(
+ maxWidth: 570.0,
+ ),
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context)
+ .primaryBackground,
+ borderRadius: BorderRadius.circular(12.0),
+ ),
+ child: Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsets.all(32.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ crossAxisAlignment:
+ CrossAxisAlignment.center,
+ children: [
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 16.0),
+ child: SizedBox(
+ width: double.infinity,
+ child: TextFormField(
+ controller: _model
+ .nameRegisterFormTextController,
+ focusNode: _model
+ .nameRegisterFormFocusNode,
+ onChanged: (_) =>
+ EasyDebounce.debounce(
+ '_model.nameRegisterFormTextController',
+ const Duration(milliseconds: 2000),
+ () => setState(() {}),
+ ),
+ autofocus: false,
+ autofillHints: const [AutofillHints.name],
+ obscureText: false,
+ decoration: InputDecoration(
+ labelText:
+ FFLocalizations.of(context)
+ .getText(
+ '3corpwhd' /* Nome */,
+ ),
+ labelStyle: FlutterFlowTheme.of(
+ context)
+ .labelLarge
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .customColor1,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .success,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .error,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ focusedErrorBorder:
+ OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .error,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ filled: true,
+ fillColor:
+ FlutterFlowTheme.of(context)
+ .primaryBackground,
+ suffixIcon: Icon(
+ Icons.person,
+ color:
+ FlutterFlowTheme.of(context)
+ .accent1,
+ size: 22.0,
+ ),
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyLarge
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ keyboardType: TextInputType.name,
+ validator: _model
+ .nameRegisterFormTextControllerValidator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 16.0),
+ child: SizedBox(
+ width: double.infinity,
+ child: TextFormField(
+ controller: _model
+ .emailRegisterFormTextController,
+ focusNode: _model
+ .emailRegisterFormFocusNode,
+ onChanged: (_) =>
+ EasyDebounce.debounce(
+ '_model.emailRegisterFormTextController',
+ const Duration(milliseconds: 2000),
+ () => setState(() {}),
+ ),
+ autofocus: false,
+ autofillHints: const [
+ AutofillHints.email
+ ],
+ obscureText: false,
+ decoration: InputDecoration(
+ labelText:
+ FFLocalizations.of(context)
+ .getText(
+ '80wonb69' /* Email */,
+ ),
+ labelStyle: FlutterFlowTheme.of(
+ context)
+ .labelLarge
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .success,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .error,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ focusedErrorBorder:
+ OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .error,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ filled: true,
+ fillColor:
+ FlutterFlowTheme.of(context)
+ .primaryBackground,
+ suffixIcon: Icon(
+ Icons.email,
+ color:
+ FlutterFlowTheme.of(context)
+ .accent1,
+ size: 22.0,
+ ),
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyLarge
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .customColor1,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ keyboardType:
+ TextInputType.emailAddress,
+ validator: _model
+ .emailRegisterFormTextControllerValidator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 16.0),
+ child: SizedBox(
+ width: double.infinity,
+ child: TextFormField(
+ controller: _model
+ .passwordRegisterFormTextController,
+ focusNode: _model
+ .passwordRegisterFormFocusNode,
+ onChanged: (_) =>
+ EasyDebounce.debounce(
+ '_model.passwordRegisterFormTextController',
+ const Duration(milliseconds: 2000),
+ () => setState(() {}),
+ ),
+ autofocus: false,
+ autofillHints: const [
+ AutofillHints.password
+ ],
+ obscureText: !_model
+ .passwordRegisterFormVisibility,
+ decoration: InputDecoration(
+ labelText:
+ FFLocalizations.of(context)
+ .getText(
+ '0firji8l' /* Senha */,
+ ),
+ labelStyle: FlutterFlowTheme.of(
+ context)
+ .labelLarge
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(
+ context)
+ .customColor1,
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: const BorderSide(
+ color: Color(0xFF1AAB5F),
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: const BorderSide(
+ color: Color(0xFFFF5963),
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ focusedErrorBorder:
+ OutlineInputBorder(
+ borderSide: const BorderSide(
+ color: Color(0xFFFF5963),
+ width: 0.5,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ filled: true,
+ fillColor:
+ FlutterFlowTheme.of(context)
+ .primaryBackground,
+ suffixIcon: InkWell(
+ onTap: () => setState(
+ () => _model
+ .passwordRegisterFormVisibility =
+ !_model
+ .passwordRegisterFormVisibility,
+ ),
+ focusNode: FocusNode(
+ skipTraversal: true),
+ child: Icon(
+ _model.passwordRegisterFormVisibility
+ ? Icons
+ .visibility_outlined
+ : Icons
+ .visibility_off_outlined,
+ color: FlutterFlowTheme.of(
+ context)
+ .accent1,
+ size: 24.0,
+ ),
+ ),
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyLarge
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ validator: _model
+ .passwordRegisterFormTextControllerValidator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 16.0),
+ child: FFButtonWidget(
+ onPressed: () async {
+ var shouldSetState = false;
+ _model.signUp = await action_blocks
+ .signUpActionApp(
+ context,
+ name: _model
+ .nameRegisterFormTextController
+ .text,
+ passwd: _model
+ .passwordRegisterFormTextController
+ .text,
+ email: _model
+ .emailRegisterFormTextController
+ .text,
+ device: FFAppState().device,
+ );
+ shouldSetState = true;
+ if (_model.signUp == true) {
+ await widget
+ .toggleOnBoardingPageAction
+ ?.call(
+ 'SignIn',
+ );
+ } else {
+ if (shouldSetState) {
+ setState(() {});
+ }
+ return;
+ }
+
+ if (shouldSetState) {
+ setState(() {});
+ }
+ },
+ text: FFLocalizations.of(context)
+ .getText(
+ 'rnvdwzei' /* Cadastrar-se */,
+ ),
+ options: FFButtonOptions(
+ width: double.infinity,
+ height: 44.0,
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ color: FlutterFlowTheme.of(context)
+ .accent1,
+ textStyle: FlutterFlowTheme.of(
+ context)
+ .titleSmall
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .secondaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color: Colors.transparent,
+ width: 1.0,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ showLoadingIndicator: false,
+ ),
+ ),
+
+ // You will have to add an action on this rich text to go to your login page.
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 12.0, 0.0, 12.0),
+ child: InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ await widget
+ .toggleOnBoardingPageAction
+ ?.call(
+ 'SignIn',
+ );
+ },
+ child: RichText(
+ textScaler: MediaQuery.of(context)
+ .textScaler,
+ text: TextSpan(
+ children: [
+ TextSpan(
+ text: FFLocalizations.of(
+ context)
+ .getText(
+ 'a9smhn5b' /* Você já tem uma conta? */,
+ ),
+ style: TextStyle(
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ ),
+ ),
+ TextSpan(
+ text: FFLocalizations.of(
+ context)
+ .getText(
+ '09xv5ctc' /* Clique aqui */,
+ ),
+ style: FlutterFlowTheme.of(
+ context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color:
+ FlutterFlowTheme.of(
+ context)
+ .primary,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight:
+ FontWeight.w600,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ )
+ ],
+ style:
+ FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ).animateOnPageLoad(
+ animationsMap['containerOnPageLoadAnimation']!),
+ ),
+ ),
+ ],
+ ),
+ Text(
+ FFLocalizations.of(context).getText(
+ 'huygnka2' /* Termo de Uso */,
+ ),
+ style: FlutterFlowTheme.of(context).bodyMedium.override(
+ fontFamily:
+ FlutterFlowTheme.of(context).bodyMediumFamily,
+ color: FlutterFlowTheme.of(context).secondaryText,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).bodyMediumFamily),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ );
+ }
+}
diff --git a/lib/application_components/templates_components/visit_details_modal/visit_details_modal_model.dart b/lib/application_components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart
similarity index 81%
rename from lib/application_components/templates_components/visit_details_modal/visit_details_modal_model.dart
rename to lib/application_components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart
index af6db9a6..f5e51c3f 100644
--- a/lib/application_components/templates_components/visit_details_modal/visit_details_modal_model.dart
+++ b/lib/application_components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart
@@ -1,10 +1,12 @@
import '/application_components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
import '/application_components/organism_components/view_visit_detail/view_visit_detail_widget.dart';
import '/flutter_flow/flutter_flow_util.dart';
-import 'visit_details_modal_widget.dart' show VisitDetailsModalWidget;
+import 'visit_details_modal_template_component_widget.dart'
+ show VisitDetailsModalTemplateComponentWidget;
import 'package:flutter/material.dart';
-class VisitDetailsModalModel extends FlutterFlowModel {
+class VisitDetailsModalTemplateComponentModel
+ extends FlutterFlowModel {
/// Local state fields for this component.
Color statusColor = const Color(0xff000000);
diff --git a/lib/application_components/templates_components/visit_details_modal/visit_details_modal_widget.dart b/lib/application_components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart
similarity index 82%
rename from lib/application_components/templates_components/visit_details_modal/visit_details_modal_widget.dart
rename to lib/application_components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart
index 1e2dca21..7fca9963 100644
--- a/lib/application_components/templates_components/visit_details_modal/visit_details_modal_widget.dart
+++ b/lib/application_components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart
@@ -2,11 +2,11 @@ import '/application_components/organism_components/schedule_visit_detail/schedu
import '/application_components/organism_components/view_visit_detail/view_visit_detail_widget.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'package:flutter/material.dart';
-import 'visit_details_modal_model.dart';
-export 'visit_details_modal_model.dart';
+import 'visit_details_modal_template_component_model.dart';
+export 'visit_details_modal_template_component_model.dart';
-class VisitDetailsModalWidget extends StatefulWidget {
- const VisitDetailsModalWidget({
+class VisitDetailsModalTemplateComponentWidget extends StatefulWidget {
+ const VisitDetailsModalTemplateComponentWidget({
super.key,
this.visitStatusStr,
this.visitStartDateStr,
@@ -40,12 +40,13 @@ class VisitDetailsModalWidget extends StatefulWidget {
final Future Function()? repeatVisitSchedule;
@override
- State createState() =>
- _VisitDetailsModalWidgetState();
+ State createState() =>
+ _VisitDetailsModalTemplateComponentWidgetState();
}
-class _VisitDetailsModalWidgetState extends State {
- late VisitDetailsModalModel _model;
+class _VisitDetailsModalTemplateComponentWidgetState
+ extends State {
+ late VisitDetailsModalTemplateComponentModel _model;
@override
void setState(VoidCallback callback) {
@@ -56,7 +57,8 @@ class _VisitDetailsModalWidgetState extends State {
@override
void initState() {
super.initState();
- _model = createModel(context, () => VisitDetailsModalModel());
+ _model =
+ createModel(context, () => VisitDetailsModalTemplateComponentModel());
}
@override
@@ -89,12 +91,6 @@ class _VisitDetailsModalWidgetState extends State {
visitorStrList: widget.visitorStrList!,
visitorJsonList: widget.visitorJsonList,
visitIdStr: widget.visitIdStr!,
- updateToggleIdx: () async {
- await widget.updateToggleIdx?.call();
- },
- repeatVisitScheduleActionBlock: () async {
- await widget.repeatVisitSchedule?.call();
- },
),
);
} else {
diff --git a/lib/application_components/templates_components/visitor_search_component/visitor_search_component_model.dart b/lib/application_components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart
similarity index 86%
rename from lib/application_components/templates_components/visitor_search_component/visitor_search_component_model.dart
rename to lib/application_components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart
index 19e2c235..63da16d2 100644
--- a/lib/application_components/templates_components/visitor_search_component/visitor_search_component_model.dart
+++ b/lib/application_components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart
@@ -1,10 +1,11 @@
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_util.dart';
-import 'visitor_search_component_widget.dart' show VisitorSearchComponentWidget;
+import 'visitor_search_modal_template_component_widget.dart'
+ show VisitorSearchModalTemplateComponentWidget;
import 'package:flutter/material.dart';
-class VisitorSearchComponentModel
- extends FlutterFlowModel {
+class VisitorSearchModalTemplateComponentModel
+ extends FlutterFlowModel {
/// Local state fields for this component.
List visitors = [];
diff --git a/lib/application_components/templates_components/visitor_search_component/visitor_search_component_widget.dart b/lib/application_components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart
similarity index 91%
rename from lib/application_components/templates_components/visitor_search_component/visitor_search_component_widget.dart
rename to lib/application_components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart
index 15cd8948..6986bf32 100644
--- a/lib/application_components/templates_components/visitor_search_component/visitor_search_component_widget.dart
+++ b/lib/application_components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart
@@ -1,18 +1,19 @@
import '/application_components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart';
-import '/application_components/templates_components/visitor_details_modal/visitor_details_modal_widget.dart';
+import '/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_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/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';
-import 'visitor_search_component_model.dart';
-export 'visitor_search_component_model.dart';
+import 'visitor_search_modal_template_component_model.dart';
+export 'visitor_search_modal_template_component_model.dart';
-class VisitorSearchComponentWidget extends StatefulWidget {
- const VisitorSearchComponentWidget({
+class VisitorSearchModalTemplateComponentWidget extends StatefulWidget {
+ const VisitorSearchModalTemplateComponentWidget({
super.key,
this.getVisitors,
this.getDocs,
@@ -22,13 +23,14 @@ class VisitorSearchComponentWidget extends StatefulWidget {
final Future Function(List? docsParam)? getDocs;
@override
- State createState() =>
- _VisitorSearchComponentWidgetState();
+ State createState() =>
+ _VisitorSearchModalTemplateComponentWidgetState();
}
-class _VisitorSearchComponentWidgetState
- extends State with TickerProviderStateMixin {
- late VisitorSearchComponentModel _model;
+class _VisitorSearchModalTemplateComponentWidgetState
+ extends State
+ with TickerProviderStateMixin {
+ late VisitorSearchModalTemplateComponentModel _model;
@override
void setState(VoidCallback callback) {
@@ -39,7 +41,8 @@ class _VisitorSearchComponentWidgetState
@override
void initState() {
super.initState();
- _model = createModel(context, () => VisitorSearchComponentModel());
+ _model =
+ createModel(context, () => VisitorSearchModalTemplateComponentModel());
_model.textController ??= TextEditingController();
_model.textFieldFocusNode ??= FocusNode();
@@ -292,7 +295,7 @@ class _VisitorSearchComponentWidgetState
child: const SizedBox(
height: 610.0,
child:
- VisitorDetailsModalWidget(),
+ VisitorDetailsModalTemplateComponentWidget(),
),
);
},
@@ -325,8 +328,19 @@ class _VisitorSearchComponentWidgetState
ClipRRect(
borderRadius:
BorderRadius.circular(40.0),
- child: Image.asset(
- 'assets/images/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
+ 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',
+ ),
width: 60.0,
height: 60.0,
fit: BoxFit.cover,
@@ -501,8 +515,8 @@ class _VisitorSearchComponentWidgetState
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(0.0),
bottomRight: Radius.circular(0.0),
- topLeft: Radius.circular(15.0),
- topRight: Radius.circular(15.0),
+ topLeft: Radius.circular(0.0),
+ topRight: Radius.circular(0.0),
),
),
),
diff --git a/lib/application_components/templates_components/welcome_template_component/welcome_template_component_model.dart b/lib/application_components/templates_components/welcome_template_component/welcome_template_component_model.dart
new file mode 100644
index 00000000..17ea3047
--- /dev/null
+++ b/lib/application_components/templates_components/welcome_template_component/welcome_template_component_model.dart
@@ -0,0 +1,13 @@
+import '/flutter_flow/flutter_flow_util.dart';
+import 'welcome_template_component_widget.dart'
+ show WelcomeTemplateComponentWidget;
+import 'package:flutter/material.dart';
+
+class WelcomeTemplateComponentModel
+ extends FlutterFlowModel {
+ @override
+ void initState(BuildContext context) {}
+
+ @override
+ void dispose() {}
+}
diff --git a/lib/application_components/templates_components/welcome_template_component/welcome_template_component_widget.dart b/lib/application_components/templates_components/welcome_template_component/welcome_template_component_widget.dart
new file mode 100644
index 00000000..46752f7d
--- /dev/null
+++ b/lib/application_components/templates_components/welcome_template_component/welcome_template_component_widget.dart
@@ -0,0 +1,458 @@
+import '/flutter_flow/flutter_flow_animations.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_animate/flutter_animate.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'welcome_template_component_model.dart';
+export 'welcome_template_component_model.dart';
+
+class WelcomeTemplateComponentWidget extends StatefulWidget {
+ const WelcomeTemplateComponentWidget({
+ super.key,
+ required this.toggleOnboardingPageAction,
+ });
+
+ final Future Function(String toggleValueWelcomeParam)?
+ toggleOnboardingPageAction;
+
+ @override
+ State createState() =>
+ _WelcomeTemplateComponentWidgetState();
+}
+
+class _WelcomeTemplateComponentWidgetState
+ extends State
+ with TickerProviderStateMixin {
+ late WelcomeTemplateComponentModel _model;
+
+ final animationsMap = {};
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model = createModel(context, () => WelcomeTemplateComponentModel());
+
+ animationsMap.addAll({
+ 'containerOnPageLoadAnimation': AnimationInfo(
+ trigger: AnimationTrigger.onPageLoad,
+ effectsBuilder: () => [
+ VisibilityEffect(duration: 1.ms),
+ FadeEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 300.0.ms,
+ begin: 0.0,
+ end: 1.0,
+ ),
+ MoveEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 300.0.ms,
+ begin: const Offset(0.0, 140.0),
+ end: const Offset(0.0, 0.0),
+ ),
+ ScaleEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 300.0.ms,
+ begin: const Offset(0.9, 0.9),
+ end: const Offset(1.0, 1.0),
+ ),
+ TiltEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 300.0.ms,
+ begin: const Offset(-0.349, 0),
+ end: const Offset(0, 0),
+ ),
+ ],
+ ),
+ });
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: SingleChildScrollView(
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: SafeArea(
+ child: Container(
+ width: 648.0,
+ height: 208.0,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(16.0),
+ ),
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsets.all(14.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(
+ FFLocalizations.of(context).getText(
+ 'dsc9tuc8' /* UMA EXPERIÊCIA COMPLETA */,
+ ),
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .displaySmall
+ .override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(context).accent1,
+ fontSize: 24.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w600,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey('Plus Jakarta Sans'),
+ ),
+ ),
+ Align(
+ alignment: const AlignmentDirectional(0.0, -1.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ '5bgqn16z' /* COM CONFORTO ONDE VOCÊ ESTIVER... */,
+ ),
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .displaySmall
+ .override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ fontSize: 15.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w600,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey('Plus Jakarta Sans'),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ Container(
+ width: 284.0,
+ height: 200.0,
+ decoration: const BoxDecoration(),
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(0.0),
+ child: SvgPicture.network(
+ 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/lv1waa0etd3j/undraw_appreciate_it_re_yc8h_(1)_1.svg',
+ width: 603.0,
+ height: double.infinity,
+ fit: BoxFit.contain,
+ ),
+ ),
+ ),
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsets.all(34.0),
+ child: Container(
+ width: double.infinity,
+ constraints: const BoxConstraints(
+ maxWidth: 570.0,
+ ),
+ decoration: BoxDecoration(
+ boxShadow: const [
+ BoxShadow(
+ blurRadius: 0.0,
+ color: Colors.transparent,
+ offset: Offset(
+ 0.0,
+ 0.0,
+ ),
+ )
+ ],
+ borderRadius: BorderRadius.circular(12.0),
+ ),
+ child: Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsets.all(32.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Builder(
+ builder: (context) {
+ if (MediaQuery.sizeOf(context).width <
+ kBreakpointSmall
+ ? true
+ : false) {
+ return Column(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 16.0),
+ child: FFButtonWidget(
+ onPressed: () async {
+ await widget
+ .toggleOnboardingPageAction
+ ?.call(
+ 'SignIn',
+ );
+ },
+ text:
+ FFLocalizations.of(context).getText(
+ 'dynet730' /* Entrar */,
+ ),
+ options: FFButtonOptions(
+ width: double.infinity,
+ height: 44.0,
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ color: FlutterFlowTheme.of(context)
+ .primary,
+ textStyle: FlutterFlowTheme.of(
+ context)
+ .titleSmall
+ .override(
+ fontFamily: 'Plus Jakarta Sans',
+ color:
+ FlutterFlowTheme.of(context)
+ .info,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color: Colors.transparent,
+ width: 1.0,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ showLoadingIndicator: false,
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 16.0),
+ child: FFButtonWidget(
+ onPressed: () async {
+ await widget
+ .toggleOnboardingPageAction
+ ?.call(
+ 'SignUp',
+ );
+ },
+ text:
+ FFLocalizations.of(context).getText(
+ 'hha60cg7' /* Cadastrar */,
+ ),
+ options: FFButtonOptions(
+ width: double.infinity,
+ height: 44.0,
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ color: FlutterFlowTheme.of(context)
+ .customColor1,
+ textStyle: FlutterFlowTheme.of(
+ context)
+ .titleSmall
+ .override(
+ fontFamily: 'Plus Jakarta Sans',
+ color:
+ FlutterFlowTheme.of(context)
+ .customColor3,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color: Colors.transparent,
+ width: 1.0,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ showLoadingIndicator: false,
+ ),
+ ),
+ ],
+ );
+ } else {
+ return Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment:
+ MainAxisAlignment.spaceEvenly,
+ children: [
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 16.0),
+ child: FFButtonWidget(
+ onPressed: () async {
+ context.pushNamed(
+ 'LoginPage',
+ queryParameters: {
+ 'device': serializeParam(
+ '',
+ ParamType.String,
+ ),
+ }.withoutNulls,
+ );
+ },
+ text: FFLocalizations.of(context)
+ .getText(
+ 'zvtay8ee' /* Entrar */,
+ ),
+ options: FFButtonOptions(
+ width: double.infinity,
+ height: 44.0,
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ color: FlutterFlowTheme.of(context)
+ .primary,
+ textStyle: FlutterFlowTheme.of(
+ context)
+ .titleSmall
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .secondaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color: Colors.transparent,
+ width: 1.0,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ showLoadingIndicator: false,
+ ),
+ ),
+ ),
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 16.0),
+ child: FFButtonWidget(
+ onPressed: () async {
+ context.pushNamed('RegisterPage');
+ },
+ text: FFLocalizations.of(context)
+ .getText(
+ 'o6zob50a' /* Cadastrar */,
+ ),
+ options: FFButtonOptions(
+ width: double.infinity,
+ height: 44.0,
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ color: FlutterFlowTheme.of(context)
+ .primary,
+ textStyle: FlutterFlowTheme.of(
+ context)
+ .titleSmall
+ .override(
+ fontFamily:
+ 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(
+ context)
+ .secondaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ 'Plus Jakarta Sans'),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color: Colors.transparent,
+ width: 1.0,
+ ),
+ borderRadius:
+ BorderRadius.circular(12.0),
+ ),
+ showLoadingIndicator: false,
+ ),
+ ),
+ ),
+ ].divide(const SizedBox(width: 7.0)),
+ );
+ }
+ },
+ ),
+ ],
+ ),
+ ),
+ ),
+ ).animateOnPageLoad(
+ animationsMap['containerOnPageLoadAnimation']!),
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_model.dart b/lib/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_model.dart
new file mode 100644
index 00000000..d0f79706
--- /dev/null
+++ b/lib/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_model.dart
@@ -0,0 +1,13 @@
+import '/flutter_flow/flutter_flow_util.dart';
+import 'visitor_details_modal_template_component_widget.dart'
+ show VisitorDetailsModalTemplateComponentWidget;
+import 'package:flutter/material.dart';
+
+class VisitorDetailsModalTemplateComponentModel
+ extends FlutterFlowModel {
+ @override
+ void initState(BuildContext context) {}
+
+ @override
+ void dispose() {}
+}
diff --git a/lib/application_components/templates_components/visitor_details_modal/visitor_details_modal_widget.dart b/lib/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart
similarity index 95%
rename from lib/application_components/templates_components/visitor_details_modal/visitor_details_modal_widget.dart
rename to lib/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart
index bb280e11..5f29a6fe 100644
--- a/lib/application_components/templates_components/visitor_details_modal/visitor_details_modal_widget.dart
+++ b/lib/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart
@@ -2,19 +2,20 @@ 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 'visitor_details_modal_model.dart';
-export 'visitor_details_modal_model.dart';
+import 'visitor_details_modal_template_component_model.dart';
+export 'visitor_details_modal_template_component_model.dart';
-class VisitorDetailsModalWidget extends StatefulWidget {
- const VisitorDetailsModalWidget({super.key});
+class VisitorDetailsModalTemplateComponentWidget extends StatefulWidget {
+ const VisitorDetailsModalTemplateComponentWidget({super.key});
@override
- State createState() =>
- _VisitorDetailsModalWidgetState();
+ State createState() =>
+ _VisitorDetailsModalTemplateComponentWidgetState();
}
-class _VisitorDetailsModalWidgetState extends State {
- late VisitorDetailsModalModel _model;
+class _VisitorDetailsModalTemplateComponentWidgetState
+ extends State {
+ late VisitorDetailsModalTemplateComponentModel _model;
@override
void setState(VoidCallback callback) {
@@ -25,7 +26,8 @@ class _VisitorDetailsModalWidgetState extends State {
@override
void initState() {
super.initState();
- _model = createModel(context, () => VisitorDetailsModalModel());
+ _model =
+ createModel(context, () => VisitorDetailsModalTemplateComponentModel());
}
@override
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
new file mode 100644
index 00000000..2b4d9d53
--- /dev/null
+++ b/lib/application_pages/fast_pass_page/fast_pass_page_model.dart
@@ -0,0 +1,17 @@
+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
new file mode 100644
index 00000000..5edf4ae4
--- /dev/null
+++ b/lib/application_pages/fast_pass_page/fast_pass_page_widget.dart
@@ -0,0 +1,44 @@
+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/application_pages/home_page/home_page_model.dart b/lib/application_pages/home_page/home_page_model.dart
index ca2e9e8b..2a5a4f54 100644
--- a/lib/application_pages/home_page/home_page_model.dart
+++ b/lib/application_pages/home_page/home_page_model.dart
@@ -1,6 +1,6 @@
import '/application_components/organism_components/local_profile_component/local_profile_component_widget.dart';
-import '/application_components/templates_components/menu_component/menu_component_widget.dart';
-import '/application_components/templates_components/message_well_component/message_well_component_widget.dart';
+import '/application_components/organism_components/menu_component/menu_component_widget.dart';
+import '/application_components/organism_components/message_well_component/message_well_component_widget.dart';
import '/flutter_flow/flutter_flow_util.dart';
import 'home_page_widget.dart' show HomePageWidget;
import 'package:flutter/material.dart';
diff --git a/lib/application_pages/home_page/home_page_widget.dart b/lib/application_pages/home_page/home_page_widget.dart
index 592e11b6..a12835d8 100644
--- a/lib/application_pages/home_page/home_page_widget.dart
+++ b/lib/application_pages/home_page/home_page_widget.dart
@@ -1,7 +1,7 @@
import '/application_components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
import '/application_components/organism_components/local_profile_component/local_profile_component_widget.dart';
-import '/application_components/templates_components/menu_component/menu_component_widget.dart';
-import '/application_components/templates_components/message_well_component/message_well_component_widget.dart';
+import '/application_components/organism_components/menu_component/menu_component_widget.dart';
+import '/application_components/organism_components/message_well_component/message_well_component_widget.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
@@ -14,14 +14,7 @@ import 'home_page_model.dart';
export 'home_page_model.dart';
class HomePageWidget extends StatefulWidget {
- const HomePageWidget({
- super.key,
- required this.userUUID,
- required this.devUUID,
- });
-
- final String? userUUID;
- final String? devUUID;
+ const HomePageWidget({super.key});
@override
State createState() => _HomePageWidgetState();
@@ -836,7 +829,16 @@ class _HomePageWidgetState extends State {
FFAppState().isLogged = false;
setState(() {});
- context.pushNamed('WelcomePage');
+ context.goNamed(
+ 'onBoardingPage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.scale,
+ alignment: Alignment.bottomCenter,
+ ),
+ },
+ );
},
text: FFLocalizations.of(context).getText(
'xx0db4wi' /* Sair */,
@@ -844,7 +846,7 @@ class _HomePageWidgetState extends State {
options: FFButtonOptions(
height: 40.0,
padding: const EdgeInsetsDirectional.fromSTEB(
- 24.0, 0.0, 24.0, 0.0),
+ 0.0, 0.0, 0.0, 0.0),
iconPadding: const EdgeInsetsDirectional.fromSTEB(
0.0, 0.0, 0.0, 0.0),
color: const Color(0x00D70000),
@@ -898,7 +900,7 @@ class _HomePageWidgetState extends State {
Expanded(
child: Container(
width: 100.0,
- height: 120.0,
+ height: 100.0,
decoration: const BoxDecoration(
color: Color(0xFF1AAB5F),
),
@@ -907,8 +909,9 @@ class _HomePageWidgetState extends State {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
+ alignment: const AlignmentDirectional(0.0, 1.0),
child: Container(
+ height: 50.0,
decoration: const BoxDecoration(),
child: Align(
alignment: const AlignmentDirectional(0.0, 0.0),
@@ -932,7 +935,7 @@ class _HomePageWidgetState extends State {
icon: const Icon(
Icons.menu_rounded,
color: Colors.white,
- size: 34.0,
+ size: 28.0,
),
onPressed: () async {
scaffoldKey.currentState!
@@ -999,10 +1002,30 @@ class _HomePageWidgetState extends State {
),
),
),
- Container(
- width: 100.0,
- height: 100.0,
- decoration: const BoxDecoration(),
+ 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(
+ borderRadius: 20.0,
+ borderWidth: 1.0,
+ buttonSize: 40.0,
+ icon: Icon(
+ Icons.notifications_sharp,
+ color:
+ FlutterFlowTheme.of(context).info,
+ size: 24.0,
+ ),
+ onPressed: () {
+ print('IconButton pressed ...');
+ },
+ ),
+ ),
+ ),
),
],
),
diff --git a/lib/application_pages/on_boarding_page/on_boarding_page_model.dart b/lib/application_pages/on_boarding_page/on_boarding_page_model.dart
new file mode 100644
index 00000000..4ac25c63
--- /dev/null
+++ b/lib/application_pages/on_boarding_page/on_boarding_page_model.dart
@@ -0,0 +1,48 @@
+import '/application_components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart';
+import '/application_components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart';
+import '/application_components/templates_components/welcome_template_component/welcome_template_component_widget.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'on_boarding_page_widget.dart' show OnBoardingPageWidget;
+import 'package:flutter/material.dart';
+
+class OnBoardingPageModel extends FlutterFlowModel {
+ /// Local state fields for this page.
+
+ String toggleIdx = 'welcome';
+
+ /// State fields for stateful widgets in this page.
+
+ final unfocusNode = FocusNode();
+ // Model for signInTemplateComponent component.
+ late SignInTemplateComponentModel signInTemplateComponentModel;
+ // Model for signUpTemplateComponent component.
+ late SignUpTemplateComponentModel signUpTemplateComponentModel;
+ // Model for welcomeTemplateComponent component.
+ late WelcomeTemplateComponentModel welcomeTemplateComponentModel;
+
+ @override
+ void initState(BuildContext context) {
+ signInTemplateComponentModel =
+ createModel(context, () => SignInTemplateComponentModel());
+ signUpTemplateComponentModel =
+ createModel(context, () => SignUpTemplateComponentModel());
+ welcomeTemplateComponentModel =
+ createModel(context, () => WelcomeTemplateComponentModel());
+ }
+
+ @override
+ void dispose() {
+ unfocusNode.dispose();
+ signInTemplateComponentModel.dispose();
+ signUpTemplateComponentModel.dispose();
+ welcomeTemplateComponentModel.dispose();
+ }
+
+ /// Action blocks.
+ Future toggleOnBoardingActionPage(
+ BuildContext context, {
+ required String? toggleValue,
+ }) async {
+ toggleIdx = toggleValue!;
+ }
+}
diff --git a/lib/application_pages/on_boarding_page/on_boarding_page_widget.dart b/lib/application_pages/on_boarding_page/on_boarding_page_widget.dart
new file mode 100644
index 00000000..77148819
--- /dev/null
+++ b/lib/application_pages/on_boarding_page/on_boarding_page_widget.dart
@@ -0,0 +1,131 @@
+import '/application_components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart';
+import '/application_components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart';
+import '/application_components/templates_components/welcome_template_component/welcome_template_component_widget.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/scheduler.dart';
+import 'package:provider/provider.dart';
+import 'on_boarding_page_model.dart';
+export 'on_boarding_page_model.dart';
+
+class OnBoardingPageWidget extends StatefulWidget {
+ const OnBoardingPageWidget({super.key});
+
+ @override
+ State createState() => _OnBoardingPageWidgetState();
+}
+
+class _OnBoardingPageWidgetState extends State {
+ late OnBoardingPageModel _model;
+
+ final scaffoldKey = GlobalKey();
+
+ @override
+ void initState() {
+ super.initState();
+ _model = createModel(context, () => OnBoardingPageModel());
+
+ // On page load action.
+ SchedulerBinding.instance.addPostFrameCallback((_) async {
+ if (FFAppState().isLogged == true) {
+ context.pushNamed(
+ 'homePage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.fade,
+ duration: Duration(milliseconds: 0),
+ ),
+ },
+ );
+ } else {
+ if (isAndroid == true) {
+ FFAppState().device = 'Android';
+ setState(() {});
+ } else if (isiOS == true) {
+ FFAppState().device = 'iOS';
+ setState(() {});
+ } else {
+ FFAppState().device = 'Web';
+ setState(() {});
+ }
+ }
+ });
+ }
+
+ @override
+ void dispose() {
+ _model.dispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ context.watch();
+
+ return GestureDetector(
+ onTap: () => _model.unfocusNode.canRequestFocus
+ ? FocusScope.of(context).requestFocus(_model.unfocusNode)
+ : FocusScope.of(context).unfocus(),
+ child: Scaffold(
+ key: scaffoldKey,
+ backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
+ body: SafeArea(
+ top: true,
+ child: Stack(
+ children: [
+ if (_model.toggleIdx == 'SignIn')
+ wrapWithModel(
+ model: _model.signInTemplateComponentModel,
+ updateCallback: () => setState(() {}),
+ updateOnChange: true,
+ child: SignInTemplateComponentWidget(
+ toggleOnBoardingPageAction: (toggleValueSignInParam) async {
+ await _model.toggleOnBoardingActionPage(
+ context,
+ toggleValue: toggleValueSignInParam,
+ );
+ setState(() {});
+ },
+ ),
+ ),
+ if (_model.toggleIdx == 'SignUp')
+ wrapWithModel(
+ model: _model.signUpTemplateComponentModel,
+ updateCallback: () => setState(() {}),
+ updateOnChange: true,
+ child: SignUpTemplateComponentWidget(
+ toggleOnBoardingPageAction: (toggleValueSignUpParam) async {
+ await _model.toggleOnBoardingActionPage(
+ context,
+ toggleValue: toggleValueSignUpParam,
+ );
+ setState(() {});
+ },
+ ),
+ ),
+ if (_model.toggleIdx == 'welcome')
+ wrapWithModel(
+ model: _model.welcomeTemplateComponentModel,
+ updateCallback: () => setState(() {}),
+ updateOnChange: true,
+ child: WelcomeTemplateComponentWidget(
+ toggleOnboardingPageAction:
+ (toggleValueWelcomeParam) async {
+ await _model.toggleOnBoardingActionPage(
+ context,
+ toggleValue: toggleValueWelcomeParam,
+ );
+ setState(() {});
+ },
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/application_pages/people_on_the_property_page/people_on_the_property_page_model.dart b/lib/application_pages/people_on_the_property_page/people_on_the_property_page_model.dart
new file mode 100644
index 00000000..28f33c72
--- /dev/null
+++ b/lib/application_pages/people_on_the_property_page/people_on_the_property_page_model.dart
@@ -0,0 +1,23 @@
+import '/flutter_flow/flutter_flow_data_table.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'people_on_the_property_page_widget.dart'
+ show PeopleOnThePropertyPageWidget;
+import 'package:flutter/material.dart';
+
+class PeopleOnThePropertyPageModel
+ extends FlutterFlowModel {
+ /// State fields for stateful widgets in this page.
+
+ final unfocusNode = FocusNode();
+ // State field(s) for PaginatedDataTable widget.
+ final paginatedDataTableController =
+ FlutterFlowDataTableController();
+
+ @override
+ void initState(BuildContext context) {}
+
+ @override
+ void dispose() {
+ unfocusNode.dispose();
+ }
+}
diff --git a/lib/application_pages/people_on_the_property_page/people_on_the_property_page_widget.dart b/lib/application_pages/people_on_the_property_page/people_on_the_property_page_widget.dart
new file mode 100644
index 00000000..65489440
--- /dev/null
+++ b/lib/application_pages/people_on_the_property_page/people_on_the_property_page_widget.dart
@@ -0,0 +1,289 @@
+import '/backend/api_requests/api_calls.dart';
+import '/flutter_flow/flutter_flow_data_table.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: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 'people_on_the_property_page_model.dart';
+export 'people_on_the_property_page_model.dart';
+
+class PeopleOnThePropertyPageWidget extends StatefulWidget {
+ const PeopleOnThePropertyPageWidget({super.key});
+
+ @override
+ State createState() =>
+ _PeopleOnThePropertyPageWidgetState();
+}
+
+class _PeopleOnThePropertyPageWidgetState
+ extends State {
+ late PeopleOnThePropertyPageModel _model;
+
+ final scaffoldKey = GlobalKey();
+
+ @override
+ void initState() {
+ super.initState();
+ _model = createModel(context, () => PeopleOnThePropertyPageModel());
+ }
+
+ @override
+ void dispose() {
+ _model.dispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ context.watch();
+
+ 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,
+ 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(
+ 'nsu13r5d' /* Pessoas na Propriedade */,
+ ),
+ 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: FutureBuilder(
+ future: PhpGroup.getPessoasLocalCall.call(
+ cliID: FFAppState().cliUUID,
+ ownID: FFAppState().ownerUUID,
+ devUUID: FFAppState().devUUID,
+ userUUID: FFAppState().userUUID,
+ ),
+ 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 columnGetPessoasLocalResponse = snapshot.data!;
+ return Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Expanded(
+ child: Builder(
+ builder: (context) {
+ final getPessoaLocal = PhpGroup.getPessoasLocalCall
+ .pessoas(
+ columnGetPessoasLocalResponse.jsonBody,
+ )
+ ?.toList() ??
+ [];
+ return FlutterFlowDataTable(
+ controller: _model.paginatedDataTableController,
+ data: getPessoaLocal,
+ columnsBuilder: (onSortChanged) => [
+ DataColumn2(
+ label: DefaultTextStyle.merge(
+ softWrap: true,
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(
+ FFLocalizations.of(context).getText(
+ 'omjuk919' /* Foto */,
+ ),
+ textAlign: TextAlign.center,
+ style: FlutterFlowTheme.of(context)
+ .labelLarge
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .labelLargeFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelLargeFamily),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ DataColumn2(
+ label: DefaultTextStyle.merge(
+ softWrap: true,
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(
+ FFLocalizations.of(context).getText(
+ 'fli7tpz6' /* Nome */,
+ ),
+ style: FlutterFlowTheme.of(context)
+ .labelLarge
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .labelLargeFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelLargeFamily),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ dataRowBuilder: (getPessoaLocalItem,
+ getPessoaLocalIndex,
+ selected,
+ onSelectChanged) =>
+ DataRow(
+ color: MaterialStateProperty.all(
+ getPessoaLocalIndex % 2 == 0
+ ? FlutterFlowTheme.of(context)
+ .primaryBackground
+ : FlutterFlowTheme.of(context)
+ .primaryBackground,
+ ),
+ cells: [
+ Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Padding(
+ padding: const EdgeInsets.all(4.0),
+ child: Container(
+ width: 100.0,
+ height: 100.0,
+ clipBehavior: Clip.antiAlias,
+ decoration: const BoxDecoration(
+ shape: BoxShape.circle,
+ ),
+ 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=&tipo=E&Email=${getJsonField(
+ getPessoaLocalItem,
+ r'''$.USU_EMAIL''',
+ ).toString()}',
+ 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
+ ),
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ ],
+ ),
+ Container(
+ width: 500.0,
+ height: 21.0,
+ decoration: const BoxDecoration(),
+ alignment: const AlignmentDirectional(-1.0, 0.0),
+ child: Text(
+ getJsonField(
+ getPessoaLocalItem,
+ r'''$.USU_NOME''',
+ ).toString(),
+ 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),
+ ),
+ ),
+ ),
+ ].map((c) => DataCell(c)).toList(),
+ ),
+ paginated: true,
+ selectable: false,
+ hidePaginator: false,
+ showFirstLastButtons: false,
+ width: MediaQuery.sizeOf(context).width * 1.0,
+ height: MediaQuery.sizeOf(context).height * 1.0,
+ headingRowHeight: 56.0,
+ dataRowHeight: 48.0,
+ columnSpacing: 20.0,
+ headingRowColor:
+ FlutterFlowTheme.of(context).primaryBackground,
+ borderRadius: BorderRadius.circular(0.0),
+ addHorizontalDivider: true,
+ addTopAndBottomDivider: true,
+ hideDefaultHorizontalDivider: false,
+ horizontalDividerColor:
+ FlutterFlowTheme.of(context).customColor5,
+ horizontalDividerThickness: 0.3,
+ addVerticalDivider: false,
+ );
+ },
+ ),
+ ),
+ ],
+ );
+ },
+ ),
+ ),
+ ),
+ );
+ }
+}
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 bd438bfb..cb72f361 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,14 +14,7 @@ import 'register_visitor_page_model.dart';
export 'register_visitor_page_model.dart';
class RegisterVisitorPageWidget extends StatefulWidget {
- const RegisterVisitorPageWidget({
- super.key,
- required this.userUUID,
- required this.devUUID,
- });
-
- final String? userUUID;
- final String? devUUID;
+ const RegisterVisitorPageWidget({super.key});
@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 e3316b73..e5ef085f 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
@@ -2,15 +2,12 @@ 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);
@@ -26,10 +23,10 @@ class ScheduleCompleteVisitPageModel
/// State fields for stateful widgets in this page.
final unfocusNode = FocusNode();
- // State field(s) for Carousel widget.
- CarouselController? carouselController;
-
- int carouselCurrentIndex = 1;
+ // State field(s) for TabBar widget.
+ TabController? tabBarController;
+ int get tabBarCurrentIndex =>
+ tabBarController != null ? tabBarController!.index : 0;
// State field(s) for TextField widget.
FocusNode? textFieldFocusNode1;
@@ -60,6 +57,7 @@ class ScheduleCompleteVisitPageModel
@override
void dispose() {
unfocusNode.dispose();
+ tabBarController?.dispose();
textFieldFocusNode1?.dispose();
textController1?.dispose();
@@ -69,4 +67,23 @@ 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 52258ac8..a44e56d9 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
@@ -1,8 +1,8 @@
import '/application_components/molecular_components/opt_modal/opt_modal_widget.dart';
import '/application_components/molecular_components/throw_exception/throw_exception_widget.dart';
-import '/application_components/templates_components/visit_details_modal/visit_details_modal_widget.dart';
-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 '/application_components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart';
+import '/application_components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart';
+import '/application_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
import '/backend/api_requests/api_calls.dart';
import '/flutter_flow/flutter_flow_drop_down.dart';
import '/flutter_flow/flutter_flow_icon_button.dart';
@@ -11,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';
@@ -49,7 +49,8 @@ class ScheduleCompleteVisitPageWidget extends StatefulWidget {
}
class _ScheduleCompleteVisitPageWidgetState
- extends State {
+ extends State
+ with TickerProviderStateMixin {
late ScheduleCompleteVisitPageModel _model;
final scaffoldKey = GlobalKey();
@@ -82,16 +83,18 @@ class _ScheduleCompleteVisitPageWidgetState
}
});
- _model.textController1 ??= TextEditingController(
- text: widget.visitStartDateStr != null && widget.visitStartDateStr != ''
- ? widget.visitStartDateStr
- : '');
+ _model.tabBarController = TabController(
+ vsync: this,
+ length: 2,
+ initialIndex: 0,
+ )..addListener(() => setState(() {}));
+ _model.textController1 ??= TextEditingController();
_model.textFieldFocusNode1 ??= FocusNode();
_model.textController2 ??= TextEditingController();
_model.textFieldFocusNode2 ??= FocusNode();
- _model.switchValue = false;
+ _model.switchValue = true;
_model.textController3 ??= TextEditingController();
_model.textFieldFocusNode3 ??= FocusNode();
}
@@ -114,1478 +117,113 @@ class _ScheduleCompleteVisitPageWidgetState
child: Scaffold(
key: scaffoldKey,
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
- body: SingleChildScrollView(
+ 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: 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: 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),
- ),
- ),
- ),
- ),
+ Align(
+ alignment: const Alignment(0.0, 0),
+ child: TabBar(
+ labelColor: FlutterFlowTheme.of(context).primaryText,
+ unselectedLabelColor:
+ FlutterFlowTheme.of(context).primaryText,
+ labelStyle: FlutterFlowTheme.of(context).titleMedium.override(
+ fontFamily:
+ FlutterFlowTheme.of(context).titleMediumFamily,
+ fontSize: 13.0,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).titleMediumFamily),
+ ),
+ unselectedLabelStyle: const TextStyle(),
+ indicatorColor: FlutterFlowTheme.of(context).primary,
+ padding: const EdgeInsets.all(4.0),
+ tabs: [
+ Tab(
+ text: FFLocalizations.of(context).getText(
+ 'ueth1f4g' /* Cadastrar Visita */,
),
),
- 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),
- ),
- ),
- ),
- ),
+ Tab(
+ text: FFLocalizations.of(context).getText(
+ 'k4uraqam' /* Histórico de Visitas */,
),
),
],
+ controller: _model.tabBarController,
+ onTap: (i) async {
+ [() async {}, () async {}][i]();
+ },
),
),
- 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,
+ Expanded(
+ child: TabBarView(
+ controller: _model.tabBarController,
+ children: [
+ SingleChildScrollView(
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Stack(
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'),
- ),
- ),
+ Container(
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context)
+ .primaryBackground,
),
- ),
- ],
- ),
- ),
- 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),
- ),
- ),
- ),
- ),
- 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:
- 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(
- 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,
- ),
- ),
- ),
- );
- },
- 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,
- ),
- ),
- );
- },
- ),
- ],
- ),
- 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)
- .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)
- .primary,
- width: 1.0,
- ),
- 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: Text(
- FFLocalizations.of(context)
- .getText(
- 'i0jhuu3e' /* Clique para adicionar um visit... */,
- ),
- 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),
- ),
- ),
- ),
- ),
- ],
- ),
- 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),
- ),
- ),
- ),
- ),
- Stack(
- children: [
- Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 24.0, 50.0, 24.0, 0.0),
- child: TextFormField(
- controller: _model.textController1,
- focusNode:
- _model.textFieldFocusNode1,
- autofocus: false,
- obscureText: false,
- decoration: InputDecoration(
- labelText:
- FFLocalizations.of(context)
- .getText(
- '9mg9nv2j' /* Ínicio 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(
- 'y5s85khj' /* Quando a visitas se inicia? */,
- ),
- 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_top,
- 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
- .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),
- ),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 30.0, 0.0, 30.0, 0.0),
- child: Row(
+ child: SingleChildScrollView(
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment:
+ MainAxisAlignment.spaceEvenly,
+ children: [
+ Column(
mainAxisSize: MainAxisSize.max,
- mainAxisAlignment:
- MainAxisAlignment.end,
children: [
- Expanded(
+ Align(
+ alignment:
+ const AlignmentDirectional(-1.0, 0.0),
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),
+ 20.0, 30.0, 0.0, 30.0),
child: Text(
FFLocalizations.of(context)
.getText(
- '68j9gw4h' /* Visita única */,
+ 'u0jocx7e' /* Quais visitantes você deseja c... */,
),
textAlign: TextAlign.start,
style:
@@ -1597,6 +235,8 @@ class _ScheduleCompleteVisitPageWidgetState
context)
.bodyMediumFamily,
letterSpacing: 0.0,
+ fontWeight:
+ FontWeight.bold,
useGoogleFonts: GoogleFonts
.asMap()
.containsKey(
@@ -1607,698 +247,426 @@ class _ScheduleCompleteVisitPageWidgetState
),
),
),
- 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,
+ 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 VisitorDetailsModalTemplateComponentWidget(),
+ ),
+ );
+ },
+ ).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,
+ ),
+ 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(
+ visitorListViewItem,
+ 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',
+ ),
+ 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:
+ VisitorSearchModalTemplateComponentWidget(
+ 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,
+ ),
+ 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(
+ 'r8soavtz' /* Clique para adicionar um visit... */,
+ ),
+ 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),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
),
],
),
- ),
- 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:
+ 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(
- '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(
+ '98evnbbe' /* Qual o período de validade da ... */,
+ ),
+ textAlign: TextAlign.start,
+ style:
+ FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
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,
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ fontWeight:
+ FontWeight.bold,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
),
- 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),
- ),
- ),
+ 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(
- getJsonField(
- visitHistoryItem,
- r'''$.VTE_NOME''',
- ).toString(),
- textAlign:
- TextAlign.center,
+ FFLocalizations.of(
+ context)
+ .getText(
+ 'qygj6ra5' /* Inicio da Visita */,
+ ),
style:
FlutterFlowTheme.of(
context)
@@ -2307,10 +675,7 @@ class _ScheduleCompleteVisitPageWidgetState
fontFamily: FlutterFlowTheme.of(
context)
.bodyMediumFamily,
- color: FlutterFlowTheme.of(
- context)
- .info,
- fontSize: 12.0,
+ fontSize: 14.0,
letterSpacing:
0.0,
useGoogleFonts: GoogleFonts
@@ -2322,22 +687,2123 @@ class _ScheduleCompleteVisitPageWidgetState
),
),
),
+ ),
+ 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(
+ '53cbwqh9' /* 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(
+ 'p4ws3t66' /* 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(
+ 'xpgc5e8d' /* 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(
+ '0meymh6u' /* 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(
+ '2f68zi9t' /* 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(
+ '6p3e0bzr' /* 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(
+ 'il4di4ln' /* Nível de Acesso */,
+ ),
+ 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
+ .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(
+ '2wun8p6c' /* 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,
+ );
+ },
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ].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(
+ '8rk26eg1' /* 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(
+ 'lgv0q5ht' /* 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(
+ 'eftcs67c' /* 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,
+ child: TextFormField(
+ controller:
+ _model.textController3,
+ focusNode:
+ _model.textFieldFocusNode3,
+ autofocus: false,
+ textInputAction:
+ TextInputAction.next,
+ obscureText: false,
+ decoration: InputDecoration(
+ isDense: true,
+ labelText: FFLocalizations.of(
+ context)
+ .getText(
+ 't0q2vuup' /* 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(
+ 'w18iztdm' /* 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)
+ .accent4,
+ 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.text_fields,
+ 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:
+ VisitDetailsModalTemplateComponentWidget(
+ 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)),
),
- );
- }
- },
+ ),
+ Container(
+ width: double.infinity,
+ height: 900.0,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ ),
+ child: SingleChildScrollView(
+ 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 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:
+ VisitDetailsModalTemplateComponentWidget(
+ visitStatusStr:
+ getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_STATUS''',
+ ).toString(),
+ visitStartDateStr:
+ getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_DTINICIO''',
+ ).toString(),
+ visitEndDateStr:
+ getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_DTFIM''',
+ ).toString(),
+ visitReasonStr:
+ getJsonField(
+ visitaWrapItem,
+ r'''$.MOT_DESCRICAO''',
+ ).toString(),
+ visitLevelStr:
+ getJsonField(
+ visitaWrapItem,
+ r'''$.NAC_DESCRICAO''',
+ ).toString(),
+ visitTempStr:
+ getJsonField(
+ visitaWrapItem,
+ r'''$.VTE_UNICA''',
+ ).toString(),
+ visitObsStr: getJsonField(
+ visitaWrapItem,
+ 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(
+ visitaWrapItem,
+ 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(
+ visitaWrapItem,
+ r'''$.VTE_DOCUMENTO''',
+ ).toString(),
+ visitIdStr: getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_ID''',
+ ).toString(),
+ visitorJsonList: PhpGroup
+ .getVisitsCall
+ .visitasList(
+ wrapGetVisitsResponse
+ .jsonBody,
+ ),
+ updateToggleIdx:
+ () async {},
+ repeatVisitSchedule:
+ () async {},
+ ),
+ ),
+ );
+ },
+ ).then(
+ (value) => safeSetState(() {}));
+ },
+ child: 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(
+ 'i46frqyi' /* Visitante: */,
+ ),
+ style: FlutterFlowTheme.of(
+ context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ fontSize:
+ 12.5,
+ letterSpacing:
+ 0.0,
+ fontWeight:
+ FontWeight
+ .bold,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context).bodyMediumFamily),
+ ),
+ ),
+ Align(
+ alignment:
+ const AlignmentDirectional(
+ -1.0,
+ -1.0),
+ child: Text(
+ getJsonField(
+ visitaWrapItem,
+ r'''$.VTE_NOME''',
+ ).toString(),
+ style: FlutterFlowTheme.of(
+ context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context).bodyMediumFamily,
+ fontSize:
+ 12.5,
+ 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(
+ '73b1kj59' /* Início em: */,
+ ),
+ style: FlutterFlowTheme.of(
+ context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ fontSize:
+ 12.5,
+ letterSpacing:
+ 0.0,
+ fontWeight:
+ FontWeight
+ .bold,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context).bodyMediumFamily),
+ ),
+ ),
+ Text(
+ getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_DTINICIO''',
+ ).toString(),
+ style: FlutterFlowTheme.of(
+ context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ fontSize:
+ 12.5,
+ 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(
+ 'klzzrfbn' /* Fim em: */,
+ ),
+ style: FlutterFlowTheme.of(
+ context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ fontSize:
+ 12.5,
+ letterSpacing:
+ 0.0,
+ fontWeight:
+ FontWeight
+ .bold,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context).bodyMediumFamily),
+ ),
+ ),
+ Text(
+ getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_DTFIM''',
+ ).toString(),
+ style: FlutterFlowTheme.of(
+ context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ fontSize:
+ 12.5,
+ 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:
+ valueOrDefault<
+ Color>(
+ () {
+ if (functions.jsonToStr(
+ getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_STATUS''',
+ )) ==
+ '\"A\"') {
+ return FlutterFlowTheme.of(context)
+ .success;
+ } else if (functions.jsonToStr(
+ getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_STATUS''',
+ )) ==
+ '\"C\"') {
+ return FlutterFlowTheme.of(context)
+ .error;
+ } else if (functions
+ .jsonToStr(getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_STATUS''',
+ )) ==
+ '\"I\"') {
+ return FlutterFlowTheme.of(context)
+ .warning;
+ } else {
+ return FlutterFlowTheme.of(context)
+ .primary;
+ }
+ }(),
+ FlutterFlowTheme.of(
+ context)
+ .primary,
+ ),
+ borderRadius:
+ BorderRadius
+ .circular(
+ 5.0),
+ ),
+ child: Align(
+ alignment:
+ const AlignmentDirectional(
+ 0.0,
+ 0.0),
+ child: Text(
+ () {
+ if (functions
+ .jsonToStr(getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_STATUS''',
+ )) ==
+ '\"A\"') {
+ return FFLocalizations.of(context)
+ .getVariableText(
+ ptText:
+ 'Ativo',
+ enText:
+ 'Active',
+ );
+ } else if ((functions.jsonToStr(getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_STATUS''',
+ )) ==
+ '\"F\"') ||
+ (functions.jsonToStr(getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_STATUS''',
+ )) ==
+ '\"C\"') ||
+ (functions.jsonToStr(getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_STATUS''',
+ )) ==
+ '\"B\"') ||
+ (functions.jsonToStr(getJsonField(
+ visitaWrapItem,
+ r'''$.VAW_STATUS''',
+ )) ==
+ '\"I\"')) {
+ return FFLocalizations.of(context)
+ .getVariableText(
+ ptText:
+ 'Cancelado',
+ enText:
+ 'Canceled',
+ );
+ } else {
+ return FFLocalizations.of(context)
+ .getVariableText(
+ ptText:
+ 'Pendente',
+ enText:
+ 'Pending',
+ );
+ }
+ }(),
+ 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: 3.0)),
+ ),
+ ),
+ ),
+ ClipRRect(
+ borderRadius:
+ BorderRadius.circular(
+ 0.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(
+ visitaWrapItem,
+ 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',
+ ),
+ 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 90e61b98..f9c25f93 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,6 +3,8 @@ 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';
@@ -189,93 +191,92 @@ class _ScheduleProvisionalVisitPageWidgetState
),
),
),
- 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(),
- ),
- );
- },
- ).then((value) => safeSetState(() {}));
- },
- child: Container(
- width: double.infinity,
- height: 51.0,
- decoration: BoxDecoration(
+ 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)
- .secondaryBackground,
- borderRadius: BorderRadius.circular(24.0),
- border: Border.all(
+ .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),
+ ),
+ borderSide: BorderSide(
color: FlutterFlowTheme.of(context)
.primaryText,
width: 0.3,
),
- ),
- 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,
- ),
- ),
- 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),
- ),
- ),
- ],
+ 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',
+ ),
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ ],
),
].addToEnd(const SizedBox(height: 20.0)),
),
diff --git a/lib/backend/api_requests/api_calls.dart b/lib/backend/api_requests/api_calls.dart
index 33deadb3..2e3593d1 100644
--- a/lib/backend/api_requests/api_calls.dart
+++ b/lib/backend/api_requests/api_calls.dart
@@ -21,6 +21,7 @@ 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();
@@ -29,7 +30,7 @@ class PhpGroup {
PostProvVisitSchedulingCall();
static GetVisitsCall getVisitsCall = GetVisitsCall();
static DeleteVisitCall deleteVisitCall = DeleteVisitCall();
- static DebugCall debugCall = DebugCall();
+ static GetPessoasLocalCall getPessoasLocalCall = GetPessoasLocalCall();
}
class LoginCall {
@@ -341,7 +342,7 @@ class PostScheduleVisitCall {
Future call({
String? devUUID = '',
String? userUUID = '',
- String? cliUUID = '',
+ String? cliID = '',
String? atividade = '',
String? devDesc = '',
String? idVisitante = '',
@@ -364,7 +365,64 @@ class PostScheduleVisitCall {
params: {
'devUUID': devUUID,
'userUUID': userUUID,
- 'cliID': cliUUID,
+ '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,
'atividade': atividade,
'DevDesc': devDesc,
'idVisitante': idVisitante,
@@ -1363,17 +1421,29 @@ class DeleteVisitCall {
));
}
-class DebugCall {
- Future call() async {
+class GetPessoasLocalCall {
+ Future call({
+ String? cliID = '',
+ String? ownID = '',
+ String? devUUID = '',
+ String? userUUID = '',
+ }) async {
final baseUrl = PhpGroup.getBaseUrl();
return ApiManager.instance.makeApiCall(
- callName: 'debug',
- apiUrl: '$baseUrl/jonh.php',
+ callName: 'getPessoasLocal',
+ apiUrl: '$baseUrl/getPessoasLocal.php',
callType: ApiCallType.POST,
- headers: {},
- params: {},
- bodyType: BodyType.JSON,
+ headers: {
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ },
+ params: {
+ 'cliID': cliID,
+ 'ownID': ownID,
+ 'devUUID': devUUID,
+ 'userUUID': userUUID,
+ },
+ bodyType: BodyType.X_WWW_FORM_URL_ENCODED,
returnBody: true,
encodeBodyUtf8: false,
decodeUtf8: false,
@@ -1381,6 +1451,34 @@ class DebugCall {
alwaysAllowBody: false,
);
}
+
+ bool? error(dynamic response) => castToType(getJsonField(
+ response,
+ r'''$.error''',
+ ));
+ List? pessoas(dynamic response) => getJsonField(
+ response,
+ r'''$.pessoas''',
+ true,
+ ) as List?;
+ List? usuEmail(dynamic response) => (getJsonField(
+ response,
+ r'''$.pessoas[:].USU_EMAIL''',
+ true,
+ ) as List?)
+ ?.withoutNulls
+ .map((x) => castToType(x))
+ .withoutNulls
+ .toList();
+ List? usuNome(dynamic response) => (getJsonField(
+ response,
+ r'''$.pessoas[:].USU_NOME''',
+ true,
+ ) as List?)
+ ?.withoutNulls
+ .map((x) => castToType(x))
+ .withoutNulls
+ .toList();
}
/// End PHP Group Code
diff --git a/lib/backend/push_notifications/push_notifications_handler.dart b/lib/backend/push_notifications/push_notifications_handler.dart
index 8aec8b70..5381ff15 100644
--- a/lib/backend/push_notifications/push_notifications_handler.dart
+++ b/lib/backend/push_notifications/push_notifications_handler.dart
@@ -110,20 +110,10 @@ final parametersBuilderMap =
},
),
'ForgotPasswordPage': ParameterData.none(),
- 'homePage': (data) async => ParameterData(
- allParams: {
- 'userUUID': getParameter(data, 'userUUID'),
- 'devUUID': getParameter(data, 'devUUID'),
- },
- ),
+ 'homePage': ParameterData.none(),
'RegisterPage': ParameterData.none(),
'WelcomePage': ParameterData.none(),
- 'registerVisitorPage': (data) async => ParameterData(
- allParams: {
- 'userUUID': getParameter(data, 'userUUID'),
- 'devUUID': getParameter(data, 'devUUID'),
- },
- ),
+ 'registerVisitorPage': ParameterData.none(),
'scheduleCompleteVisitPage': (data) async => ParameterData(
allParams: {
'visitorStrList': getParameter(data, 'visitorStrList'),
@@ -136,6 +126,10 @@ final parametersBuilderMap =
},
),
'scheduleProvisionalVisitPage': ParameterData.none(),
+ 'onBoardingPage': ParameterData.none(),
+ 'fastPassPage': ParameterData.none(),
+ 'test': ParameterData.none(),
+ 'peopleOnThePropertyPage': ParameterData.none(),
};
Map getInitialParameterData(Map data) {
diff --git a/lib/backend/schema/structs/device_struct.dart b/lib/backend/schema/structs/device_struct.dart
new file mode 100644
index 00000000..03db22f3
--- /dev/null
+++ b/lib/backend/schema/structs/device_struct.dart
@@ -0,0 +1,110 @@
+// ignore_for_file: unnecessary_getters_setters
+
+import '/backend/schema/util/schema_util.dart';
+
+import 'index.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+
+class DeviceStruct extends BaseStruct {
+ DeviceStruct({
+ String? devUUID,
+ String? version,
+ String? description,
+ }) : _devUUID = devUUID,
+ _version = version,
+ _description = description;
+
+ // "devUUID" field.
+ String? _devUUID;
+ String get devUUID => _devUUID ?? '';
+ set devUUID(String? val) => _devUUID = val;
+ bool hasDevUUID() => _devUUID != null;
+
+ // "version" field.
+ String? _version;
+ String get version => _version ?? '';
+ set version(String? val) => _version = val;
+ bool hasVersion() => _version != null;
+
+ // "description" field.
+ String? _description;
+ String get description => _description ?? '';
+ set description(String? val) => _description = val;
+ bool hasDescription() => _description != null;
+
+ static DeviceStruct fromMap(Map data) => DeviceStruct(
+ devUUID: data['devUUID'] as String?,
+ version: data['version'] as String?,
+ description: data['description'] as String?,
+ );
+
+ static DeviceStruct? maybeFromMap(dynamic data) =>
+ data is Map ? DeviceStruct.fromMap(data.cast()) : null;
+
+ Map toMap() => {
+ 'devUUID': _devUUID,
+ 'version': _version,
+ 'description': _description,
+ }.withoutNulls;
+
+ @override
+ Map toSerializableMap() => {
+ 'devUUID': serializeParam(
+ _devUUID,
+ ParamType.String,
+ ),
+ 'version': serializeParam(
+ _version,
+ ParamType.String,
+ ),
+ 'description': serializeParam(
+ _description,
+ ParamType.String,
+ ),
+ }.withoutNulls;
+
+ static DeviceStruct fromSerializableMap(Map data) =>
+ DeviceStruct(
+ devUUID: deserializeParam(
+ data['devUUID'],
+ ParamType.String,
+ false,
+ ),
+ version: deserializeParam(
+ data['version'],
+ ParamType.String,
+ false,
+ ),
+ description: deserializeParam(
+ data['description'],
+ ParamType.String,
+ false,
+ ),
+ );
+
+ @override
+ String toString() => 'DeviceStruct(${toMap()})';
+
+ @override
+ bool operator ==(Object other) {
+ return other is DeviceStruct &&
+ devUUID == other.devUUID &&
+ version == other.version &&
+ description == other.description;
+ }
+
+ @override
+ int get hashCode =>
+ const ListEquality().hash([devUUID, version, description]);
+}
+
+DeviceStruct createDeviceStruct({
+ String? devUUID,
+ String? version,
+ String? description,
+}) =>
+ DeviceStruct(
+ devUUID: devUUID,
+ version: version,
+ description: description,
+ );
diff --git a/lib/backend/schema/structs/index.dart b/lib/backend/schema/structs/index.dart
index bc8583f6..0c01c05d 100644
--- a/lib/backend/schema/structs/index.dart
+++ b/lib/backend/schema/structs/index.dart
@@ -1,3 +1,4 @@
export '/backend/schema/util/schema_util.dart';
export 'action_struct.dart';
+export 'device_struct.dart';
diff --git a/lib/custom_code/actions/get_dev_u_u_i_d.dart b/lib/custom_code/actions/get_dev_u_u_i_d.dart
new file mode 100644
index 00000000..6d4843e7
--- /dev/null
+++ b/lib/custom_code/actions/get_dev_u_u_i_d.dart
@@ -0,0 +1,28 @@
+// Automatic FlutterFlow imports
+import '/backend/schema/structs/index.dart';
+import '/backend/schema/enums/enums.dart';
+import '/actions/actions.dart' as action_blocks;
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'index.dart'; // Imports other custom actions
+import '/flutter_flow/custom_functions.dart'; // Imports custom functions
+import 'package:flutter/material.dart';
+// Begin custom action code
+// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
+
+import 'dart:io';
+
+import 'package:device_info_plus/device_info_plus.dart';
+
+Future getDevUUID() async {
+ var deviceInfo = DeviceInfoPlugin();
+ if (Platform.isIOS) {
+ // import 'dart:io'
+ var iosDeviceInfo = await deviceInfo.iosInfo;
+ return iosDeviceInfo.identifierForVendor; // unique ID on iOS
+ } else if (Platform.isAndroid) {
+ var androidDeviceInfo = await deviceInfo.androidInfo;
+ print(AndroidDeviceInfo);
+ return androidDeviceInfo.serialNumber; // unique ID on Android
+ }
+}
diff --git a/lib/custom_code/actions/index.dart b/lib/custom_code/actions/index.dart
index 91a5451a..2110f043 100644
--- a/lib/custom_code/actions/index.dart
+++ b/lib/custom_code/actions/index.dart
@@ -1,2 +1,3 @@
export 'convert_image_file_to_base64.dart' show convertImageFileToBase64;
export 'convert_to_upload_file.dart' show convertToUploadFile;
+export 'get_dev_u_u_i_d.dart' show getDevUUID;
diff --git a/lib/custom_code/widgets/image_cropper.dart b/lib/custom_code/widgets/image_cropper.dart
new file mode 100644
index 00000000..459c718b
--- /dev/null
+++ b/lib/custom_code/widgets/image_cropper.dart
@@ -0,0 +1,179 @@
+// Automatic FlutterFlow imports
+import '/backend/schema/structs/index.dart';
+import '/backend/schema/enums/enums.dart';
+import '/actions/actions.dart' as action_blocks;
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'index.dart'; // Imports other custom widgets
+import '/custom_code/actions/index.dart'; // Imports custom actions
+import '/flutter_flow/custom_functions.dart'; // Imports custom functions
+import 'package:flutter/material.dart';
+// Begin custom widget code
+// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
+
+import 'package:crop_your_image/crop_your_image.dart';
+import 'package:google_fonts/google_fonts.dart';
+import '/backend/firebase_storage/storage.dart';
+
+class ImageCropper extends StatefulWidget {
+ const ImageCropper({
+ super.key,
+ this.width,
+ this.height,
+ this.imageFile,
+ this.callBackAction,
+ this.currentUserId,
+ });
+
+ final double? width;
+ final double? height;
+ final FFUploadedFile? imageFile;
+ final Future Function(String? url)? callBackAction;
+ final String? currentUserId;
+
+ @override
+ State createState() => _ImageCropperState();
+}
+
+class _ImageCropperState extends State {
+ bool loading = false;
+ final _crop_controller = CropController();
+ @override
+ Widget build(BuildContext context) {
+ return Stack(
+ children: [
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Container(
+ width: widget.width ?? double.infinity,
+ height: (widget.height ?? 555) - 80,
+ child: Center(
+ child: Crop(
+ image: Uint8List.fromList(widget.imageFile!.bytes!),
+ controller: _crop_controller,
+ onCropped: (image) async {
+ final path = _getStoragePath(_firebasePathPrefix(),
+ widget.imageFile!.name!, false, 0);
+ uploadData(path, image).then((value) {
+ print('image cropped');
+ widget.callBackAction!.call(value!);
+ loading = false;
+ });
+ // add error handling here
+ },
+
+ aspectRatio: 1 / 1,
+ initialSize: 0.5,
+ // initialArea: Rect.fromLTWH(240, 212, 800, 600),\
+ //initialAreaBuilder: (rect) => Rect.fromLTRB(rect.left + 80, rect.top + 80, rect.right - 80, rect.bottom - 80),
+ withCircleUi: true,
+ baseColor: Color.fromARGB(255, 0, 3, 22),
+ maskColor: Colors.white.withAlpha(100),
+ radius: 20,
+
+ onMoved: (newRect) {
+ // do something with current cropping area.
+ },
+ onStatusChanged: (status) {
+ // do something with current CropStatus
+ },
+ cornerDotBuilder: (size, edgeAlignment) =>
+ const DotControl(color: Colors.white),
+ interactive: true,
+ // fixArea: true,
+ ))),
+ Padding(
+ padding: EdgeInsetsDirectional.fromSTEB(8, 5, 8, 5),
+ child: ElevatedButton(
+ onPressed: () async {
+ if (!loading) {
+ setState(() {
+ loading = true;
+ });
+ print('Button pressed ...');
+ _crop_controller.crop();
+
+ //widget.loading = true;
+ }
+ },
+ style: ButtonStyle(
+ backgroundColor: MaterialStateProperty.all(
+ FlutterFlowTheme.of(context).primaryColor,
+ ),
+ padding: MaterialStateProperty.all(
+ EdgeInsets.zero,
+ ),
+ shape: MaterialStateProperty.all(
+ RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(100),
+ side: BorderSide.none,
+ ),
+ ),
+ ),
+ child: Container(
+ width: 250,
+ height: 50,
+ alignment: Alignment.center,
+ child: loading
+ ? CircularProgressIndicator(
+ valueColor:
+ AlwaysStoppedAnimation(Colors.white),
+ )
+ : Text(
+ 'Crop',
+ style: FlutterFlowTheme.of(context)
+ .subtitle2
+ .override(
+ fontFamily: 'Lexend',
+ color: Colors.white,
+ fontSize: 16,
+ fontWeight: FontWeight.normal,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .subtitle2Family),
+ ),
+ ),
+ ),
+ )),
+ ]),
+ Positioned(
+ top: 4,
+ right: 4,
+ child: IconButton(
+ icon: Icon(Icons.close),
+ onPressed: () => Navigator.pop(context),
+ ))
+ ],
+ );
+ }
+
+ String _getStoragePath(
+ String? pathPrefix,
+ String filePath,
+ bool isVideo, [
+ int? index,
+ ]) {
+ pathPrefix ??= _firebasePathPrefix();
+ pathPrefix = _removeTrailingSlash(pathPrefix);
+ final timestamp = DateTime.now().microsecondsSinceEpoch;
+ final prefix = 'cropped-';
+ // Workaround fixed by https://github.com/flutter/plugins/pull/3685
+ // (not yet in stable).
+ final ext = isVideo ? 'mp4' : filePath.split('.').last;
+ final indexStr = index != null ? '_$index' : '';
+ return '$pathPrefix/$prefix$timestamp$indexStr.$ext';
+ }
+
+ String? _removeTrailingSlash(String? path) =>
+ path != null && path.endsWith('/')
+ ? path.substring(0, path.length - 1)
+ : path;
+
+ String _firebasePathPrefix() => 'users/${widget.currentUserId}/uploads';
+}
+// Set your widget name, define your parameter, and then add the
+// boilerplate code using the green button on the right!
diff --git a/lib/custom_code/widgets/index.dart b/lib/custom_code/widgets/index.dart
new file mode 100644
index 00000000..ec35fd3e
--- /dev/null
+++ b/lib/custom_code/widgets/index.dart
@@ -0,0 +1 @@
+export 'image_cropper.dart' show ImageCropper;
diff --git a/lib/flutter_flow/flutter_flow_button_tabbar.dart b/lib/flutter_flow/flutter_flow_button_tabbar.dart
new file mode 100644
index 00000000..66b374b4
--- /dev/null
+++ b/lib/flutter_flow/flutter_flow_button_tabbar.dart
@@ -0,0 +1,854 @@
+import 'dart:math' as math;
+import 'dart:ui' show lerpDouble;
+
+import 'package:flutter/foundation.dart';
+import 'package:flutter/gestures.dart' show DragStartBehavior;
+import 'package:flutter/material.dart';
+import 'package:flutter/rendering.dart';
+
+const double _kTabHeight = 46.0;
+
+typedef _LayoutCallback = void Function(
+ List xOffsets, TextDirection textDirection, double width);
+
+class _TabLabelBarRenderer extends RenderFlex {
+ _TabLabelBarRenderer({
+ required super.direction,
+ required super.mainAxisSize,
+ required super.mainAxisAlignment,
+ required super.crossAxisAlignment,
+ required TextDirection super.textDirection,
+ required super.verticalDirection,
+ required this.onPerformLayout,
+ });
+
+ _LayoutCallback onPerformLayout;
+
+ @override
+ void performLayout() {
+ super.performLayout();
+ // xOffsets will contain childCount+1 values, giving the offsets of the
+ // leading edge of the first tab as the first value, of the leading edge of
+ // the each subsequent tab as each subsequent value, and of the trailing
+ // edge of the last tab as the last value.
+ RenderBox? child = firstChild;
+ final List xOffsets = [];
+ while (child != null) {
+ final FlexParentData childParentData =
+ child.parentData! as FlexParentData;
+ xOffsets.add(childParentData.offset.dx);
+ assert(child.parentData == childParentData);
+ child = childParentData.nextSibling;
+ }
+ assert(textDirection != null);
+ switch (textDirection!) {
+ case TextDirection.rtl:
+ xOffsets.insert(0, size.width);
+ break;
+ case TextDirection.ltr:
+ xOffsets.add(size.width);
+ break;
+ }
+ onPerformLayout(xOffsets, textDirection!, size.width);
+ }
+}
+
+// This class and its renderer class only exist to report the widths of the tabs
+// upon layout. The tab widths are only used at paint time (see _IndicatorPainter)
+// or in response to input.
+class _TabLabelBar extends Flex {
+ const _TabLabelBar({
+ required super.children,
+ required this.onPerformLayout,
+ }) : super(
+ direction: Axis.horizontal,
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.start,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ verticalDirection: VerticalDirection.down,
+ );
+
+ final _LayoutCallback onPerformLayout;
+
+ @override
+ RenderFlex createRenderObject(BuildContext context) {
+ return _TabLabelBarRenderer(
+ direction: direction,
+ mainAxisAlignment: mainAxisAlignment,
+ mainAxisSize: mainAxisSize,
+ crossAxisAlignment: crossAxisAlignment,
+ textDirection: getEffectiveTextDirection(context)!,
+ verticalDirection: verticalDirection,
+ onPerformLayout: onPerformLayout,
+ );
+ }
+
+ @override
+ void updateRenderObject(
+ BuildContext context, _TabLabelBarRenderer renderObject) {
+ super.updateRenderObject(context, renderObject);
+ renderObject.onPerformLayout = onPerformLayout;
+ }
+}
+
+class _IndicatorPainter extends CustomPainter {
+ _IndicatorPainter({
+ required this.controller,
+ required this.tabKeys,
+ required _IndicatorPainter? old,
+ }) : super(repaint: controller.animation) {
+ if (old != null) {
+ saveTabOffsets(old._currentTabOffsets, old._currentTextDirection);
+ }
+ }
+
+ final TabController controller;
+
+ final List tabKeys;
+
+ // _currentTabOffsets and _currentTextDirection are set each time TabBar
+ // layout is completed. These values can be null when TabBar contains no
+ // tabs, since there are nothing to lay out.
+ List? _currentTabOffsets;
+ TextDirection? _currentTextDirection;
+
+ BoxPainter? _painter;
+ bool _needsPaint = false;
+ void markNeedsPaint() {
+ _needsPaint = true;
+ }
+
+ void dispose() {
+ _painter?.dispose();
+ }
+
+ void saveTabOffsets(List? tabOffsets, TextDirection? textDirection) {
+ _currentTabOffsets = tabOffsets;
+ _currentTextDirection = textDirection;
+ }
+
+ // _currentTabOffsets[index] is the offset of the start edge of the tab at index, and
+ // _currentTabOffsets[_currentTabOffsets.length] is the end edge of the last tab.
+ int get maxTabIndex => _currentTabOffsets!.length - 2;
+
+ double centerOf(int tabIndex) {
+ assert(_currentTabOffsets != null);
+ assert(_currentTabOffsets!.isNotEmpty);
+ assert(tabIndex >= 0);
+ assert(tabIndex <= maxTabIndex);
+ return (_currentTabOffsets![tabIndex] + _currentTabOffsets![tabIndex + 1]) /
+ 2.0;
+ }
+
+ @override
+ void paint(Canvas canvas, Size size) {
+ _needsPaint = false;
+ }
+
+ @override
+ bool shouldRepaint(_IndicatorPainter old) {
+ return _needsPaint ||
+ controller != old.controller ||
+ tabKeys.length != old.tabKeys.length ||
+ (!listEquals(_currentTabOffsets, old._currentTabOffsets)) ||
+ _currentTextDirection != old._currentTextDirection;
+ }
+}
+
+// This class, and TabBarScrollController, only exist to handle the case
+// where a scrollable TabBar has a non-zero initialIndex. In that case we can
+// only compute the scroll position's initial scroll offset (the "correct"
+// pixels value) after the TabBar viewport width and scroll limits are known.
+
+class _TabBarScrollPosition extends ScrollPositionWithSingleContext {
+ _TabBarScrollPosition({
+ required super.physics,
+ required super.context,
+ required super.oldPosition,
+ required this.tabBar,
+ }) : super(
+ initialPixels: null,
+ );
+
+ final _FlutterFlowButtonTabBarState tabBar;
+
+ bool _viewportDimensionWasNonZero = false;
+
+ // Position should be adjusted at least once.
+ bool _needsPixelsCorrection = true;
+
+ @override
+ bool applyContentDimensions(double minScrollExtent, double maxScrollExtent) {
+ bool result = true;
+ if (!_viewportDimensionWasNonZero) {
+ _viewportDimensionWasNonZero = viewportDimension != 0.0;
+ }
+ // If the viewport never had a non-zero dimension, we just want to jump
+ // to the initial scroll position to avoid strange scrolling effects in
+ // release mode: In release mode, the viewport temporarily may have a
+ // dimension of zero before the actual dimension is calculated. In that
+ // scenario, setting the actual dimension would cause a strange scroll
+ // effect without this guard because the super call below would starts a
+ // ballistic scroll activity.
+ if (!_viewportDimensionWasNonZero || _needsPixelsCorrection) {
+ _needsPixelsCorrection = false;
+ correctPixels(tabBar._initialScrollOffset(
+ viewportDimension, minScrollExtent, maxScrollExtent));
+ result = false;
+ }
+ return super.applyContentDimensions(minScrollExtent, maxScrollExtent) &&
+ result;
+ }
+
+ void markNeedsPixelsCorrection() {
+ _needsPixelsCorrection = true;
+ }
+}
+
+// This class, and TabBarScrollPosition, only exist to handle the case
+// where a scrollable TabBar has a non-zero initialIndex.
+class _TabBarScrollController extends ScrollController {
+ _TabBarScrollController(this.tabBar);
+
+ final _FlutterFlowButtonTabBarState tabBar;
+
+ @override
+ ScrollPosition createScrollPosition(ScrollPhysics physics,
+ ScrollContext context, ScrollPosition? oldPosition) {
+ return _TabBarScrollPosition(
+ physics: physics,
+ context: context,
+ oldPosition: oldPosition,
+ tabBar: tabBar,
+ );
+ }
+}
+
+/// A Flutterflow Design widget that displays a horizontal row of tabs.
+class FlutterFlowButtonTabBar extends StatefulWidget
+ implements PreferredSizeWidget {
+ /// The [tabs] argument must not be null and its length must match the [controller]'s
+ /// [TabController.length].
+ ///
+ /// If a [TabController] is not provided, then there must be a
+ /// [DefaultTabController] ancestor.
+ ///
+ const FlutterFlowButtonTabBar({
+ super.key,
+ required this.tabs,
+ this.controller,
+ this.isScrollable = false,
+ this.useToggleButtonStyle = false,
+ this.dragStartBehavior = DragStartBehavior.start,
+ this.onTap,
+ this.backgroundColor,
+ this.unselectedBackgroundColor,
+ this.decoration,
+ this.unselectedDecoration,
+ this.labelStyle,
+ this.unselectedLabelStyle,
+ this.labelColor,
+ this.unselectedLabelColor,
+ this.borderWidth = 0,
+ this.borderColor = Colors.transparent,
+ this.unselectedBorderColor = Colors.transparent,
+ this.physics = const BouncingScrollPhysics(),
+ this.labelPadding = const EdgeInsets.symmetric(horizontal: 4),
+ this.buttonMargin = const EdgeInsets.all(4),
+ this.padding = EdgeInsets.zero,
+ this.borderRadius = 8.0,
+ this.elevation = 0,
+ });
+
+ /// Typically a list of two or more [Tab] widgets.
+ ///
+ /// The length of this list must match the [controller]'s [TabController.length]
+ /// and the length of the [TabBarView.children] list.
+ final List tabs;
+
+ /// This widget's selection and animation state.
+ ///
+ /// If [TabController] is not provided, then the value of [DefaultTabController.of]
+ /// will be used.
+ final TabController? controller;
+
+ /// Whether this tab bar can be scrolled horizontally.
+ ///
+ /// If [isScrollable] is true, then each tab is as wide as needed for its label
+ /// and the entire [FlutterFlowButtonTabBar] is scrollable. Otherwise each tab gets an equal
+ /// share of the available space.
+ final bool isScrollable;
+
+ /// Whether the tab buttons should be styled as toggle buttons.
+ final bool useToggleButtonStyle;
+
+ /// The background [Color] of the button on its selected state.
+ final Color? backgroundColor;
+
+ /// The background [Color] of the button on its unselected state.
+ final Color? unselectedBackgroundColor;
+
+ /// The [BoxDecoration] of the button on its selected state.
+ ///
+ /// If [BoxDecoration] is not provided, [backgroundColor] is used.
+ final BoxDecoration? decoration;
+
+ /// The [BoxDecoration] of the button on its unselected state.
+ ///
+ /// If [BoxDecoration] is not provided, [unselectedBackgroundColor] is used.
+ final BoxDecoration? unselectedDecoration;
+
+ /// The [TextStyle] of the button's [Text] on its selected state. The color provided
+ /// on the TextStyle will be used for the [Icon]'s color.
+ final TextStyle? labelStyle;
+
+ /// The color of selected tab labels.
+ final Color? labelColor;
+
+ /// The color of unselected tab labels.
+ final Color? unselectedLabelColor;
+
+ /// The [TextStyle] of the button's [Text] on its unselected state. The color provided
+ /// on the TextStyle will be used for the [Icon]'s color.
+ final TextStyle? unselectedLabelStyle;
+
+ /// The with of solid [Border] for each button. If no value is provided, the border
+ /// is not drawn.
+ final double borderWidth;
+
+ /// The [Color] of solid [Border] for each button.
+ final Color? borderColor;
+
+ /// The [Color] of solid [Border] for each button. If no value is provided, the value of
+ /// [this.borderColor] is used.
+ final Color? unselectedBorderColor;
+
+ /// The [EdgeInsets] used for the [Padding] of the buttons' content.
+ ///
+ /// The default value is [EdgeInsets.symmetric(horizontal: 4)].
+ final EdgeInsetsGeometry labelPadding;
+
+ /// The [EdgeInsets] used for the [Margin] of the buttons.
+ ///
+ /// The default value is [EdgeInsets.all(4)].
+ final EdgeInsetsGeometry buttonMargin;
+
+ /// The amount of space by which to inset the tab bar.
+ final EdgeInsetsGeometry? padding;
+
+ /// The value of the [BorderRadius.circular] applied to each button.
+ final double borderRadius;
+
+ /// The value of the [elevation] applied to each button.
+ final double elevation;
+
+ final DragStartBehavior dragStartBehavior;
+
+ final ValueChanged? onTap;
+
+ final ScrollPhysics? physics;
+
+ /// A size whose height depends on if the tabs have both icons and text.
+ ///
+ /// [AppBar] uses this size to compute its own preferred size.
+ @override
+ Size get preferredSize {
+ double maxHeight = _kTabHeight;
+ for (final Widget item in tabs) {
+ if (item is PreferredSizeWidget) {
+ final double itemHeight = item.preferredSize.height;
+ maxHeight = math.max(itemHeight, maxHeight);
+ }
+ }
+ return Size.fromHeight(
+ maxHeight + labelPadding.vertical + buttonMargin.vertical);
+ }
+
+ @override
+ State createState() =>
+ _FlutterFlowButtonTabBarState();
+}
+
+class _FlutterFlowButtonTabBarState extends State
+ with TickerProviderStateMixin {
+ ScrollController? _scrollController;
+ TabController? _controller;
+ _IndicatorPainter? _indicatorPainter;
+ late AnimationController _animationController;
+ int _currentIndex = 0;
+ int _prevIndex = -1;
+
+ late double _tabStripWidth;
+ late List _tabKeys;
+
+ final GlobalKey _tabsParentKey = GlobalKey();
+
+ bool _debugHasScheduledValidTabsCountCheck = false;
+
+ @override
+ void initState() {
+ super.initState();
+ // If indicatorSize is TabIndicatorSize.label, _tabKeys[i] is used to find
+ // the width of tab widget i. See _IndicatorPainter.indicatorRect().
+ _tabKeys = widget.tabs.map((tab) => GlobalKey()).toList();
+
+ /// The animation duration is 2/3 of the tab scroll animation duration in
+ /// Material design (kTabScrollDuration).
+ _animationController = AnimationController(
+ vsync: this, duration: const Duration(milliseconds: 200));
+
+ // so the buttons start in their "final" state (color)
+ _animationController
+ ..value = 1.0
+ ..addListener(() {
+ if (mounted) {
+ setState(() {});
+ }
+ });
+ }
+
+ // If the TabBar is rebuilt with a new tab controller, the caller should
+ // dispose the old one. In that case the old controller's animation will be
+ // null and should not be accessed.
+ bool get _controllerIsValid => _controller?.animation != null;
+
+ void _updateTabController() {
+ final TabController? newController =
+ widget.controller ?? DefaultTabController.maybeOf(context);
+ assert(() {
+ if (newController == null) {
+ throw FlutterError(
+ 'No TabController for ${widget.runtimeType}.\n'
+ 'When creating a ${widget.runtimeType}, you must either provide an explicit '
+ 'TabController using the "controller" property, or you must ensure that there '
+ 'is a DefaultTabController above the ${widget.runtimeType}.\n'
+ 'In this case, there was neither an explicit controller nor a default controller.',
+ );
+ }
+ return true;
+ }());
+
+ if (newController == _controller) {
+ return;
+ }
+
+ if (_controllerIsValid) {
+ _controller!.animation!.removeListener(_handleTabControllerAnimationTick);
+ _controller!.removeListener(_handleTabControllerTick);
+ }
+ _controller = newController;
+ if (_controller != null) {
+ _controller!.animation!.addListener(_handleTabControllerAnimationTick);
+ _controller!.addListener(_handleTabControllerTick);
+ _currentIndex = _controller!.index;
+ }
+ }
+
+ void _initIndicatorPainter() {
+ _indicatorPainter = !_controllerIsValid
+ ? null
+ : _IndicatorPainter(
+ controller: _controller!,
+ tabKeys: _tabKeys,
+ old: _indicatorPainter,
+ );
+ }
+
+ @override
+ void didChangeDependencies() {
+ super.didChangeDependencies();
+ assert(debugCheckHasMaterial(context));
+ _updateTabController();
+ _initIndicatorPainter();
+ }
+
+ @override
+ void didUpdateWidget(FlutterFlowButtonTabBar oldWidget) {
+ super.didUpdateWidget(oldWidget);
+ if (widget.controller != oldWidget.controller) {
+ _updateTabController();
+ _initIndicatorPainter();
+ // Adjust scroll position.
+ if (_scrollController != null) {
+ final ScrollPosition position = _scrollController!.position;
+ if (position is _TabBarScrollPosition) {
+ position.markNeedsPixelsCorrection();
+ }
+ }
+ }
+
+ if (widget.tabs.length > _tabKeys.length) {
+ final int delta = widget.tabs.length - _tabKeys.length;
+ _tabKeys.addAll(List.generate(delta, (int n) => GlobalKey()));
+ } else if (widget.tabs.length < _tabKeys.length) {
+ _tabKeys.removeRange(widget.tabs.length, _tabKeys.length);
+ }
+ }
+
+ @override
+ void dispose() {
+ _indicatorPainter!.dispose();
+ if (_controllerIsValid) {
+ _controller!.animation!.removeListener(_handleTabControllerAnimationTick);
+ _controller!.removeListener(_handleTabControllerTick);
+ }
+ _controller = null;
+ // We don't own the _controller Animation, so it's not disposed here.
+ super.dispose();
+ }
+
+ int get maxTabIndex => _indicatorPainter!.maxTabIndex;
+
+ double _tabScrollOffset(
+ int index, double viewportWidth, double minExtent, double maxExtent) {
+ if (!widget.isScrollable) {
+ return 0.0;
+ }
+ double tabCenter = _indicatorPainter!.centerOf(index);
+ double paddingStart;
+ switch (Directionality.of(context)) {
+ case TextDirection.rtl:
+ paddingStart = widget.padding?.resolve(TextDirection.rtl).right ?? 0;
+ tabCenter = _tabStripWidth - tabCenter;
+ break;
+ case TextDirection.ltr:
+ paddingStart = widget.padding?.resolve(TextDirection.ltr).left ?? 0;
+ break;
+ }
+
+ return clampDouble(
+ tabCenter + paddingStart - viewportWidth / 2.0, minExtent, maxExtent);
+ }
+
+ double _tabCenteredScrollOffset(int index) {
+ final ScrollPosition position = _scrollController!.position;
+ return _tabScrollOffset(index, position.viewportDimension,
+ position.minScrollExtent, position.maxScrollExtent);
+ }
+
+ double _initialScrollOffset(
+ double viewportWidth, double minExtent, double maxExtent) {
+ return _tabScrollOffset(_currentIndex, viewportWidth, minExtent, maxExtent);
+ }
+
+ void _scrollToCurrentIndex() {
+ final double offset = _tabCenteredScrollOffset(_currentIndex);
+ _scrollController!
+ .animateTo(offset, duration: kTabScrollDuration, curve: Curves.ease);
+ }
+
+ void _scrollToControllerValue() {
+ final double? leadingPosition =
+ _currentIndex > 0 ? _tabCenteredScrollOffset(_currentIndex - 1) : null;
+ final double middlePosition = _tabCenteredScrollOffset(_currentIndex);
+ final double? trailingPosition = _currentIndex < maxTabIndex
+ ? _tabCenteredScrollOffset(_currentIndex + 1)
+ : null;
+
+ final double index = _controller!.index.toDouble();
+ final double value = _controller!.animation!.value;
+ final double offset;
+ if (value == index - 1.0) {
+ offset = leadingPosition ?? middlePosition;
+ } else if (value == index + 1.0) {
+ offset = trailingPosition ?? middlePosition;
+ } else if (value == index) {
+ offset = middlePosition;
+ } else if (value < index) {
+ offset = leadingPosition == null
+ ? middlePosition
+ : lerpDouble(middlePosition, leadingPosition, index - value)!;
+ } else {
+ offset = trailingPosition == null
+ ? middlePosition
+ : lerpDouble(middlePosition, trailingPosition, value - index)!;
+ }
+
+ _scrollController!.jumpTo(offset);
+ }
+
+ void _handleTabControllerAnimationTick() {
+ assert(mounted);
+ if (!_controller!.indexIsChanging && widget.isScrollable) {
+ // Sync the TabBar's scroll position with the TabBarView's PageView.
+ _currentIndex = _controller!.index;
+ _scrollToControllerValue();
+ }
+ }
+
+ void _handleTabControllerTick() {
+ if (_controller!.index != _currentIndex) {
+ _prevIndex = _currentIndex;
+ _currentIndex = _controller!.index;
+ _triggerAnimation();
+ if (widget.isScrollable) {
+ _scrollToCurrentIndex();
+ }
+ }
+ setState(() {
+ // Rebuild the tabs after a (potentially animated) index change
+ // has completed.
+ });
+ }
+
+ void _triggerAnimation() {
+ // reset the animation so it's ready to go
+ _animationController
+ ..reset()
+ ..forward();
+ }
+
+ // Called each time layout completes.
+ void _saveTabOffsets(
+ List tabOffsets, TextDirection textDirection, double width) {
+ _tabStripWidth = width;
+ _indicatorPainter?.saveTabOffsets(tabOffsets, textDirection);
+ }
+
+ void _handleTap(int index) {
+ assert(index >= 0 && index < widget.tabs.length);
+ _controller?.animateTo(index);
+ widget.onTap?.call(index);
+ }
+
+ Widget _buildStyledTab(Widget child, int index) {
+ final TabBarTheme tabBarTheme = TabBarTheme.of(context);
+
+ final double animationValue;
+ if (index == _currentIndex) {
+ animationValue = _animationController.value;
+ } else if (index == _prevIndex) {
+ animationValue = 1 - _animationController.value;
+ } else {
+ animationValue = 0;
+ }
+
+ final TextStyle? textStyle = TextStyle.lerp(
+ (widget.unselectedLabelStyle ??
+ tabBarTheme.labelStyle ??
+ DefaultTextStyle.of(context).style)
+ .copyWith(
+ color: widget.unselectedLabelColor,
+ ),
+ (widget.labelStyle ??
+ tabBarTheme.labelStyle ??
+ DefaultTextStyle.of(context).style)
+ .copyWith(
+ color: widget.labelColor,
+ ),
+ animationValue);
+
+ final Color? textColor = Color.lerp(
+ widget.unselectedLabelColor, widget.labelColor, animationValue);
+
+ final Color? borderColor = Color.lerp(
+ widget.unselectedBorderColor, widget.borderColor, animationValue);
+
+ BoxDecoration? boxDecoration = BoxDecoration.lerp(
+ BoxDecoration(
+ color: widget.unselectedDecoration?.color ??
+ widget.unselectedBackgroundColor ??
+ Colors.transparent,
+ boxShadow: widget.unselectedDecoration?.boxShadow,
+ gradient: widget.unselectedDecoration?.gradient,
+ borderRadius: widget.useToggleButtonStyle
+ ? null
+ : BorderRadius.circular(widget.borderRadius),
+ ),
+ BoxDecoration(
+ color: widget.decoration?.color ??
+ widget.backgroundColor ??
+ Colors.transparent,
+ boxShadow: widget.decoration?.boxShadow,
+ gradient: widget.decoration?.gradient,
+ borderRadius: widget.useToggleButtonStyle
+ ? null
+ : BorderRadius.circular(widget.borderRadius),
+ ),
+ animationValue);
+
+ if (widget.useToggleButtonStyle &&
+ widget.borderWidth > 0 &&
+ boxDecoration != null) {
+ if (index == 0) {
+ boxDecoration = boxDecoration.copyWith(
+ border: Border(
+ right: BorderSide(
+ color: widget.unselectedBorderColor ?? Colors.transparent,
+ width: widget.borderWidth / 2,
+ ),
+ ),
+ );
+ } else if (index == widget.tabs.length - 1) {
+ boxDecoration = boxDecoration.copyWith(
+ border: Border(
+ left: BorderSide(
+ color: widget.unselectedBorderColor ?? Colors.transparent,
+ width: widget.borderWidth / 2,
+ ),
+ ),
+ );
+ } else {
+ boxDecoration = boxDecoration.copyWith(
+ border: Border.symmetric(
+ vertical: BorderSide(
+ color: widget.unselectedBorderColor ?? Colors.transparent,
+ width: widget.borderWidth / 2,
+ ),
+ ),
+ );
+ }
+ }
+
+ return Padding(
+ key: _tabKeys[index],
+ // padding for the buttons
+ padding:
+ widget.useToggleButtonStyle ? EdgeInsets.zero : widget.buttonMargin,
+ child: TextButton(
+ onPressed: () => _handleTap(index),
+ style: ButtonStyle(
+ elevation: MaterialStateProperty.all(
+ widget.useToggleButtonStyle ? 0 : widget.elevation),
+
+ /// give a pretty small minimum size
+ minimumSize: MaterialStateProperty.all(const Size(10, 10)),
+ padding: MaterialStateProperty.all(EdgeInsets.zero),
+ textStyle: MaterialStateProperty.all(textStyle),
+ foregroundColor: MaterialStateProperty.all(textColor),
+ tapTargetSize: MaterialTapTargetSize.shrinkWrap,
+ shape: MaterialStateProperty.all(
+ widget.useToggleButtonStyle
+ ? const RoundedRectangleBorder(
+ side: BorderSide.none,
+ borderRadius: BorderRadius.zero,
+ )
+ : RoundedRectangleBorder(
+ side: (widget.borderWidth == 0)
+ ? BorderSide.none
+ : BorderSide(
+ color: borderColor ?? Colors.transparent,
+ width: widget.borderWidth,
+ ),
+ borderRadius: BorderRadius.circular(widget.borderRadius),
+ ),
+ ),
+ ),
+ child: Ink(
+ decoration: boxDecoration,
+ child: Container(
+ padding: widget.labelPadding,
+ alignment: Alignment.center,
+ child: child,
+ ),
+ ),
+ ),
+ );
+ }
+
+ bool _debugScheduleCheckHasValidTabsCount() {
+ if (_debugHasScheduledValidTabsCountCheck) {
+ return true;
+ }
+ WidgetsBinding.instance.addPostFrameCallback((Duration duration) {
+ _debugHasScheduledValidTabsCountCheck = false;
+ if (!mounted) {
+ return;
+ }
+ assert(() {
+ if (_controller!.length != widget.tabs.length) {
+ throw FlutterError(
+ "Controller's length property (${_controller!.length}) does not match the "
+ "number of tabs (${widget.tabs.length}) present in TabBar's tabs property.",
+ );
+ }
+ return true;
+ }());
+ });
+ _debugHasScheduledValidTabsCountCheck = true;
+ return true;
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ assert(_debugScheduleCheckHasValidTabsCount());
+
+ if (_controller!.length == 0) {
+ return Container(
+ height: _kTabHeight +
+ widget.labelPadding.vertical +
+ widget.buttonMargin.vertical,
+ );
+ }
+
+ final List wrappedTabs =
+ List.generate(widget.tabs.length, (int index) {
+ return _buildStyledTab(widget.tabs[index], index);
+ });
+
+ final int tabCount = widget.tabs.length;
+ // Add the tap handler to each tab. If the tab bar is not scrollable,
+ // then give all of the tabs equal flexibility so that they each occupy
+ // the same share of the tab bar's overall width.
+
+ for (int index = 0; index < tabCount; index += 1) {
+ if (!widget.isScrollable) {
+ wrappedTabs[index] = Expanded(child: wrappedTabs[index]);
+ }
+ }
+
+ Widget tabBar = AnimatedBuilder(
+ animation: _animationController,
+ key: _tabsParentKey,
+ builder: (context, child) {
+ Widget tabBarTemp = _TabLabelBar(
+ onPerformLayout: _saveTabOffsets,
+ children: wrappedTabs,
+ );
+
+ if (widget.useToggleButtonStyle) {
+ tabBarTemp = Material(
+ shape: widget.useToggleButtonStyle
+ ? RoundedRectangleBorder(
+ side: (widget.borderWidth == 0)
+ ? BorderSide.none
+ : BorderSide(
+ color: widget.borderColor ?? Colors.transparent,
+ width: widget.borderWidth,
+ style: BorderStyle.solid,
+ ),
+ borderRadius: BorderRadius.circular(widget.borderRadius),
+ )
+ : null,
+ elevation: widget.useToggleButtonStyle ? widget.elevation : 0,
+ clipBehavior: Clip.antiAliasWithSaveLayer,
+ child: tabBarTemp,
+ );
+ }
+ return CustomPaint(
+ painter: _indicatorPainter,
+ child: tabBarTemp,
+ );
+ },
+ );
+
+ if (widget.isScrollable) {
+ _scrollController ??= _TabBarScrollController(this);
+ tabBar = SingleChildScrollView(
+ dragStartBehavior: widget.dragStartBehavior,
+ scrollDirection: Axis.horizontal,
+ controller: _scrollController,
+ padding: widget.padding,
+ physics: widget.physics,
+ child: tabBar,
+ );
+ } else if (widget.padding != null) {
+ tabBar = Padding(
+ padding: widget.padding!,
+ child: tabBar,
+ );
+ }
+
+ return tabBar;
+ }
+}
diff --git a/lib/flutter_flow/flutter_flow_data_table.dart b/lib/flutter_flow/flutter_flow_data_table.dart
new file mode 100644
index 00000000..55272241
--- /dev/null
+++ b/lib/flutter_flow/flutter_flow_data_table.dart
@@ -0,0 +1,341 @@
+import 'dart:math' as math;
+
+import 'package:data_table_2/data_table_2.dart';
+import 'package:flutter/material.dart';
+
+export 'package:data_table_2/data_table_2.dart' show DataColumn2;
+
+const _kDataTableHorizontalMargin = 48.0;
+const kDefaultColumnSpacing = 56.0;
+const _kMinRowsPerPage = 5;
+
+typedef ColumnsBuilder = List Function(void Function(int, bool));
+typedef DataRowBuilder = DataRow? Function(
+ T, int, bool, void Function(bool?)?);
+
+class FlutterFlowDataTableController extends DataTableSource {
+ FlutterFlowDataTableController({
+ List? initialData,
+ int? numRows,
+ PaginatorController? paginatorController,
+ bool selectable = false,
+ }) {
+ data = initialData?.toList() ?? [];
+ numRows = numRows;
+ this.paginatorController = paginatorController ?? PaginatorController();
+ _selectable = selectable;
+ }
+
+ DataRowBuilder? _dataRowBuilder;
+ late PaginatorController paginatorController;
+ List data = [];
+ int? _numRows;
+ List get selectedData =>
+ selectedRows.where((i) => i < data.length).map(data.elementAt).toList();
+
+ bool _selectable = false;
+ final Set selectedRows = {};
+
+ int rowsPerPage = defaultRowsPerPage;
+ int? sortColumnIndex;
+ bool sortAscending = true;
+
+ void init({
+ DataRowBuilder? dataRowBuilder,
+ bool? selectable,
+ List? initialData,
+ int? initialNumRows,
+ }) {
+ _dataRowBuilder = dataRowBuilder ?? _dataRowBuilder;
+ _selectable = selectable ?? _selectable;
+ data = initialData?.toList() ?? data;
+ _numRows = initialNumRows;
+ }
+
+ void updateData({
+ List? data,
+ int? numRows,
+ bool notify = true,
+ }) {
+ this.data = data?.toList() ?? this.data;
+ _numRows = numRows ?? _numRows;
+ if (notify) {
+ notifyListeners();
+ }
+ }
+
+ void updateSort({
+ required int columnIndex,
+ required bool ascending,
+ Function(int, bool)? onSortChanged,
+ }) {
+ sortColumnIndex = columnIndex;
+ sortAscending = ascending;
+ if (onSortChanged != null) {
+ onSortChanged(columnIndex, ascending);
+ }
+ notifyListeners();
+ }
+
+ @override
+ DataRow? getRow(int index) {
+ final row = data.elementAtOrNull(index);
+ return _dataRowBuilder != null && row != null
+ ? _dataRowBuilder!(
+ row,
+ index,
+ selectedRows.contains(index),
+ _selectable
+ ? (selected) {
+ if (selected == null) {
+ return;
+ }
+ selected
+ ? selectedRows.add(index)
+ : selectedRows.remove(index);
+ notifyListeners();
+ }
+ : null,
+ )
+ : null;
+ }
+
+ @override
+ bool get isRowCountApproximate => false;
+
+ @override
+ int get rowCount => _numRows ?? data.length;
+
+ @override
+ int get selectedRowCount => selectedRows.length;
+}
+
+class FlutterFlowDataTable extends StatefulWidget {
+ const FlutterFlowDataTable({
+ super.key,
+ required this.controller,
+ required this.data,
+ this.numRows,
+ required this.columnsBuilder,
+ required this.dataRowBuilder,
+ this.emptyBuilder,
+ this.onPageChanged,
+ this.onSortChanged,
+ this.onRowsPerPageChanged,
+ this.paginated = true,
+ this.selectable = false,
+ this.hidePaginator = false,
+ this.showFirstLastButtons = false,
+ this.width,
+ this.height,
+ this.minWidth,
+ this.headingRowHeight = 56,
+ this.dataRowHeight = kMinInteractiveDimension,
+ this.columnSpacing = kDefaultColumnSpacing,
+ this.headingRowColor,
+ this.sortIconColor,
+ this.borderRadius,
+ this.addHorizontalDivider = true,
+ this.addTopAndBottomDivider = false,
+ this.hideDefaultHorizontalDivider = false,
+ this.addVerticalDivider = false,
+ this.horizontalDividerColor,
+ this.horizontalDividerThickness,
+ this.verticalDividerColor,
+ this.verticalDividerThickness,
+ this.checkboxUnselectedFillColor,
+ this.checkboxSelectedFillColor,
+ this.checkboxUnselectedBorderColor,
+ this.checkboxSelectedBorderColor,
+ this.checkboxCheckColor,
+ });
+
+ final FlutterFlowDataTableController controller;
+ final List data;
+ final int? numRows;
+ final ColumnsBuilder columnsBuilder;
+ final DataRowBuilder dataRowBuilder;
+ final Widget? Function()? emptyBuilder;
+ // Callback functions
+ final Function(int)? onPageChanged;
+ final Function(int, bool)? onSortChanged;
+ final Function(int)? onRowsPerPageChanged;
+ // Functionality options
+ final bool paginated;
+ final bool selectable;
+ final bool showFirstLastButtons;
+ final bool hidePaginator;
+ // Size and shape options
+ final double? width;
+ final double? height;
+ final double? minWidth;
+ final double headingRowHeight;
+ final double dataRowHeight;
+ final double columnSpacing;
+ // Table style options
+ final Color? headingRowColor;
+ final Color? sortIconColor;
+ final BorderRadius? borderRadius;
+ final bool addHorizontalDivider;
+ final bool addTopAndBottomDivider;
+ final bool hideDefaultHorizontalDivider;
+ final Color? horizontalDividerColor;
+ final double? horizontalDividerThickness;
+ final bool addVerticalDivider;
+ final Color? verticalDividerColor;
+ final double? verticalDividerThickness;
+ // Checkbox style options
+ final Color? checkboxUnselectedFillColor;
+ final Color? checkboxSelectedFillColor;
+ final Color? checkboxUnselectedBorderColor;
+ final Color? checkboxSelectedBorderColor;
+ final Color? checkboxCheckColor;
+
+ @override
+ State> createState() =>
+ _FlutterFlowDataTableState();
+}
+
+class _FlutterFlowDataTableState extends State> {
+ FlutterFlowDataTableController get controller => widget.controller;
+ int get rowCount => controller.rowCount;
+
+ int get initialRowsPerPage =>
+ rowCount > _kMinRowsPerPage ? defaultRowsPerPage : _kMinRowsPerPage;
+
+ @override
+ void initState() {
+ super.initState();
+ dataTableShowLogs = false; // Disables noisy DataTable2 debug statements.
+ controller.init(
+ dataRowBuilder: widget.dataRowBuilder,
+ selectable: widget.selectable,
+ initialData: widget.data,
+ initialNumRows: widget.numRows,
+ );
+ // ignore: cascade_invocations
+ controller.addListener(() => setState(() {}));
+ }
+
+ @override
+ void didUpdateWidget(FlutterFlowDataTable oldWidget) {
+ super.didUpdateWidget(oldWidget);
+ controller.updateData(
+ data: widget.data,
+ numRows: widget.numRows,
+ notify: true,
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final columns = widget.columnsBuilder(
+ (index, ascending) {
+ controller.updateSort(
+ columnIndex: index,
+ ascending: ascending,
+ onSortChanged: widget.onSortChanged,
+ );
+ setState(() {});
+ },
+ );
+
+ final checkboxThemeData = CheckboxThemeData(
+ checkColor: MaterialStateProperty.all(
+ widget.checkboxCheckColor ?? Colors.black54,
+ ),
+ fillColor: MaterialStateProperty.resolveWith(
+ (states) => states.contains(MaterialState.selected)
+ ? widget.checkboxSelectedFillColor ?? Colors.white.withOpacity(0.01)
+ : widget.checkboxUnselectedFillColor ??
+ Colors.white.withOpacity(0.01),
+ ),
+ side: MaterialStateBorderSide.resolveWith(
+ (states) => BorderSide(
+ width: 2.0,
+ color: states.contains(MaterialState.selected)
+ ? widget.checkboxSelectedBorderColor ?? Colors.black54
+ : widget.checkboxUnselectedBorderColor ?? Colors.black54,
+ ),
+ ),
+ overlayColor: MaterialStateProperty.all(Colors.transparent),
+ );
+
+ final horizontalBorder = widget.addHorizontalDivider
+ ? BorderSide(
+ color: widget.horizontalDividerColor ?? Colors.transparent,
+ width: widget.horizontalDividerThickness ?? 1.0,
+ )
+ : BorderSide.none;
+
+ return ClipRRect(
+ borderRadius: widget.borderRadius ?? BorderRadius.zero,
+ child: SizedBox(
+ width: widget.width,
+ height: widget.height,
+ child: Theme(
+ data: Theme.of(context).copyWith(
+ iconTheme: widget.sortIconColor != null
+ ? IconThemeData(color: widget.sortIconColor)
+ : null,
+ ),
+ child: PaginatedDataTable2(
+ source: controller,
+ controller:
+ widget.paginated ? controller.paginatorController : null,
+ rowsPerPage: widget.paginated ? initialRowsPerPage : rowCount,
+ availableRowsPerPage: const [5, 10, 25, 50, 100],
+ onPageChanged: widget.onPageChanged != null
+ ? (index) => widget.onPageChanged!(index)
+ : null,
+ columnSpacing: widget.columnSpacing,
+ onRowsPerPageChanged: widget.paginated
+ ? (value) {
+ controller.rowsPerPage = value ?? initialRowsPerPage;
+ if (widget.onRowsPerPageChanged != null) {
+ widget.onRowsPerPageChanged!(controller.rowsPerPage);
+ }
+ }
+ : null,
+ columns: columns,
+ empty: widget.emptyBuilder != null ? widget.emptyBuilder!() : null,
+ sortColumnIndex: controller.sortColumnIndex,
+ sortAscending: controller.sortAscending,
+ showCheckboxColumn: widget.selectable,
+ datarowCheckboxTheme: checkboxThemeData,
+ headingCheckboxTheme: checkboxThemeData,
+ hidePaginator: !widget.paginated || widget.hidePaginator,
+ wrapInCard: false,
+ renderEmptyRowsInTheEnd: false,
+ border: TableBorder(
+ horizontalInside: horizontalBorder,
+ verticalInside: widget.addVerticalDivider
+ ? BorderSide(
+ color: widget.verticalDividerColor ?? Colors.transparent,
+ width: widget.verticalDividerThickness ?? 1.0,
+ )
+ : BorderSide.none,
+ bottom: widget.addTopAndBottomDivider
+ ? horizontalBorder
+ : BorderSide.none,
+ ),
+ dividerThickness: widget.hideDefaultHorizontalDivider ? 0.0 : null,
+ headingRowColor: MaterialStateProperty.all(widget.headingRowColor),
+ headingRowHeight: widget.headingRowHeight,
+ dataRowHeight: widget.dataRowHeight,
+ showFirstLastButtons: widget.showFirstLastButtons,
+ minWidth: math.max(widget.minWidth ?? 0, _getColumnsWidth(columns)),
+ ),
+ ),
+ ),
+ );
+ }
+
+ // Return the total fixed width of all columns that have a specified width,
+ // plus one to make the data table scrollable if there is insufficient space.
+ double _getColumnsWidth(List columns) =>
+ columns.where((c) => c is DataColumn2 && c.fixedWidth != null).fold(
+ ((widget.selectable ? 2 : 1) * _kDataTableHorizontalMargin) + 1,
+ (sum, col) => sum + (col as DataColumn2).fixedWidth!,
+ );
+}
diff --git a/lib/flutter_flow/flutter_flow_theme.dart b/lib/flutter_flow/flutter_flow_theme.dart
index e782c9ed..7429aca2 100644
--- a/lib/flutter_flow/flutter_flow_theme.dart
+++ b/lib/flutter_flow/flutter_flow_theme.dart
@@ -66,6 +66,8 @@ abstract class FlutterFlowTheme {
late Color customColor1;
late Color customColor2;
late Color customColor3;
+ late Color customColor4;
+ late Color customColor5;
@Deprecated('Use displaySmallFamily instead')
String get title1Family => displaySmallFamily;
@@ -164,7 +166,7 @@ class LightModeTheme extends FlutterFlowTheme {
late Color accent1 = const Color(0xFF1AAB5F);
late Color accent2 = const Color(0x4D000000);
late Color accent3 = const Color(0xFFFFFFFF);
- late Color accent4 = const Color(0xFFFFFFFF);
+ late Color accent4 = const Color(0xFF1AAB5F);
late Color success = const Color(0xFF1AAB5F);
late Color warning = const Color(0xFFF3C344);
late Color error = const Color(0xFFD70000);
@@ -173,6 +175,8 @@ class LightModeTheme extends FlutterFlowTheme {
late Color customColor1 = const Color(0xFF000000);
late Color customColor2 = const Color(0xFF1AAB5F);
late Color customColor3 = const Color(0xFFFFFFFF);
+ late Color customColor4 = const Color(0xFFCFCFCF);
+ late Color customColor5 = const Color(0xFF979595);
}
abstract class Typography {
@@ -569,6 +573,8 @@ class DarkModeTheme extends FlutterFlowTheme {
late Color customColor1 = const Color(0xFFFFFFFF);
late Color customColor2 = const Color(0xFFFFFFFF);
late Color customColor3 = const Color(0xFF1AAB5F);
+ late Color customColor4 = const Color(0xFF232323);
+ late Color customColor5 = const Color(0xFF232323);
}
extension TextStyleHelper on TextStyle {
diff --git a/lib/flutter_flow/flutter_flow_util.dart b/lib/flutter_flow/flutter_flow_util.dart
index f48a21ef..20a3e9bf 100644
--- a/lib/flutter_flow/flutter_flow_util.dart
+++ b/lib/flutter_flow/flutter_flow_util.dart
@@ -14,6 +14,7 @@ import 'package:url_launcher/url_launcher.dart';
import '../main.dart';
+export 'keep_alive_wrapper.dart';
export 'lat_lng.dart';
export 'place.dart';
export 'uploaded_file.dart';
diff --git a/lib/flutter_flow/internationalization.dart b/lib/flutter_flow/internationalization.dart
index b5c2dc8d..f6d595a6 100644
--- a/lib/flutter_flow/internationalization.dart
+++ b/lib/flutter_flow/internationalization.dart
@@ -107,43 +107,43 @@ Locale createLocale(String language) => language.contains('_')
final kTranslationsMap =