From c0363c12f8bad02273fdcb13f226758bd57fef2e Mon Sep 17 00:00:00 2001 From: FlutterFlow <140657486+FlutterFlowEng@users.noreply.github.com> Date: Tue, 2 Jul 2024 20:43:06 +0000 Subject: [PATCH 1/5] Updating to latest FlutterFlow output. --- ios/Runner.xcodeproj/project.pbxproj | 8 +++---- .../schedule_complete_visit_page_model.dart | 24 +++++++++++++++++++ .../schedule_complete_visit_page_widget.dart | 12 ++++++---- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 091fe826..e6234fd9 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -44,8 +44,8 @@ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 6436409927A31CD100820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; - 6436409727A31CD000820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409127A31CD500820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409D27A31CDC00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ @@ -225,8 +225,8 @@ 6436409C27A31CD800820AF7 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 6436409927A31CD100820AF7 /* pt */, - 6436409727A31CD000820AF7 /* en */, + 6436409127A31CD500820AF7 /* pt */, + 6436409D27A31CDC00820AF7 /* en */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart index e5ef085f..c9e5c9c0 100644 --- a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart +++ b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_model.dart @@ -1,5 +1,8 @@ +import '/backend/api_requests/api_calls.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/form_field_controller.dart'; +import '/flutter_flow/request_manager.dart'; + import 'schedule_complete_visit_page_widget.dart' show ScheduleCompleteVisitPageWidget; import 'package:flutter/material.dart'; @@ -51,6 +54,23 @@ class ScheduleCompleteVisitPageModel TextEditingController? textController3; String? Function(BuildContext, String?)? textController3Validator; + /// Query cache managers for this widget. + + final _visitHistoryManager = FutureRequestManager(); + Future visitHistory({ + String? uniqueQueryKey, + bool? overrideCache, + required Future Function() requestFn, + }) => + _visitHistoryManager.performRequest( + uniqueQueryKey: uniqueQueryKey, + overrideCache: overrideCache, + requestFn: requestFn, + ); + void clearVisitHistoryCache() => _visitHistoryManager.clear(); + void clearVisitHistoryCacheKey(String? uniqueKey) => + _visitHistoryManager.clearRequest(uniqueKey); + @override void initState(BuildContext context) {} @@ -66,6 +86,10 @@ class ScheduleCompleteVisitPageModel textFieldFocusNode3?.dispose(); textController3?.dispose(); + + /// Dispose query cache managers for this widget. + + clearVisitHistoryCache(); } /// Action blocks. diff --git a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart index 36ef3ca6..48fe146d 100644 --- a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart +++ b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart @@ -2263,11 +2263,13 @@ class _ScheduleCompleteVisitPageWidgetState ], ), FutureBuilder( - future: PhpGroup.getVisitsCall.call( - devUUID: FFAppState().devUUID, - userUUID: FFAppState().userUUID, - cliID: FFAppState().cliUUID, - atividade: 'getVisitas', + future: _model.visitHistory( + requestFn: () => 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. From 8169362451eae8bd14df023efd1bb662c3fedb14 Mon Sep 17 00:00:00 2001 From: FlutterFlow <140657486+FlutterFlowEng@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:50:01 +0000 Subject: [PATCH 2/5] add card item template component --- ios/Runner.xcodeproj/project.pbxproj | 8 +- .../card_item_template_component_model.dart | 13 + .../card_item_template_component_widget.dart | 348 ++++++++++++++++++ 3 files changed, 365 insertions(+), 4 deletions(-) create mode 100644 lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart create mode 100644 lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index e6234fd9..32db0a7c 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -44,8 +44,8 @@ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 6436409127A31CD500820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; - 6436409D27A31CDC00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409F27A31CD400820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409C27A31CDE00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ @@ -225,8 +225,8 @@ 6436409C27A31CD800820AF7 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 6436409127A31CD500820AF7 /* pt */, - 6436409D27A31CDC00820AF7 /* en */, + 6436409F27A31CD400820AF7 /* pt */, + 6436409C27A31CDE00820AF7 /* en */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart b/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart new file mode 100644 index 00000000..3f35acf9 --- /dev/null +++ b/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart @@ -0,0 +1,13 @@ +import '/flutter_flow/flutter_flow_util.dart'; +import 'card_item_template_component_widget.dart' + show CardItemTemplateComponentWidget; +import 'package:flutter/material.dart'; + +class CardItemTemplateComponentModel + extends FlutterFlowModel { + @override + void initState(BuildContext context) {} + + @override + void dispose() {} +} diff --git a/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart new file mode 100644 index 00000000..a3312e64 --- /dev/null +++ b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart @@ -0,0 +1,348 @@ +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:google_fonts/google_fonts.dart'; +import 'package:provider/provider.dart'; +import 'card_item_template_component_model.dart'; +export 'card_item_template_component_model.dart'; + +class CardItemTemplateComponentWidget extends StatefulWidget { + const CardItemTemplateComponentWidget({ + super.key, + required this.labelsKeyValues, + required this.statusKeyValue, + required this.imageKeyValue, + required this.onTapCardItemAction, + }); + + final List? labelsKeyValues; + final List? statusKeyValue; + final String? imageKeyValue; + final Future Function()? onTapCardItemAction; + + @override + State createState() => + _CardItemTemplateComponentWidgetState(); +} + +class _CardItemTemplateComponentWidgetState + extends State { + late CardItemTemplateComponentModel _model; + + @override + void setState(VoidCallback callback) { + super.setState(callback); + _model.onUpdate(); + } + + @override + void initState() { + super.initState(); + _model = createModel(context, () => CardItemTemplateComponentModel()); + } + + @override + void dispose() { + _model.maybeDispose(); + + super.dispose(); + } + + @override + Widget build(BuildContext context) { + context.watch(); + + return InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: () async { + await widget.onTapCardItemAction?.call(); + }, + 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, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Column( + mainAxisSize: MainAxisSize.max, + children: [ + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Text( + valueOrDefault( + widget.labelsKeyValues?[1], + 'KeyValue', + ), + 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( + valueOrDefault( + widget.labelsKeyValues?[1], + 'KeyValue', + ), + 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), + ), + ), + ] + .divide(const SizedBox(width: 1.0)) + .addToStart(const SizedBox(width: 10.0)), + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + valueOrDefault( + widget.labelsKeyValues?[1], + 'KeyValue', + ), + 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( + valueOrDefault( + widget.labelsKeyValues?[1], + 'KeyValue', + ), + 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), + ), + ), + ] + .divide(const SizedBox(width: 1.0)) + .addToStart(const SizedBox(width: 10.0)), + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + valueOrDefault( + widget.labelsKeyValues?[1], + 'KeyValue', + ), + 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( + valueOrDefault( + widget.labelsKeyValues?[1], + 'KeyValue', + ), + 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), + ), + ), + ] + .divide(const SizedBox(width: 1.0)) + .addToStart(const SizedBox(width: 10.0)), + ), + ].divide(const SizedBox(height: 1.0)), + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: Container( + width: 200.0, + height: 27.0, + decoration: BoxDecoration( + color: valueOrDefault( + () { + if (widget.statusKeyValue?.first == + widget.statusKeyValue?.last) { + return FlutterFlowTheme.of(context) + .success; + } else if ((widget.statusKeyValue?.first == + widget.statusKeyValue?.last) || + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last) || + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last) || + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last)) { + return FlutterFlowTheme.of(context).error; + } else if ((widget.statusKeyValue?.first == + widget.statusKeyValue?.first) == + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last)) { + 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 (widget.statusKeyValue?.first == + widget.statusKeyValue?.last) { + return FFLocalizations.of(context) + .getVariableText( + ptText: 'Ativo', + enText: 'Active', + ); + } else if ((widget.statusKeyValue?.first == + widget.statusKeyValue?.last) || + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last) || + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last) || + (widget.statusKeyValue?.first == + widget.statusKeyValue?.last)) { + 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: 5.0)), + ), + ), + ), + Padding( + padding: const EdgeInsetsDirectional.fromSTEB(10.0, 10.0, 10.0, 10.0), + child: ClipRRect( + borderRadius: BorderRadius.circular(22.0), + child: CachedNetworkImage( + fadeInDuration: const Duration(milliseconds: 500), + fadeOutDuration: const Duration(milliseconds: 500), + imageUrl: valueOrDefault( + 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${widget.imageKeyValue}&tipo=${widget.imageKeyValue}', + 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg', + ), + fit: BoxFit.cover, + ), + ), + ), + ], + ), + ), + ), + ); + } +} From eb7885c66e4567433765c6ab88d8cdaf2ef2f119 Mon Sep 17 00:00:00 2001 From: FlutterFlow <140657486+FlutterFlowEng@users.noreply.github.com> Date: Fri, 12 Jul 2024 15:58:00 +0000 Subject: [PATCH 3/5] add QR Code --- ios/Runner.xcodeproj/project.pbxproj | 8 +- lib/backend/api_requests/api_calls.dart | 7 +- ..._arrow_linked_locals_component_widget.dart | 2 + .../menu_list_view_component_widget.dart | 114 +++++- .../message_well_component_model.dart | 7 + .../message_well_component_widget.dart | 25 ++ .../schedule_visit_detail_widget.dart | 7 +- ..._arrow_linked_locals_component_widget.dart | 2 + ...ot_password_template_component_widget.dart | 25 +- ...ode_pass_key_template_component_model.dart | 38 ++ ...de_pass_key_template_component_widget.dart | 327 +++++++++++++++ ...earch_modal_template_component_widget.dart | 1 + .../view_visit_detail_widget.dart | 3 +- lib/flutter_flow/custom_functions.dart | 4 + lib/flutter_flow/flutter_flow_model.dart | 4 +- lib/flutter_flow/flutter_flow_theme.dart | 3 + lib/flutter_flow/internationalization.dart | 70 +++- lib/flutter_flow/nav/nav.dart | 5 + lib/flutter_flow/nav/serialization_util.dart | 1 + lib/index.dart | 1 + .../acess_history_page_widget.dart | 2 + .../liberation_history_widget.dart | 3 + .../people_on_the_property_page_widget.dart | 3 + .../qr_code_page/qr_code_page_model.dart | 32 ++ .../qr_code_page/qr_code_page_widget.dart | 374 ++++++++++++++++++ .../register_visitor_page_widget.dart | 1 + .../schedule_complete_visit_page_widget.dart | 6 + ...chedule_provisional_visit_page_widget.dart | 2 +- pubspec.yaml | 3 + 29 files changed, 1057 insertions(+), 23 deletions(-) create mode 100644 lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_model.dart create mode 100644 lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart create mode 100644 lib/pages/qr_code_page/qr_code_page_model.dart create mode 100644 lib/pages/qr_code_page/qr_code_page_widget.dart diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 32db0a7c..8484ef10 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -44,8 +44,8 @@ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 6436409F27A31CD400820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; - 6436409C27A31CDE00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409327A31CD500820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409E27A31CD600820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ @@ -225,8 +225,8 @@ 6436409C27A31CD800820AF7 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 6436409F27A31CD400820AF7 /* pt */, - 6436409C27A31CDE00820AF7 /* en */, + 6436409327A31CD500820AF7 /* pt */, + 6436409E27A31CD600820AF7 /* en */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/lib/backend/api_requests/api_calls.dart b/lib/backend/api_requests/api_calls.dart index fcd6618b..e7852f78 100644 --- a/lib/backend/api_requests/api_calls.dart +++ b/lib/backend/api_requests/api_calls.dart @@ -35,8 +35,7 @@ class PhpGroup { RespondeSolicitacaoCall(); static GetAccessCall getAccessCall = GetAccessCall(); static GetLiberationsCall getLiberationsCall = GetLiberationsCall(); - static GetLiberationsCopyCall getLiberationsCopyCall = - GetLiberationsCopyCall(); + static GetMessagesCall getMessagesCall = GetMessagesCall(); } class LoginCall { @@ -1984,7 +1983,7 @@ class GetLiberationsCall { .toList(); } -class GetLiberationsCopyCall { +class GetMessagesCall { Future call({ String? devUUID = '', String? userUUID = '', @@ -1997,7 +1996,7 @@ class GetLiberationsCopyCall { final baseUrl = PhpGroup.getBaseUrl(); return ApiManager.instance.makeApiCall( - callName: 'getLiberations Copy', + callName: 'getMessages', apiUrl: '$baseUrl/processRequest.php', callType: ApiCallType.POST, headers: { diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart index e7c7b164..505e51d8 100644 --- a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart +++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart @@ -97,6 +97,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState ); } final gridViewGetLocalsResponse = snapshot.data!; + return Builder( builder: (context) { final eachLocals = PhpGroup.getLocalsCall @@ -107,6 +108,7 @@ class _BottomArrowLinkedLocalsComponentWidgetState .toList() .toList() ?? []; + return GridView.builder( padding: EdgeInsets.zero, gridDelegate: diff --git a/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart index 56d3d1b2..3a3f82e2 100644 --- a/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart +++ b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart @@ -806,7 +806,119 @@ Propriedade */ alignment: const AlignmentDirectional(0.0, 0.0), child: Text( FFLocalizations.of(context).getText( - 'nxssjz3q' /* Histórico + 'nxssjz3q' /* Consultar +Históricos */ + , + ), + 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(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.acessHistoryOptAction?.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( + Icons.history_sharp, + 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( + '589qufkw' /* Histórico de Acesso */ , ), diff --git a/lib/components/organism_components/message_well_component/message_well_component_model.dart b/lib/components/organism_components/message_well_component/message_well_component_model.dart index 3da2a723..0c84c97e 100644 --- a/lib/components/organism_components/message_well_component/message_well_component_model.dart +++ b/lib/components/organism_components/message_well_component/message_well_component_model.dart @@ -1,9 +1,16 @@ import '/flutter_flow/flutter_flow_util.dart'; import 'message_well_component_widget.dart' show MessageWellComponentWidget; +import 'package:carousel_slider/carousel_slider.dart'; import 'package:flutter/material.dart'; class MessageWellComponentModel extends FlutterFlowModel { + /// State fields for stateful widgets in this component. + + // State field(s) for Carousel widget. + CarouselController? carouselController; + int carouselCurrentIndex = 1; + @override void initState(BuildContext context) {} diff --git a/lib/components/organism_components/message_well_component/message_well_component_widget.dart b/lib/components/organism_components/message_well_component/message_well_component_widget.dart index d8a5b8b8..8fbf856e 100644 --- a/lib/components/organism_components/message_well_component/message_well_component_widget.dart +++ b/lib/components/organism_components/message_well_component/message_well_component_widget.dart @@ -1,6 +1,7 @@ import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; +import 'package:carousel_slider/carousel_slider.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'message_well_component_model.dart'; @@ -116,6 +117,30 @@ class _MessageWellComponentWidgetState ), ), ), + SizedBox( + width: double.infinity, + height: 180.0, + child: CarouselSlider( + items: [ + Container(), + Container(), + ], + carouselController: _model.carouselController ??= + CarouselController(), + options: CarouselOptions( + initialPage: 1, + viewportFraction: 0.5, + disableCenter: true, + enlargeCenterPage: true, + enlargeFactor: 0.25, + enableInfiniteScroll: true, + scrollDirection: Axis.vertical, + autoPlay: false, + onPageChanged: (index, _) => + _model.carouselCurrentIndex = index, + ), + ), + ), ], ), ), diff --git a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart index 7517473f..9641ca52 100644 --- a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart +++ b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart @@ -55,14 +55,16 @@ class _ScheduleVisitDetailWidgetState extends State { super.initState(); _model = createModel(context, () => ScheduleVisitDetailModel()); - _model.textController1 ??= TextEditingController(text: widget.visitTempStr); + _model.textController1 ??= + TextEditingController(text: widget.visitTempStr); _model.textFieldFocusNode1 ??= FocusNode(); _model.textController2 ??= TextEditingController(text: widget.visitStartDate); _model.textFieldFocusNode2 ??= FocusNode(); - _model.textController3 ??= TextEditingController(text: widget.visitEndDate); + _model.textController3 ??= + TextEditingController(text: widget.visitEndDate); _model.textFieldFocusNode3 ??= FocusNode(); _model.textController4 ??= TextEditingController( @@ -170,6 +172,7 @@ class _ScheduleVisitDetailWidgetState extends State { .toList() .take(1) .toList(); + return SingleChildScrollView( scrollDirection: Axis.horizontal, child: Row( diff --git a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart index 49237edc..fea22bdb 100644 --- a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart +++ b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart @@ -96,6 +96,7 @@ class _UpArrowLinkedLocalsComponentWidgetState ); } final gridViewGetLocalsResponse = snapshot.data!; + return Builder( builder: (context) { final eachLocals = (PhpGroup.getLocalsCall @@ -108,6 +109,7 @@ class _UpArrowLinkedLocalsComponentWidgetState []) .take(2) .toList(); + return GridView.builder( padding: EdgeInsets.zero, gridDelegate: diff --git a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart index f395e2cd..39cce295 100644 --- a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart +++ b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart @@ -1,4 +1,5 @@ import '/backend/api_requests/api_calls.dart'; +import '/components/molecular_components/throw_exception/throw_exception_widget.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; @@ -224,7 +225,7 @@ class _ForgotPasswordTemplateComponentWidgetState ), style: FlutterFlowTheme.of(context).bodyMedium.override( fontFamily: 'Plus Jakarta Sans', - color: FlutterFlowTheme.of(context).secondaryText, + color: FlutterFlowTheme.of(context).primaryText, fontSize: 14.0, letterSpacing: 0.0, fontWeight: FontWeight.w500, @@ -245,23 +246,35 @@ class _ForgotPasswordTemplateComponentWidgetState 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; + await showModalBottomSheet( + isScrollControlled: true, + backgroundColor: Colors.transparent, + enableDrag: false, + context: context, + builder: (context) { + return Padding( + padding: MediaQuery.viewInsetsOf(context), + child: ThrowExceptionWidget( + msg: PhpGroup.forgotPasswordCall.msg( + (_model.req?.jsonBody ?? ''), + )!, + ), + ); + }, + ).then((value) => safeSetState(() {})); } - if (shouldSetState) setState(() {}); + setState(() {}); }, text: FFLocalizations.of(context).getText( '74rnd5bu' /* Enviar */, diff --git a/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_model.dart b/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_model.dart new file mode 100644 index 00000000..4e3f3260 --- /dev/null +++ b/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_model.dart @@ -0,0 +1,38 @@ +import '/flutter_flow/flutter_flow_util.dart'; +import 'qr_code_pass_key_template_component_widget.dart' + show QrCodePassKeyTemplateComponentWidget; +import 'package:flutter/material.dart'; + +class QrCodePassKeyTemplateComponentModel + extends FlutterFlowModel { + /// State fields for stateful widgets in this component. + + final formKey = GlobalKey(); + // State field(s) for keyTextField widget. + FocusNode? keyTextFieldFocusNode; + TextEditingController? keyTextFieldTextController; + late bool keyTextFieldVisibility; + String? Function(BuildContext, String?)? keyTextFieldTextControllerValidator; + String? _keyTextFieldTextControllerValidator( + BuildContext context, String? val) { + if (val == null || val.isEmpty) { + return FFLocalizations.of(context).getText( + 'f128ajey' /* Field is required */, + ); + } + + return null; + } + + @override + void initState(BuildContext context) { + keyTextFieldVisibility = false; + keyTextFieldTextControllerValidator = _keyTextFieldTextControllerValidator; + } + + @override + void dispose() { + keyTextFieldFocusNode?.dispose(); + keyTextFieldTextController?.dispose(); + } +} diff --git a/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart b/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart new file mode 100644 index 00000000..b11ad8fe --- /dev/null +++ b/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart @@ -0,0 +1,327 @@ +import '/flutter_flow/flutter_flow_theme.dart'; +import '/flutter_flow/flutter_flow_util.dart'; +import '/flutter_flow/flutter_flow_widgets.dart'; +import 'package:easy_debounce/easy_debounce.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'qr_code_pass_key_template_component_model.dart'; +export 'qr_code_pass_key_template_component_model.dart'; + +class QrCodePassKeyTemplateComponentWidget extends StatefulWidget { + const QrCodePassKeyTemplateComponentWidget({ + super.key, + required this.toggleActionStatus, + }); + + final Future Function(String key)? toggleActionStatus; + + @override + State createState() => + _QrCodePassKeyTemplateComponentWidgetState(); +} + +class _QrCodePassKeyTemplateComponentWidgetState + extends State { + late QrCodePassKeyTemplateComponentModel _model; + + @override + void setState(VoidCallback callback) { + super.setState(callback); + _model.onUpdate(); + } + + @override + void initState() { + super.initState(); + _model = createModel(context, () => QrCodePassKeyTemplateComponentModel()); + + _model.keyTextFieldTextController ??= TextEditingController(); + _model.keyTextFieldFocusNode ??= FocusNode(); + _model.keyTextFieldFocusNode!.addListener(() => setState(() {})); + } + + @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, + borderRadius: const BorderRadius.only( + bottomLeft: Radius.circular(0.0), + bottomRight: Radius.circular(0.0), + topLeft: Radius.circular(15.0), + topRight: Radius.circular(15.0), + ), + ), + 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( + 'h1xilful' /* DIGITE A 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( + 'ujodm2ci' /* Para gerar o QR Code digite 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'), + ), + ), + ), + Form( + key: _model.formKey, + autovalidateMode: AutovalidateMode.always, + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0), + child: SizedBox( + width: double.infinity, + child: TextFormField( + controller: _model.keyTextFieldTextController, + focusNode: _model.keyTextFieldFocusNode, + onChanged: (_) => EasyDebounce.debounce( + '_model.keyTextFieldTextController', + const Duration(milliseconds: 2000), + () => setState(() {}), + ), + autofillHints: const [AutofillHints.password], + textCapitalization: TextCapitalization.none, + textInputAction: TextInputAction.done, + obscureText: !_model.keyTextFieldVisibility, + decoration: InputDecoration( + isDense: true, + labelText: FFLocalizations.of(context).getText( + 'rfqrdet7' /* Senha */, + ), + labelStyle: + FlutterFlowTheme.of(context).labelMedium.override( + fontFamily: 'Plus Jakarta Sans', + color: FlutterFlowTheme.of(context).primary, + fontSize: 14.0, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + useGoogleFonts: GoogleFonts.asMap() + .containsKey('Plus Jakarta Sans'), + ), + hintText: FFLocalizations.of(context).getText( + 'zz1haydj' /* digite a sua senha..... */, + ), + 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: InkWell( + onTap: () => setState( + () => _model.keyTextFieldVisibility = + !_model.keyTextFieldVisibility, + ), + focusNode: FocusNode(skipTraversal: true), + child: Icon( + _model.keyTextFieldVisibility + ? Icons.visibility_outlined + : Icons.visibility_off_outlined, + color: FlutterFlowTheme.of(context).accent1, + size: 22.0, + ), + ), + ), + style: FlutterFlowTheme.of(context).bodyMedium.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'), + ), + maxLength: 4, + maxLengthEnforcement: MaxLengthEnforcement.none, + buildCounter: (context, + {required currentLength, + required isFocused, + maxLength}) => + null, + keyboardType: TextInputType.visiblePassword, + cursorColor: FlutterFlowTheme.of(context).primary, + validator: _model.keyTextFieldTextControllerValidator + .asValidator(context), + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp('[0-9]')) + ], + ), + ), + ), + ), + 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 { + if (_model.formKey.currentState == null || + !_model.formKey.currentState!.validate()) { + return; + } + await widget.toggleActionStatus?.call( + _model.keyTextFieldTextController.text, + ); + Navigator.pop(context); + }, + text: FFLocalizations.of(context).getText( + '2cybbi5p' /* 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/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart index bbb89161..f393b4ec 100644 --- a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart +++ b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart @@ -273,6 +273,7 @@ class _VisitorSearchModalTemplateComponentWidgetState builder: (context) { final visitor = _model.visitors.map((e) => e).toList(); + return ListView.builder( padding: EdgeInsets.zero, scrollDirection: Axis.vertical, diff --git a/lib/components/view_visit_detail/view_visit_detail_widget.dart b/lib/components/view_visit_detail/view_visit_detail_widget.dart index e7adf22f..73f3e397 100644 --- a/lib/components/view_visit_detail/view_visit_detail_widget.dart +++ b/lib/components/view_visit_detail/view_visit_detail_widget.dart @@ -75,7 +75,8 @@ class _ViewVisitDetailWidgetState extends State { TextEditingController(text: widget.visitStartDate); _model.textFieldFocusNode2 ??= FocusNode(); - _model.textController3 ??= TextEditingController(text: widget.visitEndDate); + _model.textController3 ??= + TextEditingController(text: widget.visitEndDate); _model.textFieldFocusNode3 ??= FocusNode(); _model.textController4 ??= diff --git a/lib/flutter_flow/custom_functions.dart b/lib/flutter_flow/custom_functions.dart index 2aaa5566..39cba244 100644 --- a/lib/flutter_flow/custom_functions.dart +++ b/lib/flutter_flow/custom_functions.dart @@ -105,3 +105,7 @@ String jsonToStr(dynamic json) { String jsonString = jsonEncode(json); return jsonString; } + +double getProgressValue(int percentage) { + return percentage / 100; +} diff --git a/lib/flutter_flow/flutter_flow_model.dart b/lib/flutter_flow/flutter_flow_model.dart index 4606ba84..5a1225da 100644 --- a/lib/flutter_flow/flutter_flow_model.dart +++ b/lib/flutter_flow/flutter_flow_model.dart @@ -49,9 +49,7 @@ abstract class FlutterFlowModel { // The widget associated with this model. This is useful for accessing the // parameters of the widget, for example. W? _widget; - // This will always be non-null when used, but is nullable to allow us to - // dispose of the widget in the [dispose] method (for garbage collection). - W get widget => _widget!; + W? get widget => _widget; // Dispose methods // Whether to dispose this model when the corresponding widget is diff --git a/lib/flutter_flow/flutter_flow_theme.dart b/lib/flutter_flow/flutter_flow_theme.dart index 3ee2f331..12792945 100644 --- a/lib/flutter_flow/flutter_flow_theme.dart +++ b/lib/flutter_flow/flutter_flow_theme.dart @@ -591,6 +591,7 @@ extension TextStyleHelper on TextStyle { bool useGoogleFonts = true, TextDecoration? decoration, double? lineHeight, + List? shadows, }) => useGoogleFonts ? GoogleFonts.getFont( @@ -602,6 +603,7 @@ extension TextStyleHelper on TextStyle { fontStyle: fontStyle ?? this.fontStyle, decoration: decoration, height: lineHeight, + shadows: shadows, ) : copyWith( fontFamily: fontFamily, @@ -612,5 +614,6 @@ extension TextStyleHelper on TextStyle { fontStyle: fontStyle, decoration: decoration, height: lineHeight, + shadows: shadows, ); } diff --git a/lib/flutter_flow/internationalization.dart b/lib/flutter_flow/internationalization.dart index 1293fcb6..b56429ba 100644 --- a/lib/flutter_flow/internationalization.dart +++ b/lib/flutter_flow/internationalization.dart @@ -459,6 +459,37 @@ final kTranslationsMap = >>[ 'en': '', }, }, + // qrCodePage + { + 'vd84zgfe': { + 'pt': 'Use esse QR Code para acesso', + 'en': '', + }, + 'mxdrsbmy': { + 'pt': 'Liberar QR Code', + 'en': 'Release QR Code', + }, + '6z6kvmhl': { + 'pt': 'Certifique-se de que o QRCode está visivel para o leitor', + 'en': '', + }, + 'wkjkxd2e': { + 'pt': 'Trocando QR code em', + 'en': '', + }, + '3bfr2tjr': { + 'pt': '20', + 'en': '', + }, + 'ku7jqe53': { + 'pt': 'QR Code de Acesso', + 'en': 'Access QR Code', + }, + 'sejj3t8w': { + 'pt': 'Home', + 'en': '', + }, + }, // visitorDetailsModalTemplateComponent { 'kqzf7nx2': { @@ -759,6 +790,10 @@ final kTranslationsMap = >>[ 'en': 'People on\nthe Property', }, 'nxssjz3q': { + 'pt': 'Consultar \nHistóricos', + 'en': 'Consult \nHistories', + }, + '589qufkw': { 'pt': 'Histórico \nde Acesso', 'en': 'Access \nHistory', }, @@ -984,7 +1019,7 @@ final kTranslationsMap = >>[ }, '74rnd5bu': { 'pt': 'Enviar', - 'en': 'To send', + 'en': 'Send', }, }, // visitRequestTemplateComponent @@ -1068,6 +1103,39 @@ final kTranslationsMap = >>[ 'en': '', }, }, + // qrCodePassKeyTemplateComponent + { + 'h1xilful': { + 'pt': 'DIGITE A SUA SENHA', + 'en': 'ENTER YOUR PASSWORD', + }, + 'ujodm2ci': { + 'pt': + 'Para gerar o QR Code digite a senha cadastrado no aplicativo e clique em enviar.', + 'en': + 'To generate the QR Code, enter the password registered in the application and click send.', + }, + 'rfqrdet7': { + 'pt': 'Senha', + 'en': 'Password', + }, + 'zz1haydj': { + 'pt': 'digite a sua senha.....', + 'en': 'enter your password.....', + }, + 'f128ajey': { + 'pt': 'Field is required', + 'en': '', + }, + 'otk0c2pe': { + 'pt': 'Please choose an option from the dropdown', + 'en': '', + }, + '2cybbi5p': { + 'pt': 'Enviar', + 'en': 'Send', + }, + }, // Miscellaneous { 'i5smty81': { diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index 2e011d03..fb4887f7 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -142,6 +142,11 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter( name: 'welcomePage', path: '/welcomePage', builder: (context, params) => const WelcomePageWidget(), + ), + FFRoute( + name: 'qrCodePage', + path: '/qrCodePage', + builder: (context, params) => const QrCodePageWidget(), ) ].map((r) => r.toRoute(appStateNotifier)).toList(), ); diff --git a/lib/flutter_flow/nav/serialization_util.dart b/lib/flutter_flow/nav/serialization_util.dart index 6b818a9c..98fd266a 100644 --- a/lib/flutter_flow/nav/serialization_util.dart +++ b/lib/flutter_flow/nav/serialization_util.dart @@ -153,6 +153,7 @@ enum ParamType { FFPlace, FFUploadedFile, JSON, + DataStruct, Enum, } diff --git a/lib/index.dart b/lib/index.dart index 1ec344c0..e7526939 100644 --- a/lib/index.dart +++ b/lib/index.dart @@ -15,3 +15,4 @@ export '/pages/liberation_history/liberation_history_widget.dart' export '/pages/sign_in_page/sign_in_page_widget.dart' show SignInPageWidget; export '/pages/sign_up_page/sign_up_page_widget.dart' show SignUpPageWidget; export '/pages/welcome_page/welcome_page_widget.dart' show WelcomePageWidget; +export '/pages/qr_code_page/qr_code_page_widget.dart' show QrCodePageWidget; diff --git a/lib/pages/acess_history_page/acess_history_page_widget.dart b/lib/pages/acess_history_page/acess_history_page_widget.dart index e6571428..8b4f8b03 100644 --- a/lib/pages/acess_history_page/acess_history_page_widget.dart +++ b/lib/pages/acess_history_page/acess_history_page_widget.dart @@ -173,6 +173,7 @@ class _AcessHistoryPageWidgetState extends State { ); } final wrapGetAccessResponse = snapshot.data!; + return Builder( builder: (context) { final accessHistory = PhpGroup.getAccessCall @@ -181,6 +182,7 @@ class _AcessHistoryPageWidgetState extends State { ) ?.toList() ?? []; + return Wrap( spacing: 2.0, runSpacing: 1.0, diff --git a/lib/pages/liberation_history/liberation_history_widget.dart b/lib/pages/liberation_history/liberation_history_widget.dart index 8b53a1eb..40af9b56 100644 --- a/lib/pages/liberation_history/liberation_history_widget.dart +++ b/lib/pages/liberation_history/liberation_history_widget.dart @@ -82,6 +82,7 @@ class _LiberationHistoryWidgetState extends State { ), actions: const [], centerTitle: true, + elevation: 0.0, ), body: SafeArea( top: true, @@ -207,6 +208,7 @@ class _LiberationHistoryWidgetState extends State { ); } final columnGetLiberationsResponse = snapshot.data!; + return Builder( builder: (context) { final liberationHistory = PhpGroup.getLiberationsCall @@ -215,6 +217,7 @@ class _LiberationHistoryWidgetState extends State { ) ?.toList() ?? []; + return SingleChildScrollView( child: Column( mainAxisSize: MainAxisSize.max, diff --git a/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart b/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart index 81244b0f..8aca37f8 100644 --- a/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart +++ b/lib/pages/people_on_the_property_page/people_on_the_property_page_widget.dart @@ -80,6 +80,7 @@ class _PeopleOnThePropertyPageWidgetState ), actions: const [], centerTitle: true, + elevation: 0.0, ), body: SafeArea( top: true, @@ -105,6 +106,7 @@ class _PeopleOnThePropertyPageWidgetState ); } final columnGetPessoasLocalResponse = snapshot.data!; + return Builder( builder: (context) { final getPoepleProperty = PhpGroup.getPessoasLocalCall @@ -113,6 +115,7 @@ class _PeopleOnThePropertyPageWidgetState ) ?.toList() ?? []; + return Column( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, diff --git a/lib/pages/qr_code_page/qr_code_page_model.dart b/lib/pages/qr_code_page/qr_code_page_model.dart new file mode 100644 index 00000000..1c96dd84 --- /dev/null +++ b/lib/pages/qr_code_page/qr_code_page_model.dart @@ -0,0 +1,32 @@ +import '/flutter_flow/flutter_flow_util.dart'; +import 'dart:async'; +import 'qr_code_page_widget.dart' show QrCodePageWidget; +import 'package:flutter/material.dart'; + +class QrCodePageModel extends FlutterFlowModel { + /// Local state fields for this page. + + bool isAccess = false; + + String? key; + + DateTime? time; + + /// State fields for stateful widgets in this page. + + final unfocusNode = FocusNode(); + + @override + void initState(BuildContext context) {} + + @override + void dispose() { + unfocusNode.dispose(); + } + + /// Action blocks. + Future qrCodeEncoder( + BuildContext context, { + required String? key, + }) async {} +} diff --git a/lib/pages/qr_code_page/qr_code_page_widget.dart b/lib/pages/qr_code_page/qr_code_page_widget.dart new file mode 100644 index 00000000..3d37a4c5 --- /dev/null +++ b/lib/pages/qr_code_page/qr_code_page_widget.dart @@ -0,0 +1,374 @@ +import '/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart'; +import '/flutter_flow/flutter_flow_animations.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 'dart:async'; +import '/flutter_flow/custom_functions.dart' as functions; +import 'package:barcode_widget/barcode_widget.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/scheduler.dart'; +import 'package:flutter_animate/flutter_animate.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:percent_indicator/percent_indicator.dart'; +import 'qr_code_page_model.dart'; +export 'qr_code_page_model.dart'; + +class QrCodePageWidget extends StatefulWidget { + const QrCodePageWidget({super.key}); + + @override + State createState() => _QrCodePageWidgetState(); +} + +class _QrCodePageWidgetState extends State + with TickerProviderStateMixin { + late QrCodePageModel _model; + + final scaffoldKey = GlobalKey(); + + final animationsMap = {}; + + @override + void initState() { + super.initState(); + _model = createModel(context, () => QrCodePageModel()); + + // On page load action. + SchedulerBinding.instance.addPostFrameCallback((_) async { + if (animationsMap['barcodeOnActionTriggerAnimation'] != null) { + animationsMap['barcodeOnActionTriggerAnimation']!.controller.repeat(); + } + }); + + animationsMap.addAll({ + 'barcodeOnActionTriggerAnimation': AnimationInfo( + trigger: AnimationTrigger.onActionTrigger, + applyInitialState: true, + effectsBuilder: () => [ + VisibilityEffect(duration: 1.ms), + BlurEffect( + curve: Curves.linear, + delay: 0.0.ms, + duration: 600.0.ms, + begin: const Offset(0.0, 0.0), + end: const Offset(4.0, 4.0), + ), + ], + ), + }); + setupAnimations( + animationsMap.values.where((anim) => + anim.trigger == AnimationTrigger.onActionTrigger || + !anim.applyInitialState), + this, + ); + } + + @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, + 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( + 'ku7jqe53' /* QR Code de Acesso */, + ), + style: FlutterFlowTheme.of(context).headlineMedium.override( + fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).headlineMediumFamily), + ), + ), + actions: const [], + centerTitle: true, + elevation: 0.0, + ), + body: SafeArea( + top: true, + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + if (_model.isAccess == true) + Text( + FFLocalizations.of(context).getText( + 'vd84zgfe' /* Use esse QR Code para acesso */, + ), + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, + fontSize: 20.0, + letterSpacing: 0.0, + fontWeight: FontWeight.bold, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), + ), + ), + Stack( + children: [ + Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: BarcodeWidget( + data: 'Barcode', + barcode: Barcode.qrCode(), + width: 300.0, + height: 200.0, + color: FlutterFlowTheme.of(context).primaryText, + backgroundColor: Colors.transparent, + errorBuilder: (context, error) => const SizedBox( + width: 300.0, + height: 200.0, + ), + drawText: false, + ).animateOnActionTrigger( + animationsMap['barcodeOnActionTriggerAnimation']!, + ), + ), + if (_model.isAccess == true) + Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onLongPress: () async { + await _model.qrCodeEncoder( + context, + key: _model.key, + ); + setState(() {}); + }, + child: Container( + width: 200.0, + height: 200.0, + decoration: const BoxDecoration(), + child: Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: FFButtonWidget( + onPressed: () async { + await showModalBottomSheet( + isScrollControlled: true, + backgroundColor: Colors.transparent, + 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: + QrCodePassKeyTemplateComponentWidget( + toggleActionStatus: (key) async { + _model.key = key; + setState(() {}); + }, + ), + ), + ); + }, + ).then((value) => safeSetState(() {})); + + unawaited( + () async { + await _model.qrCodeEncoder( + context, + key: _model.key, + ); + setState(() {}); + }(), + ); + if (animationsMap[ + 'barcodeOnActionTriggerAnimation'] != + null) { + animationsMap[ + 'barcodeOnActionTriggerAnimation']! + .controller + .reverse(); + } + if (animationsMap[ + 'barcodeOnActionTriggerAnimation'] != + null) { + animationsMap[ + 'barcodeOnActionTriggerAnimation']! + .controller + .stop(); + } + _model.isAccess = !_model.isAccess; + setState(() {}); + }, + text: FFLocalizations.of(context).getText( + 'mxdrsbmy' /* Liberar QR Code */, + ), + options: FFButtonOptions( + height: 40.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).primary, + textStyle: FlutterFlowTheme.of(context) + .titleSmall + .override( + fontFamily: FlutterFlowTheme.of(context) + .titleSmallFamily, + color: Colors.white, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .titleSmallFamily), + ), + elevation: 3.0, + borderSide: const BorderSide( + color: Colors.transparent, + width: 1.0, + ), + borderRadius: BorderRadius.circular(8.0), + ), + ), + ), + ), + ), + ), + ], + ), + if (_model.isAccess == true) + Container( + width: 300.0, + decoration: const BoxDecoration(), + child: Visibility( + visible: _model.isAccess == true, + child: Text( + FFLocalizations.of(context).getText( + '6z6kvmhl' /* Certifique-se de que o QRCode ... */, + ), + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), + ), + ), + ), + ), + if (_model.isAccess == true) + Container( + width: 250.0, + height: 80.0, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(100.0), + border: Border.all( + color: FlutterFlowTheme.of(context).primary, + ), + ), + child: Row( + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 10.0, 0.0, 0.0, 0.0), + child: Text( + FFLocalizations.of(context).getText( + 'wkjkxd2e' /* Trocando QR code em */, + ), + textAlign: TextAlign.center, + 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), + ), + ), + ), + ), + Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 0.0, 0.0, 20.0, 0.0), + child: CircularPercentIndicator( + percent: functions.getProgressValue(1), + radius: 30.0, + lineWidth: 7.0, + animation: true, + animateFromLastPercent: true, + progressColor: FlutterFlowTheme.of(context).primary, + backgroundColor: + FlutterFlowTheme.of(context).primaryText, + center: Text( + FFLocalizations.of(context).getText( + '3bfr2tjr' /* 20 */, + ), + style: FlutterFlowTheme.of(context) + .headlineSmall + .override( + fontFamily: FlutterFlowTheme.of(context) + .headlineSmallFamily, + fontSize: 14.0, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .headlineSmallFamily), + ), + ), + startAngle: 20.0, + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/register_visitor_page/register_visitor_page_widget.dart b/lib/pages/register_visitor_page/register_visitor_page_widget.dart index 6cde8df2..6f9e7722 100644 --- a/lib/pages/register_visitor_page/register_visitor_page_widget.dart +++ b/lib/pages/register_visitor_page/register_visitor_page_widget.dart @@ -95,6 +95,7 @@ class _RegisterVisitorPageWidgetState extends State { ), actions: const [], centerTitle: true, + elevation: 0.0, ), body: SafeArea( top: true, diff --git a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart index 48fe146d..5c8824c1 100644 --- a/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart +++ b/lib/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart @@ -148,6 +148,7 @@ class _ScheduleCompleteVisitPageWidgetState ), actions: const [], centerTitle: true, + elevation: 0.0, ), body: SafeArea( top: true, @@ -253,6 +254,7 @@ class _ScheduleCompleteVisitPageWidgetState .visitorJsonList .map((e) => e) .toList(); + return ListView.separated( padding: const EdgeInsets.fromLTRB( 0, @@ -1556,6 +1558,7 @@ class _ScheduleCompleteVisitPageWidgetState } final dropDownGetDadosResponse = snapshot.data!; + return FlutterFlowDropDown< String>( controller: _model @@ -1729,6 +1732,7 @@ class _ScheduleCompleteVisitPageWidgetState } final dropDownGetDadosResponse = snapshot.data!; + return FlutterFlowDropDown< String>( controller: _model @@ -2287,6 +2291,7 @@ class _ScheduleCompleteVisitPageWidgetState ); } final wrapGetVisitsResponse = snapshot.data!; + return Builder( builder: (context) { final visitaWrap = PhpGroup.getVisitsCall @@ -2295,6 +2300,7 @@ class _ScheduleCompleteVisitPageWidgetState ) ?.toList() ?? []; + return Wrap( spacing: 2.0, runSpacing: 1.0, diff --git a/lib/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart b/lib/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart index 7b83d261..b8528fa3 100644 --- a/lib/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart +++ b/lib/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart @@ -89,7 +89,7 @@ class _ScheduleProvisionalVisitPageWidgetState ), actions: const [], centerTitle: true, - elevation: 2.0, + elevation: 0.0, ), body: SingleChildScrollView( child: Column( diff --git a/pubspec.yaml b/pubspec.yaml index ce5e2ffe..1ddabaf0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,7 +26,9 @@ dependencies: flutter_localizations: sdk: flutter auto_size_text: 3.0.0 + barcode_widget: 2.0.3 cached_network_image: 3.3.1 + carousel_slider: 4.2.1 collection: 1.18.0 crop_your_image: 1.0.0 csv: 6.0.0 @@ -65,6 +67,7 @@ dependencies: path_provider_android: 2.2.5 path_provider_foundation: 2.4.0 path_provider_platform_interface: 2.1.2 + percent_indicator: 4.2.2 plugin_platform_interface: 2.1.8 provider: 6.1.2 shared_preferences: 2.2.2 From 32a9bdb555b5396b68024fd9053fae3cc02330cd Mon Sep 17 00:00:00 2001 From: FlutterFlow <140657486+FlutterFlowEng@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:07:02 +0000 Subject: [PATCH 4/5] add qrcode route --- ios/Runner.xcodeproj/project.pbxproj | 8 +- .../menu_component/menu_component_model.dart | 13 ++ .../menu_component/menu_component_widget.dart | 8 + .../menu_list_view_component_widget.dart | 184 ++++++++-------- .../menu_staggered_view_component_widget.dart | 198 ++++++++++-------- 5 files changed, 229 insertions(+), 182 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 8484ef10..0a8140d1 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -44,8 +44,8 @@ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 6436409327A31CD500820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; - 6436409E27A31CD600820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409427A31CD300820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409D27A31CD500820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ @@ -225,8 +225,8 @@ 6436409C27A31CD800820AF7 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 6436409327A31CD500820AF7 /* pt */, - 6436409E27A31CD600820AF7 /* en */, + 6436409427A31CD300820AF7 /* pt */, + 6436409D27A31CD500820AF7 /* en */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/lib/components/organism_components/menu_component/menu_component_model.dart b/lib/components/organism_components/menu_component/menu_component_model.dart index dbdc8fa8..d50f9dfe 100644 --- a/lib/components/organism_components/menu_component/menu_component_model.dart +++ b/lib/components/organism_components/menu_component/menu_component_model.dart @@ -101,4 +101,17 @@ class MenuComponentModel extends FlutterFlowModel { }, ); } + + Future accessQRCodeOptAction(BuildContext context) async { + context.pushNamed( + 'qrCodePage', + extra: { + kTransitionInfoKey: const TransitionInfo( + hasTransition: true, + transitionType: PageTransitionType.scale, + alignment: Alignment.bottomCenter, + ), + }, + ); + } } diff --git a/lib/components/organism_components/menu_component/menu_component_widget.dart b/lib/components/organism_components/menu_component/menu_component_widget.dart index ce462ffa..79afe54b 100644 --- a/lib/components/organism_components/menu_component/menu_component_widget.dart +++ b/lib/components/organism_components/menu_component/menu_component_widget.dart @@ -70,6 +70,10 @@ class _MenuComponentWidgetState extends State { await _model.liberationHistoryOptAction(context); setState(() {}); }, + accessQRCodeOptAction: () async { + await _model.accessQRCodeOptAction(context); + setState(() {}); + }, ), ); } else { @@ -102,6 +106,10 @@ class _MenuComponentWidgetState extends State { await _model.liberationHistoryOptAction(context); setState(() {}); }, + accessQRCodeOptAction: () async { + await _model.accessQRCodeOptAction(context); + setState(() {}); + }, ), ); } diff --git a/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart index 3a3f82e2..0f7b62aa 100644 --- a/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart +++ b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart @@ -15,6 +15,7 @@ class MenuListViewComponentWidget extends StatefulWidget { required this.peopleOnThePropertyOptAction, required this.acessHistoryOptAction, required this.liberationHistoryOptAction, + required this.accessQRCodeOptAction, }); final Future Function()? changeMenuStyle; @@ -23,6 +24,7 @@ class MenuListViewComponentWidget extends StatefulWidget { final Future Function()? peopleOnThePropertyOptAction; final Future Function()? acessHistoryOptAction; final Future Function()? liberationHistoryOptAction; + final Future Function()? accessQRCodeOptAction; @override State createState() => @@ -509,102 +511,112 @@ Pet */ ), Padding( 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).alternate, - width: 0.5, + child: InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: () async { + await widget.accessQRCodeOptAction?.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.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.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( - 'l6b9o7yn' /* QR Code + 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( + 'l6b9o7yn' /* 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'), + ), ), - 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)), + ), ), ), ), diff --git a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart index 1249edee..5ff542ae 100644 --- a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart +++ b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart @@ -16,6 +16,7 @@ class MenuStaggeredViewComponentWidget extends StatefulWidget { required this.peopleOnThePropertyOptAction, required this.accessHistoryOptAction, required this.liberationHistoryOptAction, + required this.accessQRCodeOptAction, }); final Future Function()? changeMenuStyleAction; @@ -24,6 +25,7 @@ class MenuStaggeredViewComponentWidget extends StatefulWidget { final Future Function()? peopleOnThePropertyOptAction; final Future Function()? accessHistoryOptAction; final Future Function()? liberationHistoryOptAction; + final Future Function()? accessQRCodeOptAction; @override State createState() => @@ -532,108 +534,120 @@ Pet */ ), ), ), - () => 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, + () => InkWell( + splashColor: Colors.transparent, + focusColor: Colors.transparent, + hoverColor: Colors.transparent, + highlightColor: Colors.transparent, + onTap: () async { + await widget.accessQRCodeOptAction?.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( - 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.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 + 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'), + ), ), - 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)), + ), ), ), ), From d7f3c754a99dd20cd86f4182a6380827f0d87b8e Mon Sep 17 00:00:00 2001 From: FlutterFlow <140657486+FlutterFlowEng@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:14:56 +0000 Subject: [PATCH 5/5] remove carousel of messageWell --- ios/Runner.xcodeproj/project.pbxproj | 8 +++--- .../message_well_component_model.dart | 7 ------ .../message_well_component_widget.dart | 25 ------------------- pubspec.yaml | 1 - 4 files changed, 4 insertions(+), 37 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 0a8140d1..1f9d87a2 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -44,8 +44,8 @@ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 6436409427A31CD300820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; - 6436409D27A31CD500820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409227A31CD600820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; }; + 6436409227A31CDA00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ @@ -225,8 +225,8 @@ 6436409C27A31CD800820AF7 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( - 6436409427A31CD300820AF7 /* pt */, - 6436409D27A31CD500820AF7 /* en */, + 6436409227A31CD600820AF7 /* pt */, + 6436409227A31CDA00820AF7 /* en */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/lib/components/organism_components/message_well_component/message_well_component_model.dart b/lib/components/organism_components/message_well_component/message_well_component_model.dart index 0c84c97e..3da2a723 100644 --- a/lib/components/organism_components/message_well_component/message_well_component_model.dart +++ b/lib/components/organism_components/message_well_component/message_well_component_model.dart @@ -1,16 +1,9 @@ import '/flutter_flow/flutter_flow_util.dart'; import 'message_well_component_widget.dart' show MessageWellComponentWidget; -import 'package:carousel_slider/carousel_slider.dart'; import 'package:flutter/material.dart'; class MessageWellComponentModel extends FlutterFlowModel { - /// State fields for stateful widgets in this component. - - // State field(s) for Carousel widget. - CarouselController? carouselController; - int carouselCurrentIndex = 1; - @override void initState(BuildContext context) {} diff --git a/lib/components/organism_components/message_well_component/message_well_component_widget.dart b/lib/components/organism_components/message_well_component/message_well_component_widget.dart index 8fbf856e..d8a5b8b8 100644 --- a/lib/components/organism_components/message_well_component/message_well_component_widget.dart +++ b/lib/components/organism_components/message_well_component/message_well_component_widget.dart @@ -1,7 +1,6 @@ import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; -import 'package:carousel_slider/carousel_slider.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'message_well_component_model.dart'; @@ -117,30 +116,6 @@ class _MessageWellComponentWidgetState ), ), ), - SizedBox( - width: double.infinity, - height: 180.0, - child: CarouselSlider( - items: [ - Container(), - Container(), - ], - carouselController: _model.carouselController ??= - CarouselController(), - options: CarouselOptions( - initialPage: 1, - viewportFraction: 0.5, - disableCenter: true, - enlargeCenterPage: true, - enlargeFactor: 0.25, - enableInfiniteScroll: true, - scrollDirection: Axis.vertical, - autoPlay: false, - onPageChanged: (index, _) => - _model.carouselCurrentIndex = index, - ), - ), - ), ], ), ), diff --git a/pubspec.yaml b/pubspec.yaml index 1ddabaf0..f0170cfa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,7 +28,6 @@ dependencies: auto_size_text: 3.0.0 barcode_widget: 2.0.3 cached_network_image: 3.3.1 - carousel_slider: 4.2.1 collection: 1.18.0 crop_your_image: 1.0.0 csv: 6.0.0