From e16fec26197d335bcdd0d85dc38ac1d75f53aa54 Mon Sep 17 00:00:00 2001 From: venbaittech Date: Wed, 29 Oct 2025 16:07:13 +0530 Subject: [PATCH] File Download Info UI_Changes --- .flutter-plugins-dependencies | 2 +- lib/core/services/api_service.dart | 31 ++--- lib/data/utils/toastNotification.dart | 114 +++++++++++++----- .../screens/Enquiry/enquiry/policy_tab.dart | 1 + .../screens/Enquiry/enquiryList.dart | 31 +++-- .../UserManagement/Staff/staffList.dart | 57 ++++++--- .../screens/handler/enquiryList.dart | 106 +++++++++------- .../screens/staff/Enquiry/enquiry_list.dart | 17 +-- .../screens/staff/policy/policy.dart | 8 +- .../screens/staff/policy/policy_list.dart | 14 +-- pubspec.lock | 8 ++ pubspec.yaml | 1 + 12 files changed, 256 insertions(+), 134 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 89323a1..402477c 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":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.1.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_darwin","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_darwin-1.6.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_ios-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_plugin_android_lifecycle","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.30/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_android","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_android-7.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_android","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_android-1.0.52/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"open_file_android","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_android-1.0.6/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_android-2.2.18/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.12/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.1.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_darwin","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_darwin-1.6.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_mac","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_mac-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.3/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_linux-0.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false},{"name":"url_launcher_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_windows-1.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_windows-0.0.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false},{"name":"url_launcher_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","dependencies":[],"dev_dependency":false},{"name":"firebase_app_check_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check_web-0.2.0+16/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_auth_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth_web-6.0.2/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core_web-3.1.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.0.1/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"flutter_secure_storage_web","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_web-1.0.0/","dependencies":[],"dev_dependency":false},{"name":"open_file_web","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_web-0.0.4/","dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","dependencies":[],"dev_dependency":false},{"name":"shared_preferences_web","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.1/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"connectivity_plus","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_app_check","dependencies":["firebase_app_check_web","firebase_core"]},{"name":"firebase_app_check_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_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_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":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"local_auth","dependencies":["local_auth_android","local_auth_darwin","local_auth_windows"]},{"name":"local_auth_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"local_auth_darwin","dependencies":[]},{"name":"local_auth_windows","dependencies":[]},{"name":"open_file","dependencies":["open_file_android","open_file_web","open_file_ios","open_file_mac","open_file_windows","open_file_linux"]},{"name":"open_file_android","dependencies":[]},{"name":"open_file_ios","dependencies":[]},{"name":"open_file_linux","dependencies":[]},{"name":"open_file_mac","dependencies":[]},{"name":"open_file_web","dependencies":[]},{"name":"open_file_windows","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"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":"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":[]}],"date_created":"2025-10-25 18:38:36.948788","version":"3.32.1","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.1.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_darwin","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_darwin-1.6.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_ios-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_plugin_android_lifecycle","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.30/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_android","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_android-7.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_android","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_android-1.0.52/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"open_file_android","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_android-1.0.6/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_android-2.2.18/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.12/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_app_check","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check-0.4.0+1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.1/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"flutter_secure_storage_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"google_sign_in_ios","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_ios-6.1.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_darwin","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_darwin-1.6.0/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_mac","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_mac-1.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.2/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.3/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_linux-0.0.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false},{"name":"url_launcher_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.0.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.1.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"flutter_secure_storage_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"local_auth_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/local_auth_windows-1.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"open_file_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_windows-0.0.3/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false},{"name":"url_launcher_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"connectivity_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.5/","dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.3/","dependencies":[],"dev_dependency":false},{"name":"firebase_app_check_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_app_check_web-0.2.0+16/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_auth_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth_web-6.0.2/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core_web-3.1.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.0.1/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"flutter_secure_storage_web","path":"/home/venba/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/","dependencies":[],"dev_dependency":false},{"name":"fluttertoast","path":"/home/venba/.pub-cache/hosted/pub.dev/fluttertoast-9.0.0/","dependencies":[],"dev_dependency":false},{"name":"google_sign_in_web","path":"/home/venba/.pub-cache/hosted/pub.dev/google_sign_in_web-1.0.0/","dependencies":[],"dev_dependency":false},{"name":"open_file_web","path":"/home/venba/.pub-cache/hosted/pub.dev/open_file_web-0.0.4/","dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/package_info_plus-8.3.1/","dependencies":[],"dev_dependency":false},{"name":"shared_preferences_web","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.1/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"connectivity_plus","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"firebase_app_check","dependencies":["firebase_app_check_web","firebase_core"]},{"name":"firebase_app_check_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_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_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":"fluttertoast","dependencies":[]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"local_auth","dependencies":["local_auth_android","local_auth_darwin","local_auth_windows"]},{"name":"local_auth_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"local_auth_darwin","dependencies":[]},{"name":"local_auth_windows","dependencies":[]},{"name":"open_file","dependencies":["open_file_android","open_file_web","open_file_ios","open_file_mac","open_file_windows","open_file_linux"]},{"name":"open_file_android","dependencies":[]},{"name":"open_file_ios","dependencies":[]},{"name":"open_file_linux","dependencies":[]},{"name":"open_file_mac","dependencies":[]},{"name":"open_file_web","dependencies":[]},{"name":"open_file_windows","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"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":"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":[]}],"date_created":"2025-10-28 19:29:42.487933","version":"3.32.1","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/lib/core/services/api_service.dart b/lib/core/services/api_service.dart index 498065d..39a48e7 100644 --- a/lib/core/services/api_service.dart +++ b/lib/core/services/api_service.dart @@ -220,9 +220,9 @@ class ApiService { if (contentType.contains('application/json')) { final jsonResponse = jsonDecode(response.body); if (jsonResponse['code'] == 404 || jsonResponse['code'] == 500) { - ToastHelper.showInfoToast(context, 'File Not Found'); + ToastHelper.show('File Not Found', Colors.red); } else { - ToastHelper.showInfoToast(context, 'No File Found'); + ToastHelper.show('No File Found', Colors.red); } return; } else { @@ -272,9 +272,9 @@ class ApiService { } else if (response.statusCode == 403) { await clearLocalStorageAndRedirect(); } else if (response.statusCode == 500) { - ToastHelper.showInfoToast(context, 'No File Not Found'); + ToastHelper.show('No File Found', Colors.red); } else { - ToastHelper.showInfoToast(context, 'No File Not Found'); + ToastHelper.show('No File Found', Colors.red); throw Exception('Failed to download file'); } } @@ -813,6 +813,8 @@ class ApiService { query = 'manager_id=$id'; } else if (role == 'staff') { query = 'staff_id=$id'; + } else if (role == 'handler') { + query = 'handler_id=$id'; } else { query = 'agent_id=$id'; } @@ -859,13 +861,14 @@ class ApiService { if (role == 'manager') { url = Uri.parse('${Env.apiUrl}claim/ClaimList?manager_id=$id'); - } - // else if (role == 'staff') { - // url = Uri.parse('${Env.apiUrl}enquiry/enquiryList?staff_id=$id'); - // } - else { + } else if (role == 'agent') { url = Uri.parse('${Env.apiUrl}claim/ClaimList?agent_id=$id'); + } else if (role == 'handler') { + url = Uri.parse('${Env.apiUrl}claim/ClaimList?handler_id=$id'); + } else { + url = Uri.parse('${Env.apiUrl}claim/ClaimList?staff_id=$id'); } + // final url = Uri.parse( // 'https://venbait.in/nhance/partner/dev/api/agent/agentList?manager_id=${managerId}', // ); @@ -907,12 +910,12 @@ class ApiService { url = Uri.parse( '${Env.apiUrl}endorsement/endorsementList?manager_id=$id', ); - } - // else if (role == 'staff') { - // url = Uri.parse('${Env.apiUrl}enquiry/enquiryList?staff_id=$id'); - // } - else { + } else if (role == 'agent') { url = Uri.parse('${Env.apiUrl}endorsement/endorsementList?agent_id=$id'); + } else if (role == 'handler') { + url = Uri.parse('${Env.apiUrl}enquiry/enquiryList?handler_id=$id'); + } else { + url = Uri.parse('${Env.apiUrl}endorsement/endorsementList?staff_id=$id'); } // final url = Uri.parse( // 'https://venbait.in/nhance/partner/dev/api/agent/agentList?manager_id=${managerId}', diff --git a/lib/data/utils/toastNotification.dart b/lib/data/utils/toastNotification.dart index 8221dd8..55e1278 100644 --- a/lib/data/utils/toastNotification.dart +++ b/lib/data/utils/toastNotification.dart @@ -1,6 +1,9 @@ +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:fluttertoast/fluttertoast.dart'; // import 'package:fluttertoast/fluttertoast.dart'; import 'package:toastification/toastification.dart'; +import 'package:universal_html/html.dart' as html; class ToastHelper { static void showSuccessToast(BuildContext context, String message) { @@ -17,10 +20,7 @@ class ToastHelper { direction: TextDirection.ltr, animationDuration: const Duration(milliseconds: 100), animationBuilder: (context, animation, alignment, child) { - return FadeTransition( - opacity: animation, - child: child, - ); + return FadeTransition(opacity: animation, child: child); }, icon: const Icon(Icons.check), primaryColor: Colors.green, @@ -35,7 +35,7 @@ class ToastHelper { blurRadius: 16, offset: Offset(0, 16), spreadRadius: 0, - ) + ), ], showProgressBar: true, closeButtonShowType: CloseButtonShowType.onHover, @@ -68,10 +68,7 @@ class ToastHelper { direction: TextDirection.ltr, animationDuration: const Duration(milliseconds: 100), animationBuilder: (context, animation, alignment, child) { - return FadeTransition( - opacity: animation, - child: child, - ); + return FadeTransition(opacity: animation, child: child); }, icon: const Icon(Icons.warning), primaryColor: Colors.amberAccent, @@ -86,7 +83,7 @@ class ToastHelper { blurRadius: 16, offset: Offset(0, 16), spreadRadius: 0, - ) + ), ], showProgressBar: true, closeButtonShowType: CloseButtonShowType.onHover, @@ -119,10 +116,7 @@ class ToastHelper { direction: TextDirection.ltr, animationDuration: const Duration(milliseconds: 100), animationBuilder: (context, animation, alignment, child) { - return FadeTransition( - opacity: animation, - child: child, - ); + return FadeTransition(opacity: animation, child: child); }, icon: const Icon(Icons.error), primaryColor: Colors.redAccent, @@ -137,7 +131,7 @@ class ToastHelper { blurRadius: 16, offset: Offset(0, 16), spreadRadius: 0, - ) + ), ], showProgressBar: true, closeButtonShowType: CloseButtonShowType.onHover, @@ -171,10 +165,7 @@ class ToastHelper { direction: TextDirection.ltr, animationDuration: const Duration(milliseconds: 100), animationBuilder: (context, animation, alignment, child) { - return FadeTransition( - opacity: animation, - child: child, - ); + return FadeTransition(opacity: animation, child: child); }, icon: const Icon(Icons.info), primaryColor: Colors.lightBlue, @@ -189,7 +180,7 @@ class ToastHelper { blurRadius: 16, offset: Offset(0, 16), spreadRadius: 0, - ) + ), ], showProgressBar: true, closeButtonShowType: CloseButtonShowType.onHover, @@ -209,15 +200,78 @@ class ToastHelper { // _showToast(context, message, Colors.red); } - static void _showToast(BuildContext context, String message, Color color) { - // Fluttertoast.showToast( - // msg: message, - // toastLength: Toast.LENGTH_SHORT, - // gravity: ToastGravity.TOP, - // timeInSecForIosWeb: 5, - // backgroundColor: color, - // textColor: Colors.white, - // fontSize: 16.0, - // ); + static void show(String message, Color backgroundColor) { + if (kIsWeb) { + _showWebToast(message, backgroundColor); + } else { + Fluttertoast.showToast( + msg: message, + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.BOTTOM, + backgroundColor: backgroundColor, + textColor: Colors.white, + fontSize: 16.0, + ); + } } + + static void _showWebToast(String message, Color backgroundColor) { + // Create toast element + final toast = html.DivElement() + ..style.position = 'fixed' + ..style.top = + '20px' // Top position + ..style.right = + '20px' // Left position + ..style.backgroundColor = _colorToRgba(backgroundColor) + ..style.color = 'white' + ..style.padding = '12px 24px' + ..style.borderRadius = '8px' + // ..style.borderColor = _colorToRgba(backgroundColor) + ..style.boxShadow = '0 4px 6px rgba(0, 0, 0, 0.2)' + ..style.zIndex = '9999' + ..style.fontSize = '12px' + ..style.fontFamily = "'Inter', sans-serif" + ..style.fontWeight = + '800' // Bold + ..style.minWidth = '200px' + ..style.maxWidth = '400px' + ..style.textAlign = 'left' + ..style.transition = 'all 0.3s ease-in-out' + ..style.opacity = '0' + ..text = message; + + // Add to body + html.document.body?.append(toast); + + // Fade in animation + Future.delayed(Duration(milliseconds: 10), () { + toast.style.opacity = '1'; + }); + + // Auto remove after 3 seconds + Future.delayed(Duration(milliseconds: 2700), () { + toast.style.opacity = '0'; + }); + + Future.delayed(Duration(seconds: 3), () { + toast.remove(); + }); + } + + static String _colorToRgba(Color color) { + return 'rgba(${color.red}, ${color.green}, ${color.blue}, ${color.opacity})'; + } + + // static void _showToast(BuildContext context, String message, Color color) { + // Fluttertoast.showToast( + // msg: message, + // toastLength: Toast.LENGTH_SHORT, + // gravity: ToastGravity.TOP, + // timeInSecForIosWeb: 5, + // backgroundColor: color, + // textColor: Colors.white, + // fontSize: 16.0, + // ); + // } } diff --git a/lib/presentation/screens/Enquiry/enquiry/policy_tab.dart b/lib/presentation/screens/Enquiry/enquiry/policy_tab.dart index 7a3592c..ae3f68a 100644 --- a/lib/presentation/screens/Enquiry/enquiry/policy_tab.dart +++ b/lib/presentation/screens/Enquiry/enquiry/policy_tab.dart @@ -441,6 +441,7 @@ class PolicyTabState extends ConsumerState { // 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; final path = 'api/policy/downloadPolicyFile?policy_id=$selectedId&file_type=policy_pdf'; + apiService.getPdfDownload(path, selectedId); }, child: Container( diff --git a/lib/presentation/screens/Enquiry/enquiryList.dart b/lib/presentation/screens/Enquiry/enquiryList.dart index 4af1c83..860d001 100644 --- a/lib/presentation/screens/Enquiry/enquiryList.dart +++ b/lib/presentation/screens/Enquiry/enquiryList.dart @@ -672,20 +672,20 @@ class EnquiryListState extends ConsumerState { children: [ Expanded(flex: 1, child: Text('S.No.', style: _headerStyle)), Expanded( - flex: 2, - child: Text('Received Date & Time', style: _headerStyle), + flex: 3, + child: Text('Received Date', style: _headerStyle), ), Expanded( - flex: 2, + flex: 3, child: Text('Vehicle.No.', style: _headerStyle), ), Expanded(flex: 3, child: Text('Insurer', style: _headerStyle)), Expanded( - flex: 2, + flex: 3, child: Text('Updated Date', style: _headerStyle), ), - Expanded(flex: 2, child: Text('Status', style: _headerStyle)), + Expanded(flex: 3, child: Text('Status', style: _headerStyle)), Expanded(flex: 2, child: Text('Remarks', style: _headerStyle)), Expanded(flex: 1, child: Text('Action', style: _headerStyle)), ], @@ -785,7 +785,7 @@ class EnquiryListState extends ConsumerState { children: [ Expanded(flex: 1, child: Text('$sno' ?? '-', style: _dataBold)), Expanded( - flex: 2, + flex: 3, child: Text( _formatDate(item['created_on']) ?? '-', style: _dataBold, @@ -793,36 +793,43 @@ class EnquiryListState extends ConsumerState { ), Expanded( - flex: 2, + flex: 3, child: Text(item['reg_no'] ?? '-', style: _dataBold), ), Expanded( flex: 3, child: Text( item['insurer_name'] ?? '-', + // (item['insurer_name'] ?? '').length > 10 + // ? '${item['insurer_name'].substring(0, 10)}...' + // : item['insurer_name'] ?? '', style: _dataBold, softWrap: true, maxLines: 3, ), ), Expanded( - flex: 2, + flex: 3, child: Text( _formatDate(item['updated_on']) ?? '-', style: _dataBold, ), ), Expanded( - flex: 2, + flex: 3, child: Text(item['status'] ?? '-', style: _dataBold), ), Expanded( flex: 2, child: Text( - item['remarks'] ?? '-', + // item['remarks'] ?? '-', + (item['remarks'] ?? '').length > 10 + ? '${item['remarks'].substring(0, 10)}...' + : item['remarks'] ?? '', style: _dataBold, - softWrap: true, - maxLines: 3, + // softWrap: true, + overflow: TextOverflow.ellipsis, + maxLines: 1, ), ), diff --git a/lib/presentation/screens/UserManagement/Staff/staffList.dart b/lib/presentation/screens/UserManagement/Staff/staffList.dart index 2ce6dad..c8ee847 100644 --- a/lib/presentation/screens/UserManagement/Staff/staffList.dart +++ b/lib/presentation/screens/UserManagement/Staff/staffList.dart @@ -81,28 +81,53 @@ class StaffListState extends ConsumerState { return sortedData.sublist(startIndex, endIndex); } + // void filterData(String query) { + // print("FilterDAta - $query"); + // setState(() { + // filteredData = getStaffData.where((item) { + // final isActiveStatus = item['is_active'] == "1" ? "active" : "inactive"; + // + // return (item['name'] ?? '-').toLowerCase().contains( + // query.toLowerCase(), + // ) || + // (item['email'] ?? '-').toLowerCase().contains( + // query.toLowerCase(), + // ) || + // (item['mobile'] ?? '-').toLowerCase().contains( + // query.toLowerCase(), + // ) || + // (item['address'] ?? '-').toLowerCase().contains( + // query.toLowerCase(), + // ) || + // (item['emp_id'] ?? item['agent_code'] ?? '-') + // .toLowerCase() + // .contains(query.toLowerCase()) || + // isActiveStatus.contains(query.toLowerCase()); + // }).toList(); + // }); + // } + void filterData(String query) { - print("FilterDAta - $query"); setState(() { + final q = query.toLowerCase(); + + if (q.isEmpty) { + filteredData = getStaffData; + return; + } + filteredData = getStaffData.where((item) { final isActiveStatus = item['is_active'] == "1" ? "active" : "inactive"; - return (item['name'] ?? '-').toLowerCase().contains( - query.toLowerCase(), - ) || - (item['email'] ?? '-').toLowerCase().contains( - query.toLowerCase(), - ) || - (item['mobile'] ?? '-').toLowerCase().contains( - query.toLowerCase(), - ) || - (item['address'] ?? '-').toLowerCase().contains( - query.toLowerCase(), - ) || - (item['emp_id'] ?? item['agent_code'] ?? '-') + return (item['name'] ?? '').toString().toLowerCase().contains(q) || + (item['email'] ?? '').toString().toLowerCase().contains(q) || + (item['mobile'] ?? '').toString().toLowerCase().contains(q) || + (item['address'] ?? '').toString().toLowerCase().contains(q) || + (item['emp_id'] ?? item['agent_code'] ?? '') + .toString() .toLowerCase() - .contains(query.toLowerCase()) || - isActiveStatus.contains(query.toLowerCase()); + .contains(q) || + isActiveStatus.contains(q); }).toList(); }); } diff --git a/lib/presentation/screens/handler/enquiryList.dart b/lib/presentation/screens/handler/enquiryList.dart index 1f319c5..ec33606 100644 --- a/lib/presentation/screens/handler/enquiryList.dart +++ b/lib/presentation/screens/handler/enquiryList.dart @@ -150,25 +150,30 @@ class EnquiryHandlerState extends ConsumerState { ); } - void refrshfilterDateRange() { - setState(() async { - final prefs = await SharedPreferences.getInstance(); + Future refrshfilterDateRange() async { + // setState(() async { + final prefs = await SharedPreferences.getInstance(); - // ✅ Clear any old data - await prefs.remove('dashboardKeyProvider'); - await prefs.remove('dashboardStatusProvider'); - await prefs.remove('dashboardStaffIdProvider'); - SelectedStatus = ''; - SelectedStaffId = null; - controllers['startDate']!.clear(); - controllers['endDate']!.clear(); + // ✅ Clear any old data + await prefs.remove('dashboardKeyProvider'); + await prefs.remove('dashboardStatusProvider'); + await prefs.remove('dashboardStaffIdProvider'); + SelectedStatus = ''; + SelectedStaffId = null; + controllers['startDate']!.clear(); + controllers['endDate']!.clear(); - controllers['startDate']?.text = ''; - controllers['endDate']?.text = ''; - // Reset the FormField validation - _formKey.currentState?.reset(); - }); - getStaffList(managerId, roleId); + controllers['startDate']?.text = ''; + controllers['endDate']?.text = ''; + // Reset the FormField validation + _formKey.currentState?.reset(); + // }); + getStaffList( + managerId, + roleId, + SelectedStatus: SelectedStatus ?? '', + SelectedStaffId: SelectedStaffId ?? '', + ); } Future getStaffList( @@ -898,43 +903,43 @@ class EnquiryHandlerState extends ConsumerState { children: [ Expanded( flex: 2, - child: Text('Received Date', style: _headerStyle), + child: Text('Received Date ', style: _headerStyle), ), - Expanded(flex: 2, child: Text('Partner', style: _headerStyle)), + Expanded(flex: 2, child: Text('Partner ', style: _headerStyle)), Expanded( flex: 2, - child: Text('Assigned To', style: _headerStyle), + child: Text('Assigned To ', style: _headerStyle), ), - Expanded(flex: 3, child: Text('Insurer', style: _headerStyle)), + Expanded(flex: 3, child: Text('Insurer ', style: _headerStyle)), Expanded( flex: 2, - child: Text('Vehicle.No', style: _headerStyle), - ), - Expanded( - flex: 2, - // child: Padding( - // padding: EdgeInsets.only(left: 8.0), - child: Text('Insured Name', style: _headerStyle), - // ), + child: Text('Vehicle.No ', style: _headerStyle), ), + // Expanded( + // flex: 2, + // // child: Padding( + // // padding: EdgeInsets.only(left: 8.0), + // child: Text('Insured Name ', style: _headerStyle), + // // ), + // ), Expanded( flex: 2, - child: Text('Assigned Date', style: _headerStyle), + child: Text('Assigned Date ', style: _headerStyle), ), - Expanded(flex: 2, child: Text('Premium', style: _headerStyle)), + Expanded(flex: 2, child: Text('Premium ', style: _headerStyle)), Expanded( flex: 2, - child: Text('Payment Mode', style: _headerStyle), + child: Text('Payment Mode ', style: _headerStyle), ), Expanded( flex: 2, - child: Text('Policy Number', style: _headerStyle), + child: Text('Policy Number ', style: _headerStyle), ), - Expanded(flex: 2, child: Text('Status', style: _headerStyle)), + Expanded(flex: 2, child: Text('Status ', style: _headerStyle)), Expanded(flex: 1, child: Text('Action', style: _headerStyle)), ], ), @@ -1059,19 +1064,26 @@ class EnquiryHandlerState extends ConsumerState { ), Expanded( flex: 2, - child: Text(item['reg_no'] ?? '-', style: _dataBold), - ), - Expanded( - flex: 2, - - child: Text( - item['insured_name'] ?? '-', - style: _dataBold, - softWrap: true, - maxLines: 3, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(item['reg_no'] ?? '-', style: _dataBold), + Text(item['insured_name'] ?? '-', style: _dataBoldsmall), + ], ), ), + // Expanded( + // flex: 2, + // + // child: Text( + // item['insured_name'] ?? '-', + // style: _dataBold, + // softWrap: true, + // maxLines: 3, + // ), + // ), Expanded( flex: 2, child: Text( @@ -1350,6 +1362,12 @@ class EnquiryHandlerState extends ConsumerState { fontWeight: FontWeight.w400, color: Color(0xFF000000), ); + static final _dataBoldsmall = TextStyle( + fontSize: 12, + + fontWeight: FontWeight.w400, + color: Color(0xFF000000), + ); static final _dataSub = TextStyle( fontSize: 10, diff --git a/lib/presentation/screens/staff/Enquiry/enquiry_list.dart b/lib/presentation/screens/staff/Enquiry/enquiry_list.dart index 269603a..936adc8 100644 --- a/lib/presentation/screens/staff/Enquiry/enquiry_list.dart +++ b/lib/presentation/screens/staff/Enquiry/enquiry_list.dart @@ -866,8 +866,8 @@ class EnquiryStaffState extends ConsumerState { child: const Row( children: [ Expanded( - flex: 3, - child: Text('Received Date & Time', style: _headerStyle), + flex: 2, + child: Text('Received Date', style: _headerStyle), ), Expanded(flex: 2, child: Text('Partner ', style: _headerStyle)), Expanded( @@ -884,8 +884,8 @@ class EnquiryStaffState extends ConsumerState { child: Text('Insured Name', style: _headerStyle), ), Expanded( - flex: 3, - child: Text('Assigned Date & Time', style: _headerStyle), + flex: 2, + child: Text('Assigned Date', style: _headerStyle), ), Expanded(flex: 3, child: Text('Status', style: _headerStyle)), ], @@ -952,7 +952,7 @@ class EnquiryStaffState extends ConsumerState { child: Row( children: [ Expanded( - flex: 3, + flex: 2, child: Text( _formatDate(item['created_on']) ?? '-', style: _dataBold, @@ -1018,7 +1018,8 @@ class EnquiryStaffState extends ConsumerState { position: RelativeRect.fromLTRB( position.dx, position.dy + button.size.height, - overlay.size.width - position.dx, + overlay.size.width, + // overlay.size.width - position.dx, 0, ), items: [ @@ -1067,7 +1068,7 @@ class EnquiryStaffState extends ConsumerState { ), Expanded( - flex: 3, + flex: 2, child: Text( _formatDate(item['updated_on']) ?? '-', style: _dataBold, @@ -1303,12 +1304,12 @@ class EnquiryStaffState extends ConsumerState { Widget buildDocRC(BuildContext context, bool isMobile, selectedEnquiryId) { return GestureDetector( onTap: () { - // print("Upload $idget.id}{w"); final selectedId = selectedEnquiryId; // final path = // 'api/agent/downloadAgentIncentiveFile?id=$selectedId'; final path = 'api/enquiry/downloadEnquiryFile?enquiry_id=$selectedId&file_type=rc'; + apiService.getPdfDownload(path, selectedId); }, child: Container( diff --git a/lib/presentation/screens/staff/policy/policy.dart b/lib/presentation/screens/staff/policy/policy.dart index 1830eb5..482f7fe 100644 --- a/lib/presentation/screens/staff/policy/policy.dart +++ b/lib/presentation/screens/staff/policy/policy.dart @@ -1217,12 +1217,16 @@ class PolicyScreenState extends ConsumerState { ).format(date); // auto set end date (1 year later - 1 day if needed) + // final endDate = DateTime( + // date.year + 1, + // date.month, + // date.day, + // ); // optional: subtract 1 day final endDate = DateTime( date.year + 1, date.month, date.day, - ); // optional: subtract 1 day - + ).subtract(const Duration(days: 1)); controllers['endDate']?.text = DateFormat( 'dd-MM-yyyy', ).format(endDate); diff --git a/lib/presentation/screens/staff/policy/policy_list.dart b/lib/presentation/screens/staff/policy/policy_list.dart index a8f8be5..4400c6a 100644 --- a/lib/presentation/screens/staff/policy/policy_list.dart +++ b/lib/presentation/screens/staff/policy/policy_list.dart @@ -664,13 +664,13 @@ class policylistState extends ConsumerState { child: Row( children: [ Expanded( - flex: 4, - child: Text('Recieved Date/Time', style: _headerStyle), + flex: 2, + child: Text('Recieved Date', style: _headerStyle), ), - Expanded(flex: 3, child: Text('Partner', style: _headerStyle)), + Expanded(flex: 2, child: Text('Partner', style: _headerStyle)), Expanded( - flex: 3, + flex: 2, child: Text('Assigned To', style: _headerStyle), ), Expanded(flex: 4, child: Text('Insurer', style: _headerStyle)), @@ -794,7 +794,7 @@ class policylistState extends ConsumerState { child: Row( children: [ Expanded( - flex: 4, + flex: 2, child: Text( _formatDate(item['updated_on']) ?? '-', style: _dataBold, @@ -804,14 +804,14 @@ class policylistState extends ConsumerState { ), Expanded( - flex: 3, + flex: 2, child: Text( _formatDate(item['agent_name']) ?? '-', style: _dataBold, ), ), Expanded( - flex: 3, + flex: 2, child: Text(item['assigned_to_name'] ?? '-', style: _dataBold), ), Expanded( diff --git a/pubspec.lock b/pubspec.lock index 7ae7a0d..bbb6d37 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -504,6 +504,14 @@ packages: description: flutter source: sdk version: "0.0.0" + fluttertoast: + dependency: "direct main" + description: + name: fluttertoast + sha256: "144ddd74d49c865eba47abe31cbc746c7b311c82d6c32e571fd73c4264b740e2" + url: "https://pub.dev" + source: hosted + version: "9.0.0" frontend_server_client: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index e4d833f..289d8f5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -68,6 +68,7 @@ dependencies: excel: ^4.0.6 dropdown_search: ^6.0.2 file_picker: ^10.3.3 + fluttertoast: ^9.0.0 dev_dependencies: flutter_test: