diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 327ec122..03cc7f02 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_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_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_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_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_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-18 09:41:40.317290","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_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_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_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_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_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-19 13:22:57.781424","version":"3.22.2"} \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 08fca23b..da96ae6b 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -44,6 +44,11 @@ + + + diff --git a/android/app/src/main/res/drawable/ic_fre_black.png b/android/app/src/main/res/drawable/ic_fre_black.png new file mode 100644 index 00000000..51c434b7 Binary files /dev/null and b/android/app/src/main/res/drawable/ic_fre_black.png differ diff --git a/android/app/src/main/res/drawable/mipmap/ic_fre_black.png b/android/app/src/main/res/drawable/mipmap/ic_fre_black.png new file mode 100644 index 00000000..51c434b7 Binary files /dev/null and b/android/app/src/main/res/drawable/mipmap/ic_fre_black.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_fre_black.png b/android/app/src/main/res/mipmap-hdpi/ic_fre_black.png new file mode 100644 index 00000000..51c434b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_fre_black.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_fre_black.png b/android/app/src/main/res/mipmap-mdpi/ic_fre_black.png new file mode 100644 index 00000000..51c434b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_fre_black.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_fre_black.png b/android/app/src/main/res/mipmap-xhdpi/ic_fre_black.png new file mode 100644 index 00000000..51c434b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_fre_black.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_fre_black.png b/android/app/src/main/res/mipmap-xxhdpi/ic_fre_black.png new file mode 100644 index 00000000..51c434b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_fre_black.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_fre_black.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_fre_black.png new file mode 100644 index 00000000..51c434b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_fre_black.png differ diff --git a/lib/backend/push_notification/pushNotificationService.dart b/lib/backend/push_notification/pushNotificationService.dart index 17155f88..2de93284 100644 --- a/lib/backend/push_notification/pushNotificationService.dart +++ b/lib/backend/push_notification/pushNotificationService.dart @@ -1,69 +1,38 @@ +import 'dart:async'; +import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; -import 'package:flutter/widgets.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'; -import 'dart:io' show Platform; - -import 'package:firebase_messaging/firebase_messaging.dart'; -import 'package:flutter/material.dart'; class PushNotificationService { final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance; - Function(BuildContext)? onNotificationClick; + final FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin = + FlutterLocalNotificationsPlugin(); + final Subject _onMessage = BehaviorSubject(); + final BehaviorSubject _context = + BehaviorSubject(); - /// Inicializa o serviço de notificação push. - Future initialize() async { - FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin = - FlutterLocalNotificationsPlugin(); + PushNotificationService() { + _initializeLocalNotifications(_context); + } + + Future initialize(BuildContext context) async { + _context.add(context); await _requestPermissions(); - _configureLocalNotification(_flutterLocalNotificationsPlugin); - _listenToForegroundMessages(_flutterLocalNotificationsPlugin); - _handleMessageTap(); + _listenToForegroundMessages(context); _listenToBackgroundMessages(); + _listenToNotificationClicks(context); await _updateDeviceToken(); } - void showCustomSheet(BuildContext context) { - showModalBottomSheet( - context: context, - isScrollControlled: true, - builder: (BuildContext context) { - return const VisitRequestTemplateComponentWidget( - name: '', // Supondo que esses valores serão extraídos da mensagem - image: '', - message: '', - reason: '', - ); - }, - ); - } - - void _configureLocalNotification( - FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin) { - var initializationSettingsAndroid = - const AndroidInitializationSettings('mipmap/ic_launcher'); - var initializationSettingsIOS = const DarwinInitializationSettings( - requestAlertPermission: true, - requestBadgePermission: true, - requestSoundPermission: true, - ); - var initializationSettings = InitializationSettings( - android: initializationSettingsAndroid, iOS: initializationSettingsIOS); - _flutterLocalNotificationsPlugin.initialize(initializationSettings, - onDidReceiveNotificationResponse: (response) async { - debugPrint('Notification tapped!'); - }); - } - - /// Solicita permissões ao usuário para iOS. Future _requestPermissions() async { NotificationSettings settings = await _firebaseMessaging.requestPermission( alert: true, badge: true, sound: true, ); - if (settings.authorizationStatus == AuthorizationStatus.authorized) { debugPrint('User granted permission'); } else { @@ -71,88 +40,182 @@ class PushNotificationService { } } - void _listenToForegroundMessages( - FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin) { - FirebaseMessaging.onMessage.listen((RemoteMessage message) { - debugPrint('Got a message whilst in the foreground!'); - debugPrint('Message data: ${message.data}'); - RemoteNotification? notification = message.notification; - AndroidNotification? android = message.notification?.android; - if (notification != null && android != null) { - _flutterLocalNotificationsPlugin.show( - notification.hashCode, - notification.title, - notification.body, - const NotificationDetails( - android: AndroidNotificationDetails( - 'your_channel_id', - 'Your Channel Name', - channelDescription: 'Your Channel Description', - importance: Importance.max, - priority: Priority.high, - icon: 'mipmap/ic_launcher', - ), + Map validJsonFromString(String? string) { + // Switch(string != null || string.isNotEmpty) { + // case true: + // debugPrint() + // break; + // } + String stringValidate = string! + .replaceAllMapped(RegExp(r'(\w+):'), + (match) => '"${match[1]}":') // Enclose keys in double quotes + .replaceAllMapped(RegExp(r':\s*(\w+)'), (match) => ': "${match[1]}"'); + Map json = jsonDecode(stringValidate); + return json; + } + + void _initializeLocalNotifications( + BehaviorSubject context) async { + while (context.valueOrNull == null) { + await Future.delayed(Duration(milliseconds: 100)); + } + + var initializationSettingsAndroid = + AndroidInitializationSettings('mipmap/ic_fre_black'); + var initializationSettingsIOS = DarwinInitializationSettings( + requestAlertPermission: true, + requestBadgePermission: true, + requestSoundPermission: true, + ); + var initializationSettings = InitializationSettings( + android: initializationSettingsAndroid, + iOS: initializationSettingsIOS, + ); + _flutterLocalNotificationsPlugin.initialize( + initializationSettings, + onDidReceiveNotificationResponse: (NotificationResponse response) async { + debugPrint('Response payload:${response.payload}'); + if (response.payload != null) { + // Preprocess the payload to ensure it's in a valid JSON format + String validJsonPayload = response.payload! + .replaceAllMapped(RegExp(r'(\w+):'), + (match) => '"${match[1]}":') // Enclose keys in double quotes + .replaceAllMapped( + RegExp(r':\s*(\w+)'), + (match) => + ': "${match[1]}"'); // Enclose string values in double quotes + + try { + Map message = jsonDecode(validJsonPayload); + debugPrint('Notification payload: $message'); + _handleNotificationClick(message); + } catch (e) { + debugPrint('Error decoding notification payload: $e'); + } + } + }, + ); + _createNotificationChannel(); + } + + void _createNotificationChannel() { + _flutterLocalNotificationsPlugin + .resolvePlatformSpecificImplementation< + AndroidFlutterLocalNotificationsPlugin>() + ?.createNotificationChannel( + AndroidNotificationChannel( + 'channelID', + 'channelName', + description: 'Channel Description', + importance: Importance.max, ), ); - } + } + + void _listenToForegroundMessages(BuildContext context) { + FirebaseMessaging.onMessage.listen((RemoteMessage message) { + debugPrint('Got a message whilst in the foreground!'); + debugPrint('Message data: ${message.toMap()}'); + _onMessage.add(message); + _showNotification(message); }); } - /// Configura a ação ao tocar na notificação. - void _handleMessageTap() { - FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) { - debugPrint('Message clicked!'); - // Implementar ação ao tocar na notificação - }); - } - - /// Configura o ouvinte para mensagens em segundo plano. void _listenToBackgroundMessages() { FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler); } - /// Atualiza o token do dispositivo e envia para o servidor, se necessário. + void _listenToNotificationClicks(BuildContext context) { + FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) { + debugPrint('Notification clicked!'); + + _onMessage.add(message); + NotificationHandler().handleMessage(message.data, context); + }); + } + Future _updateDeviceToken() async { String? token = await _firebaseMessaging.getToken(); debugPrint('Push Messaging token: $token'); - // Enviar token para o servidor + // Send token to your server if required + } + + void _showNotification(RemoteMessage message) async { + var androidDetails = AndroidNotificationDetails( + 'channelID', + 'channelName', + channelDescription: 'Channel Description', + importance: Importance.max, + priority: Priority.high, + ); + var iOSDetails = DarwinNotificationDetails(); + var generalNotificationDetails = + NotificationDetails(android: androidDetails, iOS: iOSDetails); + + await _flutterLocalNotificationsPlugin.show( + message.hashCode, + message.notification?.title, + message.notification?.body, + generalNotificationDetails, + payload: message.data.toString(), + ); + } + + _handleNotificationClick(Map payload) { + switch (payload.isNotEmpty) { + case true: + // Print the 'data' property + debugPrint('Notification payload: $payload'); + // Handle the message data as needed + NotificationHandler().handleMessage(payload, _context.value); + // Access the 'data' property of 'RemoteMessage' + case false: + debugPrint('Notification payload is empty'); + // Handle the message notification as needed + break; + } + } + + static Future _firebaseMessagingBackgroundHandler( + RemoteMessage message) async { + debugPrint('Handling a background message: ${message.messageId}'); } } -/// Manipula mensagens recebidas em segundo plano. -Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async { - debugPrint('Handling a background message: ${message.messageId}'); -} +class NotificationHandler { + void handleMessage(Map message, BuildContext context) { + debugPrint('Notification Received!'); + message.forEach((key, value) { + debugPrint('$key: $value'); + }); -void _handleNotificationTap( - NotificationResponse response, BuildContext context) { - // Implementação para lidar com o toque na notificação - showModalBottomSheet( - context: context, - isScrollControlled: true, - builder: (BuildContext context) { - return const VisitRequestTemplateComponentWidget( - name: '', // Supondo que esses valores serão extraídos da mensagem - image: '', - message: '', - reason: '', - ); - }, - ); -} + switch (message['type']) { + case 'visit_request': + _showVisitRequestDialog(message, context); + break; + case 'visit_response': + debugPrint('visit_response'); + break; + default: + debugPrint('Notification type not recognized'); + } + } -void _handleMessageOpenedApp(RemoteMessage message, BuildContext context) { - // Mostra um modal ao invés de navegar para uma nova página - showModalBottomSheet( - context: context, - isScrollControlled: true, - builder: (BuildContext context) { - return const VisitRequestTemplateComponentWidget( - name: '', // Supondo que esses valores serão extraídos da mensagem - image: '', - message: '', - reason: '', - ); - }, - ); + void _showVisitRequestDialog( + Map message, BuildContext context) { + showDialog( + context: context, + builder: (BuildContext context) { + return Dialog( + backgroundColor: Colors.transparent, + child: VisitRequestTemplateComponentWidget( + name: message['nome'] ?? 'Unknown', + reason: message['motivo'] ?? 'Unknown', + message: message['mensagem'] ?? 'Unknown', + document: message['documento'] ?? 'Unknown', + ), + ); + }, + ); + } } diff --git a/lib/backend/push_notification/tapNotifcationActivity.dart b/lib/backend/push_notification/tapNotifcationActivity.dart new file mode 100644 index 00000000..fbff80c0 --- /dev/null +++ b/lib/backend/push_notification/tapNotifcationActivity.dart @@ -0,0 +1,90 @@ +// 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/material.dart'; +// import 'package:rxdart/rxdart.dart'; + + + + +// class NotificationHandler { +// // Criar BehaviorSubjects para mensagens em primeiro plano e mensagens que abriram o app +// final BehaviorSubject _onMessage = +// BehaviorSubject(); +// final BehaviorSubject _onMessageOpenedApp = +// BehaviorSubject(); + +// // Inicializar listeners no construtor +// NotificationHandler() { +// initializeListeners(); +// } + +// void initializeListeners() async { +// // Listener para mensagens em primeiro plano +// // FirebaseMessaging.onMessage.listen((message) { +// // _onMessage.add(message); // Adicionar mensagem ao stream +// // }); + +// RemoteMessage? initialMessage = +// await FirebaseMessaging.instance.getInitialMessage(); + +// if (initialMessage != null) _onMessage.add(initialMessage); + +// // Listener para mensagens que abriram o app +// FirebaseMessaging.onMessageOpenedApp.listen((message) { +// _onMessageOpenedApp.add(message); // Adicionar mensagem ao stream +// }); +// } + +// void openedAppVisitRequestNotification( +// RemoteMessage message, BuildContext context) { +// debugPrint('openedAppVisitRequestNotification'); +// showDialog( +// context: context, +// builder: (BuildContext context) { +// return Dialog( +// backgroundColor: +// Colors.transparent, // Faz o fundo do Dialog ser transparente +// child: VisitRequestTemplateComponentWidget( +// name: message.data['nome'] ?? 'blabla', +// reason: message.data['motivo'] ?? 'blabla', +// message: message.data['mensagem'] ?? 'blabla', +// document: message.data['document']), +// ); +// }); +// } + +// // Método para tratar mensagens recebidas +// void handleMessage(RemoteMessage message, BuildContext context) { +// debugPrint('Notification Received!'); +// message.data.forEach((key, value) { +// debugPrint('$key: $value'); +// }); + +// switch (message.data['type']) { +// case 'visit_request': +// openedAppVisitRequestNotification(message, context); +// break; +// case '': +// break; +// default: +// debugPrint('Notification type not recognized'); +// } +// } + +// // Ouvir streams +// void listenToNotifications(BuildContext context) { +// _onMessage.listen((message) { +// handleMessage(message, context); +// }); + +// _onMessageOpenedApp.listen((message) { +// handleMessage(message, context); +// }); +// } + +// // Dispor streams +// void dispose() { +// _onMessage.close(); +// _onMessageOpenedApp.close(); +// } +// } 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 77c2ff3e..9447f1f7 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 @@ -4,6 +4,7 @@ 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 'visit_request_template_component_model.dart'; export 'visit_request_template_component_model.dart'; @@ -13,13 +14,13 @@ class VisitRequestTemplateComponentWidget extends StatefulWidget { required this.name, required this.reason, required this.message, - required this.image, + required this.document, }); final String? name; final String? reason; final String? message; - final String? image; + final String? document; @override State createState() => @@ -63,6 +64,8 @@ class _VisitRequestTemplateComponentWidgetState @override Widget build(BuildContext context) { + context.watch(); + return Align( alignment: const AlignmentDirectional(0.0, 0.0), child: Padding( @@ -96,7 +99,10 @@ class _VisitRequestTemplateComponentWidgetState child: CachedNetworkImage( fadeInDuration: const Duration(milliseconds: 500), fadeOutDuration: const Duration(milliseconds: 500), - imageUrl: widget.image!, + imageUrl: valueOrDefault( + 'https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${widget.document}&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, ), ), @@ -447,7 +453,7 @@ class _VisitRequestTemplateComponentWidgetState buttonSize: 40.0, fillColor: FlutterFlowTheme.of(context).error, icon: Icon( - Icons.add, + Icons.close, color: FlutterFlowTheme.of(context).primaryBackground, size: 24.0, ), diff --git a/lib/main.dart b/lib/main.dart index 63a215ac..a2268a52 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -33,8 +33,6 @@ Future initializeApp() async { await appState.initializePersistedState(); GoRouter.optionURLReflectsImperativeAPIs = true; usePathUrlStrategy(); - final pushNotificationService = PushNotificationService(); - await pushNotificationService.initialize(); } class MyApp extends StatefulWidget { diff --git a/lib/pages/home_page/home_page_widget.dart b/lib/pages/home_page/home_page_widget.dart index 295796ca..f904f3b2 100644 --- a/lib/pages/home_page/home_page_widget.dart +++ b/lib/pages/home_page/home_page_widget.dart @@ -1,5 +1,6 @@ // import 'package:f_r_e_hub/backend/push_notification/pushNotification.dart'; import 'package:f_r_e_hub/backend/push_notification/pushNotificationService.dart'; +import 'package:f_r_e_hub/backend/push_notification/tapNotifcationActivity.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'; @@ -35,46 +36,33 @@ class _HomePageWidgetState extends State { super.initState(); _model = createModel(context, () => HomePageModel()); - // PushNotificationService().onNotificationClick = (context) { - // showModalBottomSheet( - // context: context, - // isScrollControlled: true, - // builder: (BuildContext context) { - // return const VisitRequestTemplateComponentWidget( - // name: '', // Supondo que esses valores serão extraídos da mensagem - // image: '', - // message: '', - // reason: '', - // ); - // }, - // ); - // }; - - // On page load action. SchedulerBinding.instance.addPostFrameCallback((_) async { - FirebaseMessaging.onMessageOpenedApp.listen((message) { - debugPrint('onMessageOpenedApp Test'); - debugPrint('name: ${message.data['nome']}'); - debugPrint('reason: ${message.data['motivo']}'); - debugPrint('message: ${message.data['mensagem']}'); - debugPrint('image: ${message.data['imagem']}'); + // final pushNotificationService = PushNotificationService(); + // await pushNotificationService.initialize(context); + // NotificationHandler().listenToNotifications(context); - showDialog( - context: context, - builder: (BuildContext context) { - return Dialog( - backgroundColor: - Colors.transparent, // Faz o fundo do Dialog ser transparente - child: VisitRequestTemplateComponentWidget( - name: message.data['nome'] ?? 'Nome Exemplo', - reason: message.data['motivo'] ?? 'Motivo Exemplo', - message: message.data['mensagem'] ?? 'Mensagem Exemplo', - image: 'URL da Imagem', - ), - ); - }, - ); - }); + // Inicializa o serviço de notificação + await PushNotificationService().initialize(context); + + // Opcional: Defina ações específicas quando uma notificação é recebida + // PushNotificationService().onMessage.listen((message) { + // // Implemente sua lógica aqui, por exemplo, navegar para uma nova página + // // ou mostrar um diálogo com a mensagem da notificação + // showDialog( + // context: context, + // builder: (context) => AlertDialog( + // title: Text("Notificação Recebida"), + // content: Text(message), + // actions: [ + // TextButton( + // onPressed: () => Navigator.of(context).pop(), + // child: Text("OK"), + // ), + // ], + // ), + // ); + // }); + // }); if (FFAppState().cliUUID == '') { showModalBottomSheet( diff --git a/pubspec.lock b/pubspec.lock index 4134dad6..699519c1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -902,7 +902,7 @@ packages: source: hosted version: "0.2.0" rxdart: - dependency: transitive + dependency: "direct main" description: name: rxdart sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" diff --git a/pubspec.yaml b/pubspec.yaml index f8a23551..e9bbed09 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -29,6 +29,7 @@ dependencies: cached_network_image: 3.3.1 firebase_core: 3.1.0 webview_flutter: ^4.8.0 + rxdart: ^0.27.7 collection: 1.18.0 crop_your_image: 1.1.0 csv: 6.0.0