From 68aa4c635e573a556b738e02160b26b4cf1f3820 Mon Sep 17 00:00:00 2001 From: Jonatas Antunes Messias Date: Mon, 1 Jul 2024 11:08:11 -0300 Subject: [PATCH] chore: Update internationalization translations for access history page and tabBar layout --- .flutter-plugins-dependencies | 2 +- lib/backend/api_requests/api_calls.dart | 67 +- .../pushNotificationService.dart | 13 +- .../opt_modal/opt_modal_widget.dart | 331 ++++++- ...ation_modal_template_component_widget.dart | 14 +- lib/flutter_flow/internationalization.dart | 6 +- lib/flutter_flow/nav/nav.dart | 6 +- lib/index.dart | 10 +- lib/main.dart | 12 +- .../acess_history_page_model.dart | 12 +- .../acess_history_page_widget.dart | 833 +++++++++--------- lib/pages/acess_history_page/buildBackup.txt | 458 ---------- 12 files changed, 828 insertions(+), 936 deletions(-) delete mode 100644 lib/pages/acess_history_page/buildBackup.txt diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 02601d23..0b177749 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-06-26 13:08:32.289447","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-06-28 17:34:06.632975","version":"3.22.2"} \ No newline at end of file diff --git a/lib/backend/api_requests/api_calls.dart b/lib/backend/api_requests/api_calls.dart index 4b9a9311..a86047bf 100644 --- a/lib/backend/api_requests/api_calls.dart +++ b/lib/backend/api_requests/api_calls.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:convert'; import 'package:flutter/foundation.dart'; @@ -1590,7 +1591,7 @@ class RespondeSolicitacaoCall { } class GetAccessCall { - Future call({ + Stream call({ String? devUUID = '', String? userUUID = '', String? cliID = '', @@ -1598,33 +1599,45 @@ class GetAccessCall { String? pageSize = '', String? pageNumber = '', String? pesTipo = '', - }) async { + }) { final baseUrl = PhpGroup.getBaseUrl(); + final StreamController controller = StreamController(); - return ApiManager.instance.makeApiCall( - callName: 'getAccess', - apiUrl: '$baseUrl/processRequest.php', - callType: ApiCallType.POST, - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - }, - params: { - 'devUUID': devUUID, - 'userUUID': userUUID, - 'cliID': cliID, - 'atividade': atividade, - 'pageSize': pageSize, - 'pageNumber': pageNumber, - 'pesTipo': pesTipo, - }, - bodyType: BodyType.X_WWW_FORM_URL_ENCODED, - returnBody: true, - encodeBodyUtf8: false, - decodeUtf8: false, - cache: false, - isStreamingApi: false, - alwaysAllowBody: false, - ); + Future.microtask(() async { + try { + final response = await ApiManager.instance.makeApiCall( + callName: 'getAccess', + apiUrl: '$baseUrl/processRequest.php', + callType: ApiCallType.POST, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + params: { + 'devUUID': devUUID, + 'userUUID': userUUID, + 'cliID': cliID, + 'atividade': atividade, + 'pageSize': pageSize, + 'pageNumber': pageNumber, + 'pesTipo': pesTipo, + }, + bodyType: BodyType.X_WWW_FORM_URL_ENCODED, + returnBody: true, + encodeBodyUtf8: false, + decodeUtf8: false, + cache: false, + isStreamingApi: false, + alwaysAllowBody: false, + ); + controller.add(response); + await controller.close(); + } catch (e) { + controller.addError(e); + await controller.close(); + } + }); + + return controller.stream; } bool? error(dynamic response) => castToType(getJsonField( @@ -1828,7 +1841,7 @@ class GetAccessCall { .map((x) => castToType(x)) .withoutNulls .toList(); - List? accessTypeSet(dynamic response) => (getJsonField( + List? accessTypeet(dynamic response) => (getJsonField( response, r'''$.acessos[:].SET_TIPO''', true, diff --git a/lib/backend/push_notification/pushNotificationService.dart b/lib/backend/push_notification/pushNotificationService.dart index aedc719f..74b04957 100644 --- a/lib/backend/push_notification/pushNotificationService.dart +++ b/lib/backend/push_notification/pushNotificationService.dart @@ -332,6 +332,9 @@ class NotificationHandler { void _showAcessNotificationModal( Map message, BuildContext context) { debugPrint('Showing access notification dialog'); + debugPrint('USR_TIPO: ${message['USR_TIPO']}'); + debugPrint('USR_ID: ${message['USR_ID']}'); + debugPrint('USR_DOCUMENTO: ${message['USR_DOCUMENTO']}'); showDialog( context: context, builder: (BuildContext context) { @@ -340,9 +343,15 @@ class NotificationHandler { child: AccessNotificationModalTemplateComponentWidget( datetime: message['ACE_DATAHORA'].toString(), drive: message['ACI_DESCRICAO'].toString(), - id: message['PES_ID'].toString(), + id: message['USR_TIPO'].toString() == 'O' + ? message['USR_ID'].toString() == '' + ? '0' + : message['USR_ID'].toString() + : message['USR_DOCUMENTO'].toString() == '' + ? '0' + : message['USR_DOCUMENTO'].toString(), name: message['PES_NOME'].toString(), - type: message['PES_TIPO'].toString(), + type: message['USR_TIPO'], )); }, ); 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 f5a7e8c8..f8e97647 100644 --- a/lib/components/molecular_components/opt_modal/opt_modal_widget.dart +++ b/lib/components/molecular_components/opt_modal/opt_modal_widget.dart @@ -1,48 +1,323 @@ +import 'package:f_r_e_hub/components/molecular_components/opt_modal/opt_modal_model.dart'; +import 'package:f_r_e_hub/flutter_flow/flutter_flow_theme.dart'; +import 'package:f_r_e_hub/flutter_flow/flutter_flow_util.dart'; import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; class OptModalWidget extends StatefulWidget { - const OptModalWidget({Key? key}) : super(key: key); + final String defaultPersonType; + final String defaultAccessType; + + const OptModalWidget({ + Key? key, + this.defaultPersonType = '.*', + this.defaultAccessType = '.*', + }) : super(key: key); @override _OptModalWidgetState createState() => _OptModalWidgetState(); } class _OptModalWidgetState extends State { - String selectedOption = 'T'; // Estado inicial + late OptModalModel _model; - void setSelectedOption(String option) { + late Map selected; + final List> personTypeOptions = [ + {'title': 'zok7lu4w', 'value': 'E'}, + {'title': 'oonqk812', 'value': 'O'}, + ]; + final List> accessTypeOptions = [ + {'title': '580z80ct', 'value': '0'}, + {'title': '1nbwqtzs', 'value': '1'}, + ]; + + @override + void setState(VoidCallback callback) { + super.setState(callback); + _model.onUpdate(); + } + + @override + void initState() { + super.initState(); + + _model = createModel(context, () => OptModalModel()); + + _model.textController ??= TextEditingController(); + _model.textFieldFocusNode ??= FocusNode(); + + selected = { + 'personType': widget.defaultPersonType == '.*' + ? ['E', 'O'] + : [widget.defaultPersonType], + 'accessType': widget.defaultAccessType == '.*' + ? ['0', '1'] + : [widget.defaultAccessType], + 'search': '.*', + }; + } + + void _applyFilter() { + Map filterResult = { + 'personType': '', + 'accessType': '', + 'search': _model.textController.text == '' + ? '.*' + : _model.textController.text.toLowerCase(), + }; + + if (selected['personType']!.isEmpty) { + filterResult['personType'] = '.*'; + } else if (selected['personType']!.length > 1) { + filterResult['personType'] = '.*'; + } else { + filterResult['personType'] = selected['personType']!.first; + } + + if (selected['accessType']!.isEmpty) { + filterResult['accessType'] = '.*'; + } else if (selected['accessType']!.length > 1) { + filterResult['accessType'] = '.*'; + } else { + filterResult['accessType'] = selected['accessType']!.first; + } + + Navigator.pop(context, filterResult); + } + + Widget _buildCheckboxListTile(String key, List> options) { + return Column( + children: [ + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: + const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0), + child: Text( + FFLocalizations.of(context).getText('l7tw8b92'), + textAlign: TextAlign + .left, // Adiciona esta linha para alinhar o texto à esquerda + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), + color: FlutterFlowTheme.of(context).primaryText, + ), + ), + ), + ], + ), + ListView.builder( + shrinkWrap: true, + itemCount: options.length, + itemBuilder: (context, index) { + final option = options[index]; + return CheckboxListTile( + title: Text( + FFLocalizations.of(context).getText(option['title']!), + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), + color: FlutterFlowTheme.of(context).primaryText, + ), + ), + dense: true, + value: selected[key]!.contains(option['value']), + onChanged: (bool? value) { + setState(() { + if (value == true) { + if (!selected[key]!.contains(option['value'])) { + selected[key]!.add(option['value']); + } + } else { + selected[key]!.remove(option['value']); + } + }); + }, + activeColor: FlutterFlowTheme.of(context).primary, + checkColor: FlutterFlowTheme.of(context).info, + side: BorderSide( + width: 2, + color: FlutterFlowTheme.of(context).secondaryText, + ), + ); + }, + ), + ], + ); + } + + void _updateSelection(String? value, String key) { setState(() { - selectedOption = option; + if (value == '.') { + selected[key] = []; + } else if (value != null) { + if (selected[key]!.contains(value)) { + selected[key]!.remove(value); + } else { + selected[key]!.add(value); + } + } }); } @override Widget build(BuildContext context) { - return Container( - // Estilize seu modal como necessário - child: Column( - children: [ - // Botão para "Visitante" - ElevatedButton( - onPressed: () => setSelectedOption('E'), - child: Text('Visitante'), + return SafeArea( + child: Align( + alignment: const AlignmentDirectional(1.0, -1.0), + child: Padding( + padding: const EdgeInsetsDirectional.fromSTEB(0.0, 50.0, 50.0, 0.0), + child: Container( + width: 300.0, + height: 500.0, + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context).primaryBackground, + borderRadius: BorderRadius.circular(24.0), + ), + child: Padding( + padding: const EdgeInsets.all(4.0), + child: Column( + children: [ + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 10.0, 10.0, 0.0, 10.0), + child: Text( + FFLocalizations.of(context) + .getText('yfj9pd6k'), // Filtros + style: FlutterFlowTheme.of(context) + .headlineMedium + .override( + fontFamily: FlutterFlowTheme.of(context) + .headlineMediumFamily, + color: FlutterFlowTheme.of(context).primaryText, + fontSize: 16.0, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context) + .headlineMediumFamily), + ), + ), + ), + ], + ), + Padding( + padding: const EdgeInsetsDirectional.fromSTEB( + 8.0, 0.0, 8.0, 0.0), + child: TextFormField( + controller: _model.textController, + focusNode: _model.textFieldFocusNode, + autofocus: true, + obscureText: false, + decoration: InputDecoration( + isDense: true, + labelText: FFLocalizations.of(context).getText( + '0enrtljz' /* Pesquise aqui..... */, + ), + 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), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context).alternate, + width: 1, + ), + borderRadius: BorderRadius.circular(8.0), + ), + focusedBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context).primary, + width: 1, + ), + borderRadius: BorderRadius.circular(8.0), + ), + errorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context).error, + width: 1, + ), + borderRadius: BorderRadius.circular(8.0), + ), + focusedErrorBorder: OutlineInputBorder( + borderSide: BorderSide( + color: FlutterFlowTheme.of(context).error, + width: 1, + ), + borderRadius: BorderRadius.circular(8.0), + ), + filled: true, + fillColor: FlutterFlowTheme.of(context).alternate, + suffixIcon: const Icon( + Icons.search_outlined, + ), + ), + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: + FlutterFlowTheme.of(context).bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), + ), + validator: + _model.textControllerValidator.asValidator(context), + ), + ), + SingleChildScrollView( + child: Container( + padding: const EdgeInsets.all(20), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + _buildCheckboxListTile( + 'personType', personTypeOptions), + _buildCheckboxListTile( + 'accessType', accessTypeOptions), + ], + ), + ), + ), + ElevatedButton( + onPressed: _applyFilter, + child: + Text(FFLocalizations.of(context).getText('88kshkph')), + style: ElevatedButton.styleFrom( + foregroundColor: FlutterFlowTheme.of(context).info, + backgroundColor: FlutterFlowTheme.of(context).primary, + ), + ), + ], + ), + ), ), - // Botão para "Morador" - ElevatedButton( - onPressed: () => setSelectedOption('O'), - child: Text('Morador'), - ), - // Botão para "Ambos ou Nenhum" - ElevatedButton( - onPressed: () => setSelectedOption('T'), - child: Text('Ambos ou Nenhum'), - ), - // Botão para confirmar a seleção e fechar o modal - ElevatedButton( - onPressed: () => Navigator.pop(context, selectedOption), - child: Text('Confirmar'), - ), - ], + ), ), ); } diff --git a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart index ee10a48e..54677042 100644 --- a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart +++ b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart @@ -106,7 +106,10 @@ class _AccessNotificationModalTemplateComponentWidgetState fadeInDuration: const Duration(milliseconds: 100), fadeOutDuration: const Duration(milliseconds: 100), imageUrl: valueOrDefault( - 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${widget.id}&tipo=E', + // widget.type == 'O' + // ? 'https://freaccess.com.br/freaccess/getImage.php?cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${widget.id}&tipo=O' + // : 'https://freaccess.com.br/freaccess/getImage.php?cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${widget.id}&tipo=E', + 'https://freaccess.com.br/freaccess/getImage.php?cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${widget.id}&tipo=${widget.type}', 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg', ), fit: BoxFit.cover, @@ -117,7 +120,8 @@ class _AccessNotificationModalTemplateComponentWidgetState .addToEnd(const SizedBox(width: 10.0)), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), child: TextFormField( controller: _model.textController1, focusNode: _model.textFieldFocusNode1, @@ -300,7 +304,8 @@ class _AccessNotificationModalTemplateComponentWidgetState .addToEnd(const SizedBox(width: 24.0)), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), child: TextFormField( controller: _model.textController4, focusNode: _model.textFieldFocusNode4, @@ -358,7 +363,8 @@ class _AccessNotificationModalTemplateComponentWidgetState ), ), Padding( - padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0), + padding: const EdgeInsetsDirectional.fromSTEB( + 24.0, 0.0, 24.0, 0.0), child: TextFormField( controller: _model.textController5, focusNode: _model.textFieldFocusNode5, diff --git a/lib/flutter_flow/internationalization.dart b/lib/flutter_flow/internationalization.dart index 963f505e..2e470b4a 100644 --- a/lib/flutter_flow/internationalization.dart +++ b/lib/flutter_flow/internationalization.dart @@ -501,8 +501,8 @@ final kTranslationsMap = >>[ 'en': 'Resident', }, 'yfj9pd6k': { - 'pt': 'Visitante', - 'en': '', + 'pt': 'Filtro', + 'en': 'Filter', }, 'svfcf5xs': { 'pt': 'Morador', @@ -530,7 +530,7 @@ final kTranslationsMap = >>[ }, '88kshkph': { 'pt': 'Salvar', - 'en': 'To save', + 'en': 'Apply', }, }, // throwException diff --git a/lib/flutter_flow/nav/nav.dart b/lib/flutter_flow/nav/nav.dart index c6beefef..da25e868 100644 --- a/lib/flutter_flow/nav/nav.dart +++ b/lib/flutter_flow/nav/nav.dart @@ -135,7 +135,11 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) => GoRouter( FFRoute( name: 'acessHistoryPage', path: '/acessHistoryPage', - builder: (context, params) => const AcessHistoryPageWidget()), + builder: (context, params) => AcessHistoryPageWidget(opt: { + 'personType': '.*', + 'accessType': '.*', + 'search': '.*', + })), // FFRoute( // name: 'liberationHistory', // path: '/liberationHistory', diff --git a/lib/index.dart b/lib/index.dart index 1ec344c0..db4a3be1 100644 --- a/lib/index.dart +++ b/lib/index.dart @@ -1,17 +1,25 @@ -// Export pages export '/pages/home_page/home_page_widget.dart' show HomePageWidget; + export '/pages/register_visitor_page/register_visitor_page_widget.dart' show RegisterVisitorPageWidget; + export '/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart' show ScheduleCompleteVisitPageWidget; + export '/pages/schedule_provisional_visit_page/schedule_provisional_visit_page_widget.dart' show ScheduleProvisionalVisitPageWidget; + export '/pages/people_on_the_property_page/people_on_the_property_page_widget.dart' show PeopleOnThePropertyPageWidget; + export '/pages/acess_history_page/acess_history_page_widget.dart' show AcessHistoryPageWidget; + export '/pages/liberation_history/liberation_history_widget.dart' show LiberationHistoryWidget; + export '/pages/sign_in_page/sign_in_page_widget.dart' show SignInPageWidget; + export '/pages/sign_up_page/sign_up_page_widget.dart' show SignUpPageWidget; + export '/pages/welcome_page/welcome_page_widget.dart' show WelcomePageWidget; diff --git a/lib/main.dart b/lib/main.dart index 0fde3210..61b446eb 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,9 +1,10 @@ -import 'package:f_r_e_hub/backend/api_requests/api_calls.dart'; -import 'package:f_r_e_hub/backend/push_notification/pushNotificationService.dart'; -import 'package:f_r_e_hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart'; +// import 'package:f_r_e_hub/backend/api_requests/api_calls.dart'; +// import 'package:f_r_e_hub/backend/push_notification/pushNotificationService.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_local_notifications/flutter_local_notifications.dart'; +// import 'package:firebase_analytics/firebase_analytics.dart'; import 'package:firebase_core/firebase_core.dart'; -import 'package:firebase_messaging/firebase_messaging.dart'; -import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:provider/provider.dart'; import 'package:flutter/material.dart'; import 'firebase_options.dart'; @@ -12,7 +13,6 @@ import 'package:flutter_web_plugins/url_strategy.dart'; import 'flutter_flow/flutter_flow_theme.dart'; import 'flutter_flow/flutter_flow_util.dart'; import 'flutter_flow/internationalization.dart'; -import 'package:firebase_analytics/firebase_analytics.dart'; final GlobalKey navigatorKey = GlobalKey(); diff --git a/lib/pages/acess_history_page/acess_history_page_model.dart b/lib/pages/acess_history_page/acess_history_page_model.dart index 9744f4f0..a03ec14e 100644 --- a/lib/pages/acess_history_page/acess_history_page_model.dart +++ b/lib/pages/acess_history_page/acess_history_page_model.dart @@ -7,17 +7,12 @@ import 'acess_history_page_widget.dart' show AcessHistoryPageWidget; import 'package:flutter/material.dart'; class AcessHistoryPageModel extends FlutterFlowModel { - /// State fields for stateful widgets in this page. - final unfocusNode = FocusNode(); - - /// Query cache managers for this widget. - - final _accessHistoryManager = FutureRequestManager(); - Future accessHistory({ + final _accessHistoryManager = StreamRequestManager(); + Stream accessHistory({ String? uniqueQueryKey, bool? overrideCache, - required Future Function() requestFn, + required Stream Function() requestFn, }) => _accessHistoryManager.performRequest( uniqueQueryKey: uniqueQueryKey, @@ -40,7 +35,6 @@ class AcessHistoryPageModel extends FlutterFlowModel { clearAccessHistoryCache(); } - /// Action blocks. Future toggleOptionsAction(BuildContext context) async { await showModalBottomSheet( isScrollControlled: true, diff --git a/lib/pages/acess_history_page/acess_history_page_widget.dart b/lib/pages/acess_history_page/acess_history_page_widget.dart index b73b089f..dc263dc5 100644 --- a/lib/pages/acess_history_page/acess_history_page_widget.dart +++ b/lib/pages/acess_history_page/acess_history_page_widget.dart @@ -9,20 +9,24 @@ import '/flutter_flow/custom_functions.dart' as functions; import 'package:flutter/material.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:provider/provider.dart'; import 'acess_history_page_model.dart'; export 'acess_history_page_model.dart'; +@immutable class AcessHistoryPageWidget extends StatefulWidget { - const AcessHistoryPageWidget({super.key}); - + late Map opt = { + 'personType': '.*', + 'accessType': '.*', + 'search': '.*', + }; + AcessHistoryPageWidget({super.key, required this.opt}); @override - State createState() => _AcessHistoryPageWidgetState(); + State createState() => + _AcessHistoryPageWidgetState(opt); } class AccessHistoryItemWidget extends StatelessWidget { - final dynamic - accessHistoryItem; // Substitua dynamic pelo tipo correto conforme seu modelo de dados + final dynamic accessHistoryItem; const AccessHistoryItemWidget({Key? key, required this.accessHistoryItem}) : super(key: key); @@ -31,174 +35,241 @@ class AccessHistoryItemWidget extends StatelessWidget { Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - accessHistoryItem[ - 'nomeCampo'], // Substitua 'nomeCampo' pelo campo correto do seu modelo de dados - style: TextStyle( - fontSize: 16.0, - fontWeight: FontWeight.bold, - ), - ), - SizedBox(height: 4.0), - Text( - accessHistoryItem[ - 'descricaoCampo'], // Substitua 'descricaoCampo' pelo campo correto do seu modelo de dados - style: TextStyle(fontSize: 14.0), - ), - // Adicione mais Widgets conforme necessário - ], - ), + child: Column(), ); } } class _AcessHistoryPageWidgetState extends State { late AcessHistoryPageModel _model; - BehaviorSubject selectedTypeSubject = - BehaviorSubject.seeded('T'); - + final BehaviorSubject> selectedTypeSubject; + bool _isSubjectClosed = false; final scaffoldKey = GlobalKey(); - // Método para atualizar o estado e refazer a chamada à API - void updateAccessHistory(String newType) { - debugPrint('ne: $newType'); - selectedTypeSubject.add(newType); // Atualiza o tipo selecionado - setState(() {}); // Atualiza o estado do StreamBuilder + _AcessHistoryPageWidgetState(Map opt) + : selectedTypeSubject = BehaviorSubject.seeded(opt) { + selectedTypeSubject.listen((value) { + print("selectedTypeSubject changed: $value"); + }); } @override void initState() { super.initState(); _model = createModel(context, () => AcessHistoryPageModel()); + debugPrint("initState called in _AcessHistoryPageWidgetState"); } @override void dispose() { - _model.dispose(); - + selectedTypeSubject.close(); + _isSubjectClosed = true; super.dispose(); } - // void updateSelectedType(String? value) { - // setState(() { - // selectedType.value = value; - // }); - // } - @override Widget build(BuildContext context) { return Scaffold( - key: scaffoldKey, - appBar: _buildAppBar(context), - body: SafeArea( - child: Column( - children: [ - _buildFilterButton(context), - Expanded( - // Isso garante que SingleChildScrollView tenha um limite e possa rolar - child: SingleChildScrollView( - child: Column( - children: [ - _buildAccessHistoryList(context), - ], - ), - ), - ), - ], - )), - ); + key: scaffoldKey, + backgroundColor: FlutterFlowTheme.of(context).primaryBackground, + appBar: _appBarOrganismWidget(context), + body: _accessHistoryListOrganismWidget(context)); } - PreferredSizeWidget _buildAppBar(BuildContext context) { +// AppBar Widgets + PreferredSizeWidget _appBarOrganismWidget(BuildContext context) { + final theme = FlutterFlowTheme.of(context); return AppBar( - backgroundColor: FlutterFlowTheme.of(context).primaryBackground, + backgroundColor: theme.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( - 'ch8qymga' /* Histórico de Acesso */, - ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 18.0, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context).headlineMediumFamily), - ), - ), - actions: const [], + leading: _appBarBackButtonAtomWidget(context, theme), + title: _appBarTitleMoleculeWidget(context, theme), centerTitle: true, elevation: 0.0, + actions: [ + _appBarFilterButtonAtomWidget(context), + ], ); } - Widget _buildFilterButton(BuildContext context) { + Widget _appBarBackButtonAtomWidget( + BuildContext context, FlutterFlowTheme theme) { return FlutterFlowIconButton( borderColor: Colors.transparent, - borderRadius: 20.0, + borderRadius: 30.0, borderWidth: 1.0, - buttonSize: 40.0, + buttonSize: 60.0, icon: Icon( - Icons.filter_list, - color: FlutterFlowTheme.of(context).primaryText, - size: 24.0, + Icons.keyboard_arrow_left, + color: theme.primaryText, + size: 30.0, ), - onPressed: () async { - await showModalBottomSheet( - isScrollControlled: true, - backgroundColor: Colors.transparent, - context: context, - builder: (context) { - return GestureDetector( - onTap: () => _model.unfocusNode.canRequestFocus - ? FocusScope.of(context).requestFocus(_model.unfocusNode) - : FocusScope.of(context).unfocus(), - child: Padding( - padding: MediaQuery.viewInsetsOf(context), - child: const OptModalWidget(), - ), - ); - }, - ).then((value) => safeSetState(() { - updateAccessHistory(value!); - })); - }, + onPressed: () => Navigator.of(context).pop(), ); } - Widget card(String selectedType) { - debugPrint('Selected type in Card: $selectedType'); - return FutureBuilder( - future: _model.accessHistory( - requestFn: () => PhpGroup.getAccessCall.call( - devUUID: FFAppState().devUUID, - userUUID: FFAppState().userUUID, - cliID: FFAppState().cliUUID, - atividade: 'getAcessos', - pageSize: '100', - pageNumber: '1', - pesTipo: selectedType, - ), + Widget _appBarTitleMoleculeWidget( + BuildContext context, FlutterFlowTheme theme) { + return Text( + FFLocalizations.of(context).getText('ch8qymga'), + style: theme.headlineMedium.override( + fontFamily: theme.headlineMediumFamily, + color: theme.primaryText, + fontSize: 16.0, + letterSpacing: 0.0, + useGoogleFonts: + GoogleFonts.asMap().containsKey(theme.headlineMediumFamily), ), + ); + } + + Widget _appBarFilterButtonAtomWidget(BuildContext context) { + debugPrint('selectedTypeSubject: ${selectedTypeSubject.value}'); + return Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + IconButton( + icon: const Icon(Icons.filter_list), + padding: EdgeInsets.fromLTRB(0, 0, 10, 0), + onPressed: () async { + final Map? selectedFilter = + await showModalBottomSheet>( + isScrollControlled: true, + backgroundColor: Colors.transparent, + context: context, + builder: (context) => OptModalWidget( + defaultAccessType: + selectedTypeSubject.value['accessType'] ?? '.*', + defaultPersonType: + selectedTypeSubject.value['personType'] ?? '.*', + ), + ); + + if (selectedFilter != null) { + debugPrint('Selected Filter: $selectedFilter'); + _updateAccessHistoryAction(selectedFilter); + } + }, + ), + ], + ); + } + + void _updateAccessHistoryAction(Map newType) { + if (!_isSubjectClosed) { + final currentType = selectedTypeSubject.value; + final updatedType = Map.from(currentType); + bool needsUpdate = false; + newType.forEach((key, newValue) { + if (currentType[key] != newValue) { + updatedType[key] = newValue; + needsUpdate = true; + } + }); + if (needsUpdate) { + selectedTypeSubject.add(updatedType); + print("updateAccessHistory called with newType: $newType"); + safeSetState(() {}); + } + } + } + + Stream fetchAccessHistoryService(String selectedType) { + debugPrint('Calling API with type: $selectedType'); + switch (selectedType) { + case 'E': + return _model.accessHistory( + requestFn: () => PhpGroup.getAccessCall.call( + devUUID: FFAppState().devUUID, + userUUID: FFAppState().userUUID, + cliID: FFAppState().cliUUID, + atividade: 'getAcessos', + pageSize: '100', + pageNumber: '1', + pesTipo: 'E', + ), + ); + case 'O': + return _model.accessHistory( + requestFn: () => PhpGroup.getAccessCall.call( + devUUID: FFAppState().devUUID, + userUUID: FFAppState().userUUID, + cliID: FFAppState().cliUUID, + atividade: 'getAcessos', + pageSize: '100', + pageNumber: '1', + pesTipo: 'O', + ), + ); + default: + return _model.accessHistory( + requestFn: () => PhpGroup.getAccessCall.call( + devUUID: FFAppState().devUUID, + userUUID: FFAppState().userUUID, + cliID: FFAppState().cliUUID, + atividade: 'getAcessos', + pageSize: '100', + pageNumber: '1', + pesTipo: 'T', + ), + ); + } + } + + Widget _accessHistoryListOrganismWidget(BuildContext context) { + return SingleChildScrollView( + child: Column( + children: [ + StreamBuilder>( + stream: selectedTypeSubject.stream, + builder: (context, snapshot) { + if (!snapshot.hasData) { + return Center(child: CircularProgressIndicator()); + } + final selected = snapshot.data!; + return _cardListViewOrganismWidget(selected); + }, + ), + ], + ), + ); + } + + Future> fetchCardListViewService( + Map select) async { + debugPrint('Fetching access history'); + final response = + await fetchAccessHistoryService(select['personType']!).first; + debugPrint('Response: ${response.jsonBody}'); + final List accessHistory = response.jsonBody['acessos'] ?? []; + debugPrint('Access History Before Filtering: $accessHistory'); + debugPrint( + 'Filtering for: Person Type - ${select['personType']}, Access Type - ${select['accessType']}, Search - ${select['search']}'); + + return accessHistory.where((item) { + final personTypeMatches = select['personType'] == '.*' || + item["PES_TIPO"].toString() == select['personType']; + final accessTypeMatches = select['accessType'] == '.*' || + item["ACE_TIPO"].toString() == select['accessType']; + final searchMatches = select['search'] == '.*' || + item["PES_NOME"] + .toString() + .toLowerCase() + .contains(select['search']!.toLowerCase()); + debugPrint('NOMES: ${item["PES_NOME"].toString().toLowerCase()}'); + return personTypeMatches && accessTypeMatches && searchMatches; + }).toList(); + } + + Widget _cardListViewOrganismWidget(Map selected) { + debugPrint( + 'Selected types in Card: ${selected['personType']}, ${selected['accessType']}'); + debugPrint('_buildAccessHistoryList called'); + return FutureBuilder>( + future: fetchCardListViewService(selected), builder: (context, snapshot) { - if (!snapshot.hasData) { + if (snapshot.connectionState == ConnectionState.waiting) { + debugPrint('Waiting for data'); return Center( child: SizedBox( width: 50.0, @@ -209,276 +280,246 @@ class _AcessHistoryPageWidgetState extends State { ), ), ); + } else if (snapshot.hasError) { + return Text('Error: ${snapshot.error}'); + } else { + final accessHistory = snapshot.data!; + debugPrint('Access History: $accessHistory'); + return ListView.builder( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + itemCount: accessHistory.length, + itemBuilder: (context, index) { + final accessHistoryItem = accessHistory[index]; + debugPrint( + 'Access History Item: ${accessHistoryItem['PES_TIPO']}'); + return _accessHistoryCardMoleculeWidget( + context, accessHistoryItem); + }, + ); } - final wrapGetAccessResponse = snapshot.data!; - return Builder( - builder: (context) { - final accessHistory = PhpGroup.getAccessCall - .access(wrapGetAccessResponse.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(accessHistory.length, (accessHistoryIndex) { - final accessHistoryItem = accessHistory[accessHistoryIndex]; - debugPrint( - 'Access History Item: ${accessHistoryItem['PES_TIPO']}'); - return Align( - alignment: const AlignmentDirectional(0.0, 0.0), - child: Card( - clipBehavior: Clip.antiAliasWithSaveLayer, - color: FlutterFlowTheme.of(context).secondaryBackground, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8.0), - ), - child: Container( - width: 350.0, - height: 128.0, - decoration: BoxDecoration( - color: FlutterFlowTheme.of(context).primaryBackground, - ), - child: Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Padding( - padding: const EdgeInsets.all(10.0), - child: ClipRRect( - borderRadius: BorderRadius.circular(100.0), - child: Image.network( - valueOrDefault( - "https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField( - accessHistoryItem, - r'''$.VTE_DOCUMENTO''', - ).toString()}&tipo=E", - "https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg", - ), - width: 60.0, - height: 60.0, - fit: BoxFit.cover, - ), - ), - ), - Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - getJsonField( - accessHistoryItem, - r'''$.PES_NOME''', - ).toString(), - style: FlutterFlowTheme.of(context) - .bodyMedium - .override( - fontFamily: - FlutterFlowTheme.of(context) - .bodyMediumFamily, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap() - .containsKey( - FlutterFlowTheme.of(context) - .bodyMediumFamily), - ), - ), - Container( - width: 100.0, - height: 25.0, - decoration: BoxDecoration( - color: functions.jsonToStr(getJsonField( - accessHistoryItem, - r'''$.PES_TIPO''', - )) == - 'E' - ? FlutterFlowTheme.of(context).primary - : FlutterFlowTheme.of(context) - .warning, - borderRadius: BorderRadius.circular(24.0), - ), - child: Align( - alignment: - const AlignmentDirectional(0.0, 0.0), - child: Text( - getJsonField( - accessHistoryItem, - r'''$.PES_TIPO''', - ).toString(), - 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(width: 20.0)) - .addToStart(const SizedBox(width: 5.0)) - .addToEnd(const SizedBox(width: 5.0)), - ), - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Expanded( - child: Column( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - Text( - FFLocalizations.of(context).getText( - '2odgr6hg' /* Entrou: */, - ), - 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( - accessHistoryItem, - r'''$.ACE_DATAHORA''', - ).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( - 'zrde3fke' /* Setor */, - ), - 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( - accessHistoryItem, - r'''$.ACI_DESCRICAO''', - ).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)), - ), - ].divide(const SizedBox(height: 3.0)), - ), - ), - ] - .addToStart(const SizedBox(width: 5.0)) - .addToEnd(const SizedBox(width: 5.0)), - ), - ], - ), - ), - ), - ); - }), - ); - }, - ); }, ); } - Widget _buildAccessHistoryList(BuildContext context) { - return StreamBuilder( - stream: selectedTypeSubject.stream, - builder: (context, snapshot) { - if (!snapshot.hasData) { - // Você pode mostrar um widget de carregamento ou qualquer outro widget aqui - return Center(child: CircularProgressIndicator()); - } - final selectedType = snapshot.data!; - // Aqui você chama o método que constrói o card, passando o selectedType - return card(selectedType); - }, + Widget _accessHistoryCardMoleculeWidget( + BuildContext context, dynamic accessHistoryItem) { + var tipoPessoa = + getJsonField(accessHistoryItem, r'''$.PES_TIPO''').toString(); + var documentoPessoa = + getJsonField(accessHistoryItem, r'''$.PES_ID''').toString(); + var corFundoTipo = tipoPessoa == 'E' + ? FlutterFlowTheme.of(context).primary + : FlutterFlowTheme.of(context).warning; + debugPrint('Tipo de Pessoa: $tipoPessoa'); + debugPrint('Documento da Pessoa: $documentoPessoa'); + var urlImagem = imageUrlAtomWidget(documentoPessoa, tipoPessoa); + return Card( + clipBehavior: Clip.antiAliasWithSaveLayer, + color: FlutterFlowTheme.of(context).secondaryBackground, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8.0), + ), + child: Container( + width: 350.0, + height: 128.0, + decoration: BoxDecoration( + color: FlutterFlowTheme.of(context).primaryBackground, + ), + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + _cardHeaderAtomWidget(context, urlImagem, tipoPessoa, corFundoTipo, + accessHistoryItem), + _cardDetailsMoleculeWidget(context, accessHistoryItem), + ], + ), + ), ); } } + +Widget _cardHeaderAtomWidget(BuildContext context, String urlImagem, + String tipoPessoa, Color corFundoTipo, accessHistoryItem) { + return Row( + mainAxisSize: MainAxisSize.max, + children: [ + Padding( + padding: const EdgeInsets.all(10.0), + child: ClipRRect( + borderRadius: BorderRadius.circular(100.0), + child: Image.network( + urlImagem, + width: 60.0, + height: 60.0, + fit: BoxFit.cover, + ), + ), + ), + Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + getJsonField( + accessHistoryItem, + r'''$.PES_NOME''', + ).toString(), + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily, + letterSpacing: 0.0, + useGoogleFonts: GoogleFonts.asMap().containsKey( + FlutterFlowTheme.of(context).bodyMediumFamily), + ), + ), + Container( + width: 100.0, + height: 25.0, + decoration: BoxDecoration( + color: (() { + // Extrai o valor de PES_TIPO, converte para String, remove espaços em branco e aspas + final pesTipo = functions + .jsonToStr(getJsonField( + accessHistoryItem, + r'''$.PES_TIPO''', + )) + .trim() + .replaceAll('"', ''); // Remove aspas + + // Debug: Imprime o valor de PES_TIPO ajustado + debugPrint('PES_TIPO FOR COLORING: $pesTipo'); + + // Retorna a cor baseada na condição ajustada + return pesTipo == 'E' + ? FlutterFlowTheme.of(context).warning + : FlutterFlowTheme.of(context).primary; + })(), + borderRadius: BorderRadius.circular(24.0), + ), + child: Align( + alignment: const AlignmentDirectional(0.0, 0.0), + child: Text( + getJsonField( + accessHistoryItem, + r'''$.PES_TIPO''', + ).toString() == + 'E' + ? FFLocalizations.of(context).getText( + 'zok7lu4w', + ) + : FFLocalizations.of(context).getText( + 'oonqk812', + ), + 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(width: 20.0)) + .addToStart(const SizedBox(width: 5.0)) + .addToEnd(const SizedBox(width: 5.0)), + ); +} + +Widget _cardDetailsMoleculeWidget( + BuildContext context, dynamic accessHistoryItem) { + return Row( + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + FFLocalizations.of(context).getText( + '2odgr6hg', + ), + 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( + accessHistoryItem, + r'''$.ACE_DATAHORA''', + ).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( + 'zrde3fke', + ), + 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( + accessHistoryItem, + r'''$.ACI_DESCRICAO''', + ).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)), + ), + ].divide(const SizedBox(height: 3.0)), + ), + ), + ] + .addToStart(const SizedBox(width: 5.0)) + .addToEnd(const SizedBox(width: 5.0)), + ); +} + +String imageUrlAtomWidget(String document, String type) { + return valueOrDefault( + "https://freaccess.com.br/freaccess/getImage.php?&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=$document&tipo=$type", + "https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg", + ); +} diff --git a/lib/pages/acess_history_page/buildBackup.txt b/lib/pages/acess_history_page/buildBackup.txt deleted file mode 100644 index 7201a8f3..00000000 --- a/lib/pages/acess_history_page/buildBackup.txt +++ /dev/null @@ -1,458 +0,0 @@ -@override - Widget build(BuildContext context) { - context.watch(); - - return GestureDetector( - onTap: () => _model.unfocusNode.canRequestFocus - ? FocusScope.of(context).requestFocus(_model.unfocusNode) - : FocusScope.of(context).unfocus(), - child: Scaffold( - key: scaffoldKey, - backgroundColor: FlutterFlowTheme.of(context).primaryBackground, - appBar: AppBar( - backgroundColor: FlutterFlowTheme.of(context).primaryBackground, - automaticallyImplyLeading: false, - leading: FlutterFlowIconButton( - borderColor: Colors.transparent, - borderRadius: 30.0, - borderWidth: 1.0, - buttonSize: 60.0, - icon: Icon( - Icons.keyboard_arrow_left, - color: FlutterFlowTheme.of(context).primaryText, - size: 30.0, - ), - onPressed: () async { - context.pop(); - }, - ), - title: Text( - FFLocalizations.of(context).getText( - 'ch8qymga' /* Histórico de Acesso */, - ), - style: FlutterFlowTheme.of(context).headlineMedium.override( - fontFamily: FlutterFlowTheme.of(context).headlineMediumFamily, - color: FlutterFlowTheme.of(context).primaryText, - fontSize: 18.0, - letterSpacing: 0.0, - useGoogleFonts: GoogleFonts.asMap().containsKey( - FlutterFlowTheme.of(context).headlineMediumFamily), - ), - ), - actions: const [], - centerTitle: true, - elevation: 0.0, - ), - body: SafeArea( - top: true, - child: Column( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - width: double.infinity, - height: 38.0, - decoration: BoxDecoration( - color: FlutterFlowTheme.of(context).primaryBackground, - ), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - FlutterFlowIconButton( - borderColor: Colors.transparent, - borderRadius: 20.0, - borderWidth: 1.0, - buttonSize: 40.0, - icon: Icon( - Icons.filter_list, - color: FlutterFlowTheme.of(context).primaryText, - size: 24.0, - ), - onPressed: () async { - await showModalBottomSheet( - isScrollControlled: true, - backgroundColor: Colors.transparent, - context: context, - builder: (context) { - return GestureDetector( - onTap: () => _model.unfocusNode.canRequestFocus - ? FocusScope.of(context) - .requestFocus(_model.unfocusNode) - : FocusScope.of(context).unfocus(), - child: Padding( - padding: MediaQuery.viewInsetsOf(context), - child: const OptModalWidget(), - ), - ); - }, - ).then((value) => safeSetState(() { - updateSelectedType(value); - debugPrint('Selected type: $value'); - })); - }, - ), - ] - .addToStart(const SizedBox(width: 10.0)) - .addToEnd(const SizedBox(width: 10.0)), - ), - ), - Expanded( - child: Container( - width: double.infinity, - height: double.infinity, - decoration: const BoxDecoration(), - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.max, - children: [ - FutureBuilder( - future: _model.accessHistory( - requestFn: () => PhpGroup.getAccessCall.call( - devUUID: FFAppState().devUUID, - userUUID: FFAppState().userUUID, - cliID: FFAppState().cliUUID, - atividade: 'getAcessos', - pageSize: '100', - pageNumber: '1', - pesTipo: selectedType, - ), - ), - 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 wrapGetAccessResponse = snapshot.data!; - return Builder( - builder: (context) { - final accessHistory = PhpGroup.getAccessCall - .access( - wrapGetAccessResponse.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(accessHistory.length, - (accessHistoryIndex) { - final accessHistoryItem = - accessHistory[accessHistoryIndex]; - return Align( - alignment: - const AlignmentDirectional(0.0, 0.0), - child: Card( - clipBehavior: - Clip.antiAliasWithSaveLayer, - color: FlutterFlowTheme.of(context) - .secondaryBackground, - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(8.0), - ), - child: Container( - width: 350.0, - height: 128.0, - decoration: BoxDecoration( - color: FlutterFlowTheme.of(context) - .primaryBackground, - ), - child: Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Padding( - padding: - const EdgeInsets.all( - 10.0), - child: ClipRRect( - borderRadius: - BorderRadius.circular( - 100.0), - child: Image.network( - valueOrDefault( - 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField( - accessHistoryItem, - r'''$.VTE_DOCUMENTO''', - ).toString()}&tipo=E', - 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg', - ), - width: 60.0, - height: 60.0, - fit: BoxFit.cover, - ), - ), - ), - Column( - mainAxisSize: - MainAxisSize.max, - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - Text( - getJsonField( - accessHistoryItem, - r'''$.PES_NOME''', - ).toString(), - style: - FlutterFlowTheme.of( - context) - .bodyMedium - .override( - fontFamily: FlutterFlowTheme.of( - context) - .bodyMediumFamily, - letterSpacing: - 0.0, - useGoogleFonts: GoogleFonts - .asMap() - .containsKey( - FlutterFlowTheme.of(context) - .bodyMediumFamily), - ), - ), - Container( - width: 100.0, - height: 25.0, - decoration: - BoxDecoration( - color: functions.jsonToStr( - getJsonField( - accessHistoryItem, - r'''$.PES_TIPO''', - )) == - 'E' - ? FlutterFlowTheme - .of( - context) - .primary - : FlutterFlowTheme - .of(context) - .warning, - borderRadius: - BorderRadius - .circular( - 24.0), - ), - child: Align( - alignment: - const AlignmentDirectional( - 0.0, 0.0), - child: Text( - getJsonField( - accessHistoryItem, - r'''$.PES_TIPO''', - ).toString(), - 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( - width: 20.0)) - .addToStart(const SizedBox( - width: 5.0)) - .addToEnd(const SizedBox( - width: 5.0)), - ), - Row( - mainAxisSize: MainAxisSize.max, - children: [ - Expanded( - child: Column( - mainAxisSize: - MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment - .center, - children: [ - Row( - mainAxisSize: - MainAxisSize.max, - mainAxisAlignment: - MainAxisAlignment - .start, - children: [ - Text( - FFLocalizations.of( - context) - .getText( - '2odgr6hg' /* Entrou: */, - ), - 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( - accessHistoryItem, - r'''$.ACE_DATAHORA''', - ).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( - 'zrde3fke' /* Setor */, - ), - 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( - accessHistoryItem, - r'''$.ACI_DESCRICAO''', - ).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)), - ), - ].divide(const SizedBox( - height: 3.0)), - ), - ), - ] - .addToStart(const SizedBox( - width: 5.0)) - .addToEnd(const SizedBox( - width: 5.0)), - ), - ], - ), - ), - ), - ); - }), - ); - }, - ); - }, - ), - ], - ), - ), - ), - ), - ].addToStart(const SizedBox(height: 5.0)), - ), - ), - ), - ); - } \ No newline at end of file