From e30337b16754cd12ef719da670bc9913abac9727 Mon Sep 17 00:00:00 2001 From: Jonatas Antunes Messias Date: Thu, 4 Jul 2024 11:00:12 -0300 Subject: [PATCH] some changes --- .flutter-plugins-dependencies | 2 +- lib/actions/actions.dart | 13 +- .../pushNotificationService.dart | 8 +- .../opt_modal/opt_modal_widget.dart | 10 +- .../card_item_template_component_widget.dart | 7 +- ...isit_request_template_component_model.dart | 7 + ...sit_request_template_component_widget.dart | 212 +- lib/flutter_flow/nav/nav.dart | 2 +- lib/main.dart | 10 + lib/pages/home_page/home_page_widget.dart | 184 +- .../liberation_history_widget.dart | 309 +- .../schedule_complete_visit_page_model.dart | 20 + .../schedule_complete_visit_page_widget.dart | 5024 ++++++++--------- lib/pages/test_page/test_page.dart | 12 + pubspec.lock | 8 + pubspec.yaml | 1 + 16 files changed, 2669 insertions(+), 3160 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index e7eac25d..9e46f4a2 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-10.1.0\\\\","native_build":true,"dependencies":[]},{"name":"file_picker","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_picker-8.0.5\\\\","native_build":true,"dependencies":[]},{"name":"firebase_analytics","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_analytics-11.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-3.1.0\\\\","native_build":true,"dependencies":[]},{"name":"firebase_messaging","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_messaging-15.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_inappwebview_ios","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_inappwebview_ios-1.0.13\\\\","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_local_notifications-17.1.2\\\\","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage-9.2.2\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_ios","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_ios-0.8.12\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\sqflite-2.3.3+1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_ios","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_ios-6.3.0\\\\","native_build":true,"dependencies":[]},{"name":"video_player_avfoundation","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\video_player_avfoundation-2.6.1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"webview_flutter_wkwebview","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\webview_flutter_wkwebview-3.13.1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-10.1.0\\\\","native_build":true,"dependencies":[]},{"name":"file_picker","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_picker-8.0.5\\\\","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_analytics","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_analytics-11.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-3.1.0\\\\","native_build":true,"dependencies":[]},{"name":"firebase_messaging","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_messaging-15.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_inappwebview_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_inappwebview_android-1.0.13\\\\","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_local_notifications-17.1.2\\\\","native_build":true,"dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_plugin_android_lifecycle-2.0.20\\\\","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage-9.2.2\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_android-0.8.12+3\\\\","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_android-2.2.5\\\\","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_android-2.2.3\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\sqflite-2.3.3+1\\\\","native_build":true,"dependencies":[]},{"name":"url_launcher_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_android-6.3.3\\\\","native_build":true,"dependencies":[]},{"name":"video_player_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\video_player_android-2.5.0\\\\","native_build":true,"dependencies":[]},{"name":"webview_flutter_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\webview_flutter_android-3.16.4\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-10.1.0\\\\","native_build":true,"dependencies":[]},{"name":"file_selector_macos","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_selector_macos-0.9.4\\\\","native_build":true,"dependencies":[]},{"name":"firebase_analytics","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_analytics-11.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-3.1.0\\\\","native_build":true,"dependencies":[]},{"name":"firebase_messaging","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_messaging-15.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_inappwebview_macos","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_inappwebview_macos-1.0.11\\\\","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_local_notifications-17.1.2\\\\","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage_macos","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage_macos-3.1.2\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_macos","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_macos-0.2.1+1\\\\","native_build":false,"dependencies":["file_selector_macos"]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\sqflite-2.3.3+1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_macos","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_macos-3.2.0\\\\","native_build":true,"dependencies":[]},{"name":"video_player_avfoundation","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\video_player_avfoundation-2.6.1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-10.1.0\\\\","native_build":false,"dependencies":[]},{"name":"file_selector_linux","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_selector_linux-0.9.2+1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage_linux","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage_linux-1.2.1\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_linux","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_linux-0.2.1+1\\\\","native_build":false,"dependencies":["file_selector_linux"]},{"name":"path_provider_linux","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_linux-2.3.2\\\\","native_build":false,"dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_linux-3.1.1\\\\","native_build":true,"dependencies":[]}],"windows":[{"name":"device_info_plus","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-10.1.0\\\\","native_build":false,"dependencies":[]},{"name":"file_selector_windows","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_selector_windows-0.9.3+1\\\\","native_build":true,"dependencies":[]},{"name":"firebase_core","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-3.1.0\\\\","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage_windows","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage_windows-3.1.2\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_windows","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_windows-0.2.1+1\\\\","native_build":false,"dependencies":["file_selector_windows"]},{"name":"path_provider_windows","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_windows-2.2.1\\\\","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_windows-2.3.2\\\\","native_build":false,"dependencies":["path_provider_windows"]},{"name":"url_launcher_windows","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_windows-3.1.1\\\\","native_build":true,"dependencies":[]}],"web":[{"name":"device_info_plus","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-10.1.0\\\\","dependencies":[]},{"name":"file_picker","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_picker-8.0.5\\\\","dependencies":[]},{"name":"firebase_analytics_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_analytics_web-0.5.7+9\\\\","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core_web-2.17.2\\\\","dependencies":[]},{"name":"firebase_messaging_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_messaging_web-3.8.9\\\\","dependencies":["firebase_core_web"]},{"name":"flutter_inappwebview_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_inappwebview_web-1.0.8\\\\","dependencies":[]},{"name":"flutter_secure_storage_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage_web-1.2.1\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_for_web-3.0.4\\\\","dependencies":[]},{"name":"shared_preferences_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_web-2.3.0\\\\","dependencies":[]},{"name":"url_launcher_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_web-2.3.1\\\\","dependencies":[]},{"name":"video_player_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\video_player_web-2.3.1\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"file_selector_linux","dependencies":[]},{"name":"file_selector_macos","dependencies":[]},{"name":"file_selector_windows","dependencies":[]},{"name":"firebase_analytics","dependencies":["firebase_analytics_web","firebase_core"]},{"name":"firebase_analytics_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":["firebase_core","firebase_messaging_web"]},{"name":"firebase_messaging_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"flutter_inappwebview","dependencies":["flutter_inappwebview_android","flutter_inappwebview_ios","flutter_inappwebview_macos","flutter_inappwebview_web"]},{"name":"flutter_inappwebview_android","dependencies":[]},{"name":"flutter_inappwebview_ios","dependencies":[]},{"name":"flutter_inappwebview_macos","dependencies":[]},{"name":"flutter_inappwebview_web","dependencies":[]},{"name":"flutter_local_notifications","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios","image_picker_linux","image_picker_macos","image_picker_windows"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]},{"name":"image_picker_linux","dependencies":["file_selector_linux"]},{"name":"image_picker_macos","dependencies":["file_selector_macos"]},{"name":"image_picker_windows","dependencies":["file_selector_windows"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]},{"name":"video_player","dependencies":["video_player_android","video_player_avfoundation","video_player_web"]},{"name":"video_player_android","dependencies":[]},{"name":"video_player_avfoundation","dependencies":[]},{"name":"video_player_web","dependencies":[]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2024-07-03 09:21:02.878961","version":"3.22.2"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-10.1.0\\\\","native_build":true,"dependencies":[]},{"name":"file_picker","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_picker-8.0.5\\\\","native_build":true,"dependencies":[]},{"name":"firebase_analytics","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_analytics-11.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-3.1.0\\\\","native_build":true,"dependencies":[]},{"name":"firebase_messaging","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_messaging-15.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_inappwebview_ios","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_inappwebview_ios-1.0.13\\\\","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_local_notifications-17.1.2\\\\","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage-9.2.2\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_ios","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_ios-0.8.12\\\\","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\sqflite-2.3.3+1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_ios","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_ios-6.3.0\\\\","native_build":true,"dependencies":[]},{"name":"video_player_avfoundation","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\video_player_avfoundation-2.6.1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"webview_flutter_wkwebview","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\webview_flutter_wkwebview-3.13.1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-10.1.0\\\\","native_build":true,"dependencies":[]},{"name":"file_picker","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_picker-8.0.5\\\\","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_analytics","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_analytics-11.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-3.1.0\\\\","native_build":true,"dependencies":[]},{"name":"firebase_messaging","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_messaging-15.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_inappwebview_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_inappwebview_android-1.0.13\\\\","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_local_notifications-17.1.2\\\\","native_build":true,"dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_plugin_android_lifecycle-2.0.20\\\\","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage-9.2.2\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_android-0.8.12+3\\\\","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_android-2.2.5\\\\","native_build":true,"dependencies":[]},{"name":"shared_preferences_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_android-2.2.3\\\\","native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\sqflite-2.3.3+1\\\\","native_build":true,"dependencies":[]},{"name":"url_launcher_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_android-6.3.3\\\\","native_build":true,"dependencies":[]},{"name":"video_player_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\video_player_android-2.5.0\\\\","native_build":true,"dependencies":[]},{"name":"webview_flutter_android","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\webview_flutter_android-3.16.4\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-10.1.0\\\\","native_build":true,"dependencies":[]},{"name":"file_selector_macos","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_selector_macos-0.9.4\\\\","native_build":true,"dependencies":[]},{"name":"firebase_analytics","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_analytics-11.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-3.1.0\\\\","native_build":true,"dependencies":[]},{"name":"firebase_messaging","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_messaging-15.0.1\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"flutter_inappwebview_macos","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_inappwebview_macos-1.0.11\\\\","native_build":true,"dependencies":[]},{"name":"flutter_local_notifications","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_local_notifications-17.1.2\\\\","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage_macos","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage_macos-3.1.2\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_macos","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_macos-0.2.1+1\\\\","native_build":false,"dependencies":["file_selector_macos"]},{"name":"path_provider_foundation","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"shared_preferences_foundation","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"sqflite","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\sqflite-2.3.3+1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]},{"name":"url_launcher_macos","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_macos-3.2.0\\\\","native_build":true,"dependencies":[]},{"name":"video_player_avfoundation","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\video_player_avfoundation-2.6.1\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-10.1.0\\\\","native_build":false,"dependencies":[]},{"name":"file_selector_linux","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_selector_linux-0.9.2+1\\\\","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage_linux","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage_linux-1.2.1\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_linux","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_linux-0.2.1+1\\\\","native_build":false,"dependencies":["file_selector_linux"]},{"name":"path_provider_linux","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_linux-2.3.2\\\\","native_build":false,"dependencies":["path_provider_linux"]},{"name":"url_launcher_linux","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_linux-3.1.1\\\\","native_build":true,"dependencies":[]}],"windows":[{"name":"device_info_plus","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-10.1.0\\\\","native_build":false,"dependencies":[]},{"name":"file_selector_windows","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_selector_windows-0.9.3+1\\\\","native_build":true,"dependencies":[]},{"name":"firebase_core","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-3.1.0\\\\","native_build":true,"dependencies":[]},{"name":"flutter_secure_storage_windows","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage_windows-3.1.2\\\\","native_build":true,"dependencies":[]},{"name":"image_picker_windows","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_windows-0.2.1+1\\\\","native_build":false,"dependencies":["file_selector_windows"]},{"name":"path_provider_windows","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_windows-2.2.1\\\\","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_windows-2.3.2\\\\","native_build":false,"dependencies":["path_provider_windows"]},{"name":"url_launcher_windows","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_windows-3.1.1\\\\","native_build":true,"dependencies":[]}],"web":[{"name":"device_info_plus","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-10.1.0\\\\","dependencies":[]},{"name":"file_picker","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\file_picker-8.0.5\\\\","dependencies":[]},{"name":"firebase_analytics_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_analytics_web-0.5.7+9\\\\","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core_web-2.17.2\\\\","dependencies":[]},{"name":"firebase_messaging_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_messaging_web-3.8.9\\\\","dependencies":["firebase_core_web"]},{"name":"flutter_inappwebview_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_inappwebview_web-1.0.8\\\\","dependencies":[]},{"name":"flutter_secure_storage_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\flutter_secure_storage_web-1.2.1\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\image_picker_for_web-3.0.4\\\\","dependencies":[]},{"name":"shared_preferences_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\shared_preferences_web-2.3.0\\\\","dependencies":[]},{"name":"url_launcher_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_web-2.3.1\\\\","dependencies":[]},{"name":"video_player_web","path":"C:\\\\Users\\\\jantu\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\video_player_web-2.3.1\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"file_selector_linux","dependencies":[]},{"name":"file_selector_macos","dependencies":[]},{"name":"file_selector_windows","dependencies":[]},{"name":"firebase_analytics","dependencies":["firebase_analytics_web","firebase_core"]},{"name":"firebase_analytics_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":["firebase_core","firebase_messaging_web"]},{"name":"firebase_messaging_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"flutter_inappwebview","dependencies":["flutter_inappwebview_android","flutter_inappwebview_ios","flutter_inappwebview_macos","flutter_inappwebview_web"]},{"name":"flutter_inappwebview_android","dependencies":[]},{"name":"flutter_inappwebview_ios","dependencies":[]},{"name":"flutter_inappwebview_macos","dependencies":[]},{"name":"flutter_inappwebview_web","dependencies":[]},{"name":"flutter_local_notifications","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios","image_picker_linux","image_picker_macos","image_picker_windows"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]},{"name":"image_picker_linux","dependencies":["file_selector_linux"]},{"name":"image_picker_macos","dependencies":["file_selector_macos"]},{"name":"image_picker_windows","dependencies":["file_selector_windows"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]},{"name":"video_player","dependencies":["video_player_android","video_player_avfoundation","video_player_web"]},{"name":"video_player_android","dependencies":[]},{"name":"video_player_avfoundation","dependencies":[]},{"name":"video_player_web","dependencies":[]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2024-07-04 10:36:56.582501","version":"3.22.2"} \ No newline at end of file diff --git a/lib/actions/actions.dart b/lib/actions/actions.dart index 7dc0b7f9..24ed29cc 100644 --- a/lib/actions/actions.dart +++ b/lib/actions/actions.dart @@ -1,15 +1,12 @@ -import 'package:f_r_e_hub/backend/push_notification/pushNotificationService.dart'; -import 'package:firebase_messaging/firebase_messaging.dart'; -import 'package:flutter/widgets.dart'; +import 'package:flutter/material.dart'; +import '/actions/actions.dart' as action_blocks; import '/backend/api_requests/api_calls.dart'; import '/components/molecular_components/throw_exception/throw_exception_widget.dart'; +import '/custom_code/actions/index.dart' as actions; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; -import '/actions/actions.dart' as action_blocks; -import '/custom_code/actions/index.dart' as actions; import '/flutter_flow/random_data_util.dart' as random_data; -import 'package:flutter/material.dart'; Future repeatVisitScheduleAction( BuildContext context, { @@ -381,8 +378,8 @@ Future snackbar(BuildContext context, {required bool opt}) async { ), ), backgroundColor: opt - ? FlutterFlowTheme.of(context).success - : FlutterFlowTheme.of(context).error, + ? FlutterFlowTheme.of(context).success.withOpacity(0.5) + : FlutterFlowTheme.of(context).error.withOpacity(0.5), duration: const Duration(seconds: 3), behavior: SnackBarBehavior.floating, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), diff --git a/lib/backend/push_notification/pushNotificationService.dart b/lib/backend/push_notification/pushNotificationService.dart index 9291a8e1..3c819528 100644 --- a/lib/backend/push_notification/pushNotificationService.dart +++ b/lib/backend/push_notification/pushNotificationService.dart @@ -2,15 +2,16 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; import 'dart:math'; + +import 'package:f_r_e_hub/actions/actions.dart'; import 'package:f_r_e_hub/app_state.dart'; import 'package:f_r_e_hub/backend/api_requests/api_calls.dart'; import 'package:f_r_e_hub/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart'; -import 'package:flutter/material.dart'; +import 'package:f_r_e_hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; -import 'package:flutter_animate/flutter_animate.dart'; +import 'package:flutter/material.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:rxdart/rxdart.dart'; -import 'package:f_r_e_hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart'; class PushNotificationService { final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance; @@ -385,6 +386,7 @@ class NotificationHandler { vteUUID: message['idVisitante'].toString(), vawRef: message['referencia'].toString(), vawStatus: 'S', + changeStatusAction: changeStatusAction, ), ); }, diff --git a/lib/components/molecular_components/opt_modal/opt_modal_widget.dart b/lib/components/molecular_components/opt_modal/opt_modal_widget.dart index f8e97647..fa1c2411 100644 --- a/lib/components/molecular_components/opt_modal/opt_modal_widget.dart +++ b/lib/components/molecular_components/opt_modal/opt_modal_widget.dart @@ -141,10 +141,16 @@ class _OptModalWidgetState extends State { }, activeColor: FlutterFlowTheme.of(context).primary, checkColor: FlutterFlowTheme.of(context).info, + checkboxShape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(100), + ), + enableFeedback: true, side: BorderSide( - width: 2, + width: 10, color: FlutterFlowTheme.of(context).secondaryText, ), + controlAffinity: + ListTileControlAffinity.leading, // Adiciona esta linha ); }, ), @@ -175,7 +181,7 @@ class _OptModalWidgetState extends State { padding: const EdgeInsetsDirectional.fromSTEB(0.0, 50.0, 50.0, 0.0), child: Container( width: 300.0, - height: 500.0, + height: 450.0, decoration: BoxDecoration( color: FlutterFlowTheme.of(context).primaryBackground, borderRadius: BorderRadius.circular(24.0), 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 index c437eb34..3412babe 100644 --- 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 @@ -69,6 +69,7 @@ class _CardItemTemplateComponentWidgetState @override Widget build(BuildContext context) { context.watch(); + debugPrint('imageHashMap: ${widget.imageHashMap}'); return InkWell( splashColor: Colors.transparent, @@ -110,6 +111,7 @@ class _CardItemTemplateComponentWidgetState child: ListView.builder( shrinkWrap: true, itemCount: labelsLinkedHashMap.length, + physics: const NeverScrollableScrollPhysics(), itemBuilder: (context, index) { String key = labelsLinkedHashMap.keys.elementAt(index); @@ -146,7 +148,7 @@ class _CardItemTemplateComponentWidgetState .primaryText, ), ), - SizedBox( + const SizedBox( width: 5.0), // Espaçamento entre o label e o valor Text( @@ -218,7 +220,8 @@ class _CardItemTemplateComponentWidgetState 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.imageHashMap['key']}&tipo=${widget.imageHashMap['value']}', + // 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${widget.imageHashMap['key']}&tipo=${widget.imageHashMap['value']}', + 'https://freaccess.com.br/freaccess/getImage.php?cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${widget.imageHashMap['key']}&tipo=${widget.imageHashMap['value']}', '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/components/templates_components/visit_request_template_component/visit_request_template_component_model.dart b/lib/components/templates_components/visit_request_template_component/visit_request_template_component_model.dart index 8585dbed..965cbd4b 100644 --- a/lib/components/templates_components/visit_request_template_component/visit_request_template_component_model.dart +++ b/lib/components/templates_components/visit_request_template_component/visit_request_template_component_model.dart @@ -29,6 +29,10 @@ class VisitRequestTemplateComponentModel TextEditingController? textController5; String? Function(BuildContext, String?)? textController5Validator; + FocusNode? textFieldFocusNodeStatus; + TextEditingController? textControllerStatus; + String? Function(BuildContext, String?)? textControllerStatusValidator; + @override void initState(BuildContext context) {} @@ -48,5 +52,8 @@ class VisitRequestTemplateComponentModel textFieldFocusNode5?.dispose(); textController5?.dispose(); + + textFieldFocusNodeStatus?.dispose(); + textControllerStatus?.dispose(); } } diff --git a/lib/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart b/lib/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart index cda5e47a..59ac857a 100644 --- a/lib/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart +++ b/lib/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart @@ -1,13 +1,13 @@ -import 'package:f_r_e_hub/backend/push_notification/pushNotificationService.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:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; + +import '/flutter_flow/flutter_flow_icon_button.dart'; +import '/flutter_flow/flutter_flow_theme.dart'; +import '/flutter_flow/flutter_flow_util.dart'; import 'visit_request_template_component_model.dart'; + export 'visit_request_template_component_model.dart'; class VisitRequestTemplateComponentWidget extends StatefulWidget { @@ -85,6 +85,10 @@ class _VisitRequestTemplateComponentWidgetState _model.textController5 ??= TextEditingController(); _model.textFieldFocusNode5 ??= FocusNode(); + + _model.textControllerStatus ??= + TextEditingController(text: widget.vawStatus); + _model.textFieldFocusNodeStatus ??= FocusNode(); } @override @@ -144,61 +148,61 @@ class _VisitRequestTemplateComponentWidgetState fit: BoxFit.cover, ), ), - Container( - width: 153.0, - height: 25.0, - decoration: BoxDecoration( - color: () { - if (widget.vawStatus == 'L') { - return FlutterFlowTheme.of(context).primary; - } else if (widget.vawStatus == 'B') { - return FlutterFlowTheme.of(context).error; - } else if (widget.vawStatus == 'S') { - return FlutterFlowTheme.of(context).warning; - } else { - return FlutterFlowTheme.of(context).warning; - } - }(), - borderRadius: BorderRadius.circular(16.0), - ), - child: Align( - alignment: const AlignmentDirectional(0.0, 0.0), - child: Text( - () { - if (widget.vawStatus == 'L') { - return FFLocalizations.of(context) - .getVariableText( - ptText: 'Ativo', - enText: 'Active', - ); - } else if (widget.vawStatus == 'B') { - return FFLocalizations.of(context) - .getVariableText( - ptText: 'Bloqueado', - enText: 'Blocked', - ); - } else { - return FFLocalizations.of(context) - .getVariableText( - ptText: 'Pendente', - enText: 'Pending', - ); - } - }(), - style: FlutterFlowTheme.of(context) - .bodyMedium - .override( - fontFamily: FlutterFlowTheme.of(context) - .bodyMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey( - FlutterFlowTheme.of(context) - .bodyMediumFamily), - ), - ), - ), - ), + // Container( + // width: 153.0, + // height: 25.0, + // decoration: BoxDecoration( + // color: () { + // if (widget.vawStatus == 'L') { + // return FlutterFlowTheme.of(context).primary; + // } else if (widget.vawStatus == 'B') { + // return FlutterFlowTheme.of(context).error; + // } else if (widget.vawStatus == 'S') { + // return FlutterFlowTheme.of(context).warning; + // } else { + // return FlutterFlowTheme.of(context).warning; + // } + // }(), + // borderRadius: BorderRadius.circular(16.0), + // ), + // child: Align( + // alignment: const AlignmentDirectional(0.0, 0.0), + // child: Text( + // () { + // if (widget.vawStatus == 'L') { + // return FFLocalizations.of(context) + // .getVariableText( + // ptText: 'Ativo', + // enText: 'Active', + // ); + // } else if (widget.vawStatus == 'B') { + // return FFLocalizations.of(context) + // .getVariableText( + // ptText: 'Bloqueado', + // enText: 'Blocked', + // ); + // } else { + // return FFLocalizations.of(context) + // .getVariableText( + // ptText: 'Pendente', + // enText: 'Pending', + // ); + // } + // }(), + // 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(height: 5.0)), ), ] @@ -367,6 +371,93 @@ class _VisitRequestTemplateComponentWidgetState // _model.textController2Validator.asValidator(context), // ), // ), + Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), + child: TextFormField( + // controller: _model.textControllerStatus, + // focusNode: _model.textFieldFocusNodeStatus, + autofocus: false, + canRequestFocus: false, + readOnly: true, + obscureText: false, + decoration: InputDecoration( + isDense: true, + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(10.0)), + filled: true, + fillColor: () { + if (widget.vawStatus == 'L') { + return FlutterFlowTheme.of(context).primary; + } else if (widget.vawStatus == 'B') { + return FlutterFlowTheme.of(context).error; + } else if (widget.vawStatus == 'S') { + return FlutterFlowTheme.of(context).warning; + } else { + return FlutterFlowTheme.of(context).warning; + } + }(), + labelText: () { + if (widget.vawStatus == 'L') { + return FFLocalizations.of(context).getVariableText( + ptText: 'Ativo', + enText: 'Active', + ); + } else if (widget.vawStatus == 'B') { + return FFLocalizations.of(context).getVariableText( + ptText: 'Bloqueado', + enText: 'Blocked', + ); + } else { + return FFLocalizations.of(context).getVariableText( + ptText: 'Pendente', + enText: 'Pending', + ); + } + }(), + 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), + ), + 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), + ), + focusedBorder: InputBorder.none, + errorBorder: InputBorder.none, + focusedErrorBorder: InputBorder.none, + suffixIcon: Icon( + Icons.info, + 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, + keyboardType: TextInputType.name, + validator: + _model.textController1Validator.asValidator(context), + ), + ), Padding( padding: const EdgeInsetsDirectional.fromSTEB( 24.0, 0.0, 24.0, 0.0), @@ -603,6 +694,7 @@ class _VisitRequestTemplateComponentWidgetState _model.textController4Validator.asValidator(context), ), ), + if (widget.vawStatus == 'S') Padding( padding: const EdgeInsetsDirectional.fromSTEB( diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index b590e657..abb51c04 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -65,7 +65,7 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter( name: '_initialize', path: '/', builder: (context, _) => FFAppState().isLogged - ? const TestPage() + ? const HomePageWidget() : const WelcomePageWidget(), ), FFRoute( diff --git a/lib/main.dart b/lib/main.dart index 61b446eb..c9614d60 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -7,6 +7,7 @@ import 'package:firebase_core/firebase_core.dart'; import 'package:provider/provider.dart'; import 'package:flutter/material.dart'; +import 'package:responsive_framework/responsive_framework.dart'; import 'firebase_options.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_web_plugins/url_strategy.dart'; @@ -77,6 +78,15 @@ class _MyAppState extends State { Widget build(BuildContext context) { return MaterialApp.router( title: 'FREHub', + builder: (context, widget) => ResponsiveBreakpoints.builder( + child: BouncingScrollWrapper.builder(context, widget!), + breakpoints: [ + const Breakpoint(start: 0, end: 450, name: MOBILE), + const Breakpoint(start: 451, end: 800, name: TABLET), + const Breakpoint(start: 801, end: 1920, name: DESKTOP), + const Breakpoint(start: 1921, end: double.infinity, name: '4K'), + ], + ), localizationsDelegates: const [ FFLocalizationsDelegate(), GlobalMaterialLocalizations.delegate, diff --git a/lib/pages/home_page/home_page_widget.dart b/lib/pages/home_page/home_page_widget.dart index 33fbd00a..c9efebc4 100644 --- a/lib/pages/home_page/home_page_widget.dart +++ b/lib/pages/home_page/home_page_widget.dart @@ -110,109 +110,99 @@ class _HomePageWidgetState extends State { child: Column( mainAxisSize: MainAxisSize.max, children: [ - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Flexible( - child: Container( - width: double.infinity, - decoration: const BoxDecoration(), - child: Row( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - width: 50.0, - height: 50.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', + Padding( + padding: const EdgeInsets.fromLTRB(30, 30, 10, 0), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Flexible( + child: Container( + width: double.infinity, + decoration: const BoxDecoration(), + child: Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + width: 50.0, + height: 50.0, + clipBehavior: Clip.antiAlias, + decoration: const BoxDecoration( + shape: BoxShape.circle, ), - fit: BoxFit.cover, - ), - ), - Flexible( - child: Row( - mainAxisSize: MainAxisSize.max, - children: [ - Container( - decoration: const BoxDecoration(), - child: Text( - FFLocalizations.of(context) - .getText( - 'lyiat6s2' /* NOME DO MORADOR */, - ), - style: FlutterFlowTheme.of( - context) - .bodyLarge - .override( - fontFamily: 'Nunito Sans', - color: FlutterFlowTheme.of( - context) - .primaryText, - fontSize: 14.0, - letterSpacing: 0.0, - fontWeight: - FontWeight.normal, - useGoogleFonts: - GoogleFonts.asMap() - .containsKey( - 'Nunito Sans'), - ), - ), + 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', ), - ].divide(const SizedBox(width: 20.0)), - ), - ), - ] - .divide(const SizedBox(width: 10.0)) - .addToStart(const SizedBox(width: 20.0)), - ), - ), - ), - Expanded( - child: Container( - height: 30.0, - decoration: const BoxDecoration(), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Flexible( - child: FlutterFlowIconButton( - borderRadius: 100.0, - borderWidth: 1.0, - buttonSize: 40.0, - icon: Icon( - Icons.close_sharp, - color: FlutterFlowTheme.of(context) - .primary, - size: 20.0, + fit: BoxFit.cover, ), - onPressed: () async { - if (scaffoldKey - .currentState!.isDrawerOpen || - scaffoldKey.currentState! - .isEndDrawerOpen) { - Navigator.pop(context); - } - }, ), - ), - ], + Flexible( + child: Text( + FFLocalizations.of(context).getText( + 'lyiat6s2' /* NOME DO MORADOR */, + ), + style: FlutterFlowTheme.of(context) + .bodyLarge + .override( + fontFamily: 'Nunito Sans', + color: + FlutterFlowTheme.of(context) + .primaryText, + fontSize: 14.0, + letterSpacing: 0.0, + fontWeight: FontWeight.normal, + useGoogleFonts: + GoogleFonts.asMap() + .containsKey( + 'Nunito Sans'), + ), + ), + ), + ].divide(const SizedBox(width: 20.0)), + ), ), ), - ), - ] - .divide(const SizedBox(width: 0.0)) - .around(const SizedBox(width: 0.0)), + Expanded( + child: Container( + height: 30.0, + decoration: const BoxDecoration(), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Flexible( + child: FlutterFlowIconButton( + borderRadius: 100.0, + borderWidth: 1.0, + buttonSize: 40.0, + icon: Icon( + Icons.close_sharp, + color: FlutterFlowTheme.of(context) + .primary, + size: 20.0, + ), + onPressed: () async { + if (scaffoldKey.currentState! + .isDrawerOpen || + scaffoldKey.currentState! + .isEndDrawerOpen) { + Navigator.pop(context); + } + }, + ), + ), + ], + ), + ), + ), + ] + .divide(const SizedBox(width: 0.0)) + .around(const SizedBox(width: 0.0)), + ), ), ].addToStart(const SizedBox(height: 30.0)), ), diff --git a/lib/pages/liberation_history/liberation_history_widget.dart b/lib/pages/liberation_history/liberation_history_widget.dart index 0e56fb51..4774b461 100644 --- a/lib/pages/liberation_history/liberation_history_widget.dart +++ b/lib/pages/liberation_history/liberation_history_widget.dart @@ -2,6 +2,7 @@ import 'package:f_r_e_hub/actions/actions.dart'; import 'package:f_r_e_hub/backend/push_notification/pushNotificationService.dart'; +import 'package:f_r_e_hub/components/templates_components/card_item_template_component/card_item_template_component_widget.dart'; import 'package:f_r_e_hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart'; import '/backend/api_requests/api_calls.dart'; @@ -107,15 +108,12 @@ Widget bodyLiberationHistoryPage( BuildContext context, LiberationHistoryModel _model) { return SafeArea( top: true, - child: Stack( + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, children: [ - liberationDynamicListView(context, _model), - Positioned( - top: 0, - left: 0, - right: 0, - bottom: 0, - child: searchBarContainer(context, _model)), + searchBarContainer(context, _model), + Expanded(child: liberationDynamicListView(context, _model)), ].addToStart(const SizedBox(height: 0)), ), ); @@ -272,7 +270,9 @@ Widget liberationDynamicListView( final liberationHistoryItem = filteredLiberationHistory[index]; return Padding( padding: EdgeInsets.only( - top: index == 0 ? 60.0 : 8.0, + top: index == 0 + ? MediaQuery.of(context).size.height * 0.075 + : 8.0, left: 8.0, right: 8.0, bottom: 8.0, @@ -294,8 +294,37 @@ Widget liberationDynamicListView( Widget liberationHistoryItemCard( BuildContext context, dynamic liberationHistoryItem) { - return InkWell( - onTap: () { + return CardItemTemplateComponentWidget( + imageHashMap: Map.from({ + 'key': liberationHistoryItem['VTE_ID'], + 'value': 'E', + }), + labelsHashMap: Map.from({ + 'Nome:': liberationHistoryItem['VTE_NOME'], + 'Data:': liberationHistoryItem['NOT_DTENVIO'], + 'Motivo:': liberationHistoryItem['NOT_MOTIVO'], + }), + statusHashMap: liberationHistoryItem['NOT_STATUS'] == 'L' + ? Map.from({ + FFLocalizations.of(context).getVariableText( + ptText: 'Ativo', + enText: 'Active', + ): FlutterFlowTheme.of(context).success, + }) + : liberationHistoryItem['NOT_STATUS'] == 'B' + ? Map.from({ + FFLocalizations.of(context).getVariableText( + ptText: 'Bloqueado', + enText: 'Blocked', + ): FlutterFlowTheme.of(context).error, + }) + : Map.from({ + FFLocalizations.of(context).getVariableText( + ptText: 'Pendente', + enText: 'Pending', + ): FlutterFlowTheme.of(context).warning, + }), + onTapCardItemAction: () async { showModalBottomSheet( isScrollControlled: true, isDismissible: true, @@ -345,263 +374,5 @@ Widget liberationHistoryItemCard( }); }); }, - 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: [ - Padding( - padding: - const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 10.0, 0.0), - child: ClipRRect( - borderRadius: BorderRadius.circular(100.0), - child: CachedNetworkImage( - fadeInDuration: const Duration(milliseconds: 500), - fadeOutDuration: const Duration(milliseconds: 500), - imageUrl: valueOrDefault( - "https://freaccess.com.br/freaccess/getImage.php?&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField( - liberationHistoryItem, - r'''$.VTE_ID''', - ).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: 100.0, - fit: BoxFit.cover, - ), - ), - ), - Expanded( - child: Container( - width: 100.0, - height: 100.0, - decoration: const BoxDecoration(), - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Align( - alignment: const AlignmentDirectional(-1.0, -1.0), - child: Text( - getJsonField( - liberationHistoryItem, - r'''$.VTE_NOME''', - ).toString(), - style: FlutterFlowTheme.of(context) - .bodyMedium - .override( - fontFamily: FlutterFlowTheme.of(context) - .bodyMediumFamily, - fontSize: 15.5, - letterSpacing: 0.0, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap() - .containsKey(FlutterFlowTheme.of(context) - .bodyMediumFamily), - ), - ), - ), - ] - .addToStart(const SizedBox(width: 10.0)) - .addToEnd(const SizedBox(width: 10.0)), - ), - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - FFLocalizations.of(context).getText( - 'dkzewokx' /* Date: */, - ), - 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( - (functions.jsonToStr(getJsonField( - liberationHistoryItem, - r'''$.NOT_STATUS''', - )) == - '"L"' - ? getJsonField( - liberationHistoryItem, - r'''$.NOT_DTRESPOSTA''', - ) - : getJsonField( - liberationHistoryItem, - r'''$.NOT_DTENVIO''', - )) - .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), - ), - ), - ] - .divide(const SizedBox(width: 10.0)) - .addToStart(const SizedBox(width: 10.0)), - ), - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Text( - FFLocalizations.of(context).getText( - '2s9avwbq' /* Motivo: */, - ), - 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( - liberationHistoryItem, - r'''$.NOT_MOTIVO''', - ).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), - ), - ), - ] - .divide(const SizedBox(width: 10.0)) - .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( - () { - if (liberationHistoryItem["NOT_STATUS"] == - 'L') { - return FlutterFlowTheme.of(context).success; - } else if (liberationHistoryItem[ - "NOT_STATUS"] == - 'B') { - return FlutterFlowTheme.of(context).error; - } else if (liberationHistoryItem[ - "NOT_STATUS"] == - 'S') { - 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 (liberationHistoryItem["NOT_STATUS"] == - 'L') { - return FFLocalizations.of(context) - .getVariableText( - ptText: 'Ativa', - enText: 'Active', - ); - } else if (liberationHistoryItem[ - "NOT_STATUS"] == - 'B') { - return FFLocalizations.of(context) - .getVariableText( - ptText: 'Bloqueada', - enText: 'Blocked', - ); - } else if (liberationHistoryItem[ - "NOT_STATUS"] == - 'S') { - return FFLocalizations.of(context) - .getVariableText( - ptText: 'Pendente', - enText: 'Pending', - ); - } else { - return FFLocalizations.of(context) - .getVariableText( - ptText: 'Desconhecida', - enText: 'Unknow', - ); - } - }()}", - 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)), - ), - ), - ), - ], - ), - ), - ), ); } 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..f177f8f5 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,3 +1,6 @@ +import 'package:f_r_e_hub/backend/api_requests/api_manager.dart'; +import 'package:f_r_e_hub/flutter_flow/request_manager.dart'; + import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/form_field_controller.dart'; import 'schedule_complete_visit_page_widget.dart' @@ -6,6 +9,21 @@ import 'package:flutter/material.dart'; class ScheduleCompleteVisitPageModel extends FlutterFlowModel { + 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); + /// Local state fields for this page. List visitorJsonList = []; @@ -66,6 +84,8 @@ class ScheduleCompleteVisitPageModel textFieldFocusNode3?.dispose(); textController3?.dispose(); + + 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 59b1e892..5245a301 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 @@ -103,14 +103,22 @@ class _ScheduleCompleteVisitPageWidgetState } void _loadMoreVisitHistory() async { - final total = List.generate( - 100, (index) => "Item $index"); // Exemplo de lista total de itens + // Simulate fetching data from an API or database + Future> fetchVisitHistory(int start, int limit) async { + // Simulate network delay + await Future.delayed(Duration(seconds: 1)); + // Generate a list of visit history items + return List.generate(limit, (index) => "Item ${start + index}"); + } + + // Calculate the start index for the next batch of items to load final int start = _visitHistoryLoadingIdx * _visitHistoryLoadingCount; - final int end = start + _visitHistoryLoadingCount > total.length - ? total.length - : start + _visitHistoryLoadingCount; - if (start < total.length) { - final List newItems = total.sublist(start, end); + // Fetch the next batch of items + final List newItems = + await fetchVisitHistory(start, _visitHistoryLoadingCount); + + // If new items were fetched, add them to the list and update the index + if (newItems.isNotEmpty) { _visitHistoryList.addAll(newItems); _visitHistoryLoadingIdx++; setState(() {}); @@ -142,2750 +150,2332 @@ class _ScheduleCompleteVisitPageWidgetState child: Scaffold( key: scaffoldKey, backgroundColor: FlutterFlowTheme.of(context).primaryBackground, - appBar: AppBar( - backgroundColor: FlutterFlowTheme.of(context).primaryBackground, - automaticallyImplyLeading: false, - leading: FlutterFlowIconButton( - borderColor: Colors.transparent, - borderRadius: 30.0, - borderWidth: 1.0, - buttonSize: 60.0, - icon: Icon( - Icons.keyboard_arrow_left, - color: FlutterFlowTheme.of(context).primaryText, - size: 30.0, - ), - onPressed: () async { - context.pop(); - }, + appBar: appBarScheduleCompleteVisit(context), + body: + bodyScheduleCompleteVisit(context, _model, setState, safeSetState), + ), + ); + } +} + +PreferredSizeWidget appBarScheduleCompleteVisit(BuildContext context) { + return 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'), ), - 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, + ), + actions: const [], + centerTitle: true, + ); +} + +Widget bodyScheduleCompleteVisit( + BuildContext context, + ScheduleCompleteVisitPageModel _model, + Function setState, + Function safeSetState) { + return SafeArea( + top: true, + child: Column( + children: [ + 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, - fontWeight: FontWeight.bold, - useGoogleFonts: GoogleFonts.asMap().containsKey('Nunito'), + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).titleMediumFamily), ), - ), - actions: const [], - centerTitle: true, - ), - body: SafeArea( - top: true, - child: Column( - children: [ - 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 */, - ), - ), - Tab( - text: FFLocalizations.of(context).getText( - 'k4uraqam' /* Histórico de Visitas */, - ), - ), - ], - controller: _model.tabBarController, - onTap: (i) async { - [() async {}, () async {}][i](); - }, + 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: TabBarView( - controller: _model.tabBarController, + Tab( + text: FFLocalizations.of(context).getText( + 'k4uraqam' /* Histórico de Visitas */, + ), + ), + ], + controller: _model.tabBarController, + onTap: (i) async { + [() async {}, () async {}][i](); + }, + ), + ), + Expanded( + child: TabBarView( + controller: _model.tabBarController, + children: [ + scheduleVisit(context, _model, setState, safeSetState), + visitHistory(context, _model, safeSetState), + ], + ), + ), + ], + ), + ); +} + +Widget scheduleVisit( + BuildContext context, + ScheduleCompleteVisitPageModel _model, + Function setState, + Function safeSetState) { + return SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Stack( + children: [ + Container( + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context).primaryBackground, + ), + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - Stack( - children: [ - Container( - decoration: BoxDecoration( - color: FlutterFlowTheme.of(context) - .primaryBackground, - ), - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - children: [ - Column( - mainAxisSize: MainAxisSize.max, - children: [ - Align( - alignment: - const AlignmentDirectional( - -1.0, 0.0), - child: Padding( - padding: - const EdgeInsetsDirectional - .fromSTEB( - 20.0, 30.0, 0.0, 30.0), - child: Text( - FFLocalizations.of(context) - .getText( - 'u0jocx7e' /* Quais visitantes você deseja c... */, - ), - textAlign: TextAlign.start, - style: - FlutterFlowTheme.of(context) - .bodyMedium - .override( - fontFamily: - FlutterFlowTheme.of( - context) - .bodyMediumFamily, - letterSpacing: 0.0, - fontWeight: - FontWeight.bold, - useGoogleFonts: GoogleFonts - .asMap() - .containsKey( - FlutterFlowTheme.of( - context) - .bodyMediumFamily), - ), - ), - ), - ), - if (_model.visitorJsonList.isNotEmpty) - Builder( - builder: (context) { - final visitorListView = _model - .visitorJsonList - .map((e) => e) - .toList(); - return ListView.separated( - padding: - const EdgeInsets.fromLTRB( - 0, - 0, - 0, - 20.0, - ), - shrinkWrap: true, - scrollDirection: - Axis.vertical, - itemCount: - visitorListView.length, - separatorBuilder: (_, __) => - const SizedBox( - height: 5.0), - itemBuilder: (context, - visitorListViewIndex) { - final visitorListViewItem = - visitorListView[ - visitorListViewIndex]; - return InkWell( - splashColor: - Colors.transparent, - focusColor: - Colors.transparent, - hoverColor: - Colors.transparent, - highlightColor: - Colors.transparent, - onTap: () async { - await showModalBottomSheet( - isScrollControlled: - true, - backgroundColor: - Colors - .transparent, - enableDrag: false, - context: context, - builder: (context) { - return GestureDetector( - onTap: () => _model - .unfocusNode - .canRequestFocus - ? FocusScope.of( - context) - .requestFocus( - _model - .unfocusNode) - : FocusScope.of( - context) - .unfocus(), - child: Padding( - padding: MediaQuery - .viewInsetsOf( - context), - child: - const 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), - ), - ), - ), - ), - ), - ), - ], - ), - ], - ), - 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( - '98evnbbe' /* Qual o período de validade da ... */, - ), - textAlign: TextAlign.start, - style: - FlutterFlowTheme.of(context) - .bodyMedium - .override( - fontFamily: - FlutterFlowTheme.of( - context) - .bodyMediumFamily, - letterSpacing: 0.0, - fontWeight: - FontWeight.bold, - useGoogleFonts: GoogleFonts - .asMap() - .containsKey( - FlutterFlowTheme.of( - context) - .bodyMediumFamily), - ), - ), - ), - ), - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Padding( - 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( - 'qygj6ra5' /* Inicio 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 - .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, - ); - _model.textController1 - ?.selection = - TextSelection.collapsed( - offset: _model - .textController1! - .text - .length); - }); - }, - 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, - ); - _model.textController2 - ?.selection = - TextSelection.collapsed( - offset: _model - .textController2! - .text - .length); - }); - }, - 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, - maxLength: 80, - validator: _model - .textController3Validator - .asValidator(context), - ), - ), - ), - ], - ), - Container( - width: 100.0, - height: 54.0, - decoration: const BoxDecoration(), - ), - ], + Column( + mainAxisSize: MainAxisSize.max, + children: [ + Align( + alignment: const AlignmentDirectional(-1.0, 0.0), + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 20.0, 30.0, 0.0, 30.0), + child: Text( + FFLocalizations.of(context).getText( + 'u0jocx7e' /* 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), ), - ), - ), - ], - ), - 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: () { - print('IconButton pressed ...'); - }, + ), + 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, ), - ], - ), - 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( + 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) - .primary, - size: 50.0, + .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( + '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)), ), ), ); - } - 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( + }, + ); + }, + ), + 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(); + 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), + ), + ), + ), + ), + ), + ), + ], + ), + ], + ), + 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( + '98evnbbe' /* Qual o período de validade da ... */, + ), + textAlign: TextAlign.start, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .bodyMediumFamily, + letterSpacing: 0.0, + fontWeight: FontWeight.bold, + useGoogleFonts: GoogleFonts.asMap() + .containsKey( + FlutterFlowTheme.of(context) + .bodyMediumFamily), + ), + ), + ), + ), + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Padding( + 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( + 'qygj6ra5' /* Inicio 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.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 { - await showModalBottomSheet( - isScrollControlled: true, - backgroundColor: - Colors.transparent, - enableDrag: false, - useSafeArea: true, + final datePicked1Date = + await showDatePicker( 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(), - visitStatusColor: - getJsonField( - visitaWrapItem, - r'''$.VAW_STATUS''', - ) - .toString() == - 'A' - ? FlutterFlowTheme - .of( - context) - .success - : FlutterFlowTheme - .of(context) - .error, - visitorJsonList: PhpGroup - .getVisitsCall - .visitasList( - wrapGetVisitsResponse - .jsonBody, - ), - updateToggleIdx: - () async {}, - repeatVisitSchedule: - () async {}, - ), - ), + 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, ); }, - ).then( - (value) => safeSetState(() {})); + ); + + 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, + ); + _model.textController1 + ?.selection = + TextSelection.collapsed( + offset: _model + .textController1! + .text + .length); + }); }, - child: Card( - clipBehavior: - Clip.antiAliasWithSaveLayer, - color: FlutterFlowTheme.of(context) - .secondaryBackground, - elevation: 5.0, - shape: RoundedRectangleBorder( + child: Container( + width: double.infinity, + height: 55.0, + decoration: BoxDecoration( 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\"') || - (functions.jsonToStr(getJsonField( - visitaWrapItem, - r'''$.VAW_STATUS''', - )) == - '\"F\"') || - (functions.jsonToStr(getJsonField( - visitaWrapItem, - r'''$.VAW_STATUS''', - )) == - '\"B\"') || - (functions.jsonToStr(getJsonField( - visitaWrapItem, - r'''$.VAW_STATUS''', - )) == - '\"I\"')) { - 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, - ), - ), - ], - ), - ), ), - ); - }), - ); - }, - ); - }, + ), + ), + ], + ), + ), + ), ), ], ), - ), + 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, + ); + _model.textController2 + ?.selection = + TextSelection.collapsed( + offset: _model + .textController2! + .text + .length); + }); + }, + 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( + 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( + controller: + _model.dropDownValueController1 ??= + FormFieldController( + _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: 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( + 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( + controller: + _model.dropDownValueController2 ??= + FormFieldController( + _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: 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, + maxLength: 80, + 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)), + ), + ); +} + +Widget visitHistory( + BuildContext context, + ScheduleCompleteVisitPageModel _model, + Function safeSetState, +) { + return 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: () { + print('IconButton pressed ...'); + }, + ), + ], + ), + FutureBuilder( + 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. + 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 ListView.builder( + itemCount: visitaWrap.length, + shrinkWrap: true, + scrollDirection: Axis.vertical, + physics: const BouncingScrollPhysics(), + addAutomaticKeepAlives: true, + cacheExtent: 1000.0, + addRepaintBoundaries: true, + addSemanticIndexes: true, + itemBuilder: (context, index) { + final visitaWrapItem = visitaWrap[index]; + // visitaWrap.length, (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( + '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(), + visitStatusColor: getJsonField( + visitaWrapItem, + r'''$.VAW_STATUS''', + ).toString() == + 'A' + ? FlutterFlowTheme.of(context).success + : FlutterFlowTheme.of(context).error, + 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( + () { + if (functions.jsonToStr( + getJsonField( + visitaWrapItem, + r'''$.VAW_STATUS''', + )) == + '\"A\"') { + return FlutterFlowTheme + .of(context) + .success; + } else if ((functions + .jsonToStr( + getJsonField( + visitaWrapItem, + r'''$.VAW_STATUS''', + )) == + '\"C\"') || + (functions.jsonToStr( + getJsonField( + visitaWrapItem, + r'''$.VAW_STATUS''', + )) == + '\"F\"') || + (functions.jsonToStr( + getJsonField( + visitaWrapItem, + r'''$.VAW_STATUS''', + )) == + '\"B\"') || + (functions.jsonToStr( + getJsonField( + visitaWrapItem, + r'''$.VAW_STATUS''', + )) == + '\"I\"')) { + 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( + '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/pages/test_page/test_page.dart b/lib/pages/test_page/test_page.dart index 8a07fd3a..12d5b661 100644 --- a/lib/pages/test_page/test_page.dart +++ b/lib/pages/test_page/test_page.dart @@ -19,6 +19,18 @@ class TestPage extends StatelessWidget { 'Ativo': FlutterFlowTheme.of(context).success, }; + // função set statusHashMap que recebe um String status faz um switch case e retorna um Map + Map getStatusHashMap(String status) { + switch (status) { + case 'Ativo': + return {'Ativo': FlutterFlowTheme.of(context).success}; + case 'Inativo': + return {'Inativo': FlutterFlowTheme.of(context).error}; + default: + return {'Desconhecido': FlutterFlowTheme.of(context).primaryColor}; + } + } + // Ajuste para passar os valores corretos para a URL da imagem final Map imageKeyValue = { 'key': 'docID', diff --git a/pubspec.lock b/pubspec.lock index 61606fd6..8104211b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -949,6 +949,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.2" + responsive_framework: + dependency: "direct main" + description: + name: responsive_framework + sha256: "52367ab0c3479b3a5342dec3b74a3d47c4cc1b45bb5d38f720c2e002ebccd4ee" + url: "https://pub.dev" + source: hosted + version: "1.4.0" rfc_6901: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index e413bbf6..ccc4d6bc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -81,6 +81,7 @@ dependencies: shared_preferences_web: 2.3.0 sqflite: 2.3.3+1 synchronized: 3.1.0+1 + responsive_framework: 1.4.0 timeago: 3.6.1 url_launcher: 6.3.0 url_launcher_android: 6.3.3