diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index a59a342..82c5629 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":"device_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/device_info_plus-11.5.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.7/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.4/","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.2.1/","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":"pdf_render","path":"/home/venba/.pub-cache/hosted/pub.dev/pdf_render-1.4.12/","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":"syncfusion_flutter_pdfviewer","path":"/home/venba/.pub-cache/hosted/pub.dev/syncfusion_flutter_pdfviewer-31.1.19/","native_build":true,"dependencies":["device_info_plus"],"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":"device_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/device_info_plus-11.5.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.7/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.4/","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.31/","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.2.1/","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.19/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"pdf_render","path":"/home/venba/.pub-cache/hosted/pub.dev/pdf_render-1.4.12/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.13/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"syncfusion_flutter_pdfviewer","path":"/home/venba/.pub-cache/hosted/pub.dev/syncfusion_flutter_pdfviewer-31.1.19/","native_build":true,"dependencies":["device_info_plus"],"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":"device_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/device_info_plus-11.5.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.7/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.4/","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.2.1/","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":"pdf_render","path":"/home/venba/.pub-cache/hosted/pub.dev/pdf_render-1.4.12/","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":"syncfusion_pdfviewer_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/syncfusion_pdfviewer_macos-31.1.19/","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":"device_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/device_info_plus-11.5.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.7/","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":"syncfusion_pdfviewer_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/syncfusion_pdfviewer_linux-31.1.19/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.2/","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":"device_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/device_info_plus-11.5.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.7/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","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":"syncfusion_pdfviewer_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/syncfusion_pdfviewer_windows-31.1.19/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.5/","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":"device_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/device_info_plus-11.5.0/","dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.7/","dependencies":[],"dev_dependency":false},{"name":"firebase_auth_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth_web-6.1.0/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core_web-3.3.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.1.0/","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.1.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":"pdf_render","path":"/home/venba/.pub-cache/hosted/pub.dev/pdf_render-1.4.12/","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":"syncfusion_pdfviewer_web","path":"/home/venba/.pub-cache/hosted/pub.dev/syncfusion_pdfviewer_web-31.1.19/","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":"device_info_plus","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"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":"pdf_render","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":"syncfusion_flutter_pdfviewer","dependencies":["url_launcher","device_info_plus","syncfusion_pdfviewer_web","syncfusion_pdfviewer_macos","syncfusion_pdfviewer_windows","syncfusion_pdfviewer_linux"]},{"name":"syncfusion_pdfviewer_linux","dependencies":[]},{"name":"syncfusion_pdfviewer_macos","dependencies":[]},{"name":"syncfusion_pdfviewer_web","dependencies":[]},{"name":"syncfusion_pdfviewer_windows","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":[]}],"date_created":"2025-12-19 18:43:25.853491","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":"device_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/device_info_plus-11.5.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.7/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.4/","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.2.1/","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":"pdf_render","path":"/home/venba/.pub-cache/hosted/pub.dev/pdf_render-1.4.12/","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":"syncfusion_flutter_pdfviewer","path":"/home/venba/.pub-cache/hosted/pub.dev/syncfusion_flutter_pdfviewer-31.1.19/","native_build":true,"dependencies":["device_info_plus"],"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":"device_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/device_info_plus-11.5.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.7/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.4/","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.31/","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.2.1/","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.19/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"pdf_render","path":"/home/venba/.pub-cache/hosted/pub.dev/pdf_render-1.4.12/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/home/venba/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.13/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"syncfusion_flutter_pdfviewer","path":"/home/venba/.pub-cache/hosted/pub.dev/syncfusion_flutter_pdfviewer-31.1.19/","native_build":true,"dependencies":["device_info_plus"],"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":"device_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/device_info_plus-11.5.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.7/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging-16.0.4/","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.2.1/","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":"pdf_render","path":"/home/venba/.pub-cache/hosted/pub.dev/pdf_render-1.4.12/","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":"syncfusion_pdfviewer_macos","path":"/home/venba/.pub-cache/hosted/pub.dev/syncfusion_pdfviewer_macos-31.1.19/","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":"device_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/device_info_plus-11.5.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.7/","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":"syncfusion_pdfviewer_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/syncfusion_pdfviewer_linux-31.1.19/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_linux","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.2/","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":"device_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/device_info_plus-11.5.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.7/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"firebase_auth","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth-6.1.2/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"firebase_core","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core-4.2.1/","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":"syncfusion_pdfviewer_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/syncfusion_pdfviewer_windows-31.1.19/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_windows","path":"/home/venba/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.5/","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":"device_info_plus","path":"/home/venba/.pub-cache/hosted/pub.dev/device_info_plus-11.5.0/","dependencies":[],"dev_dependency":false},{"name":"file_picker","path":"/home/venba/.pub-cache/hosted/pub.dev/file_picker-10.3.7/","dependencies":[],"dev_dependency":false},{"name":"firebase_auth_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_auth_web-6.1.0/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"firebase_core_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_core_web-3.3.0/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/home/venba/.pub-cache/hosted/pub.dev/firebase_messaging_web-4.1.0/","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.1.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":"pdf_render","path":"/home/venba/.pub-cache/hosted/pub.dev/pdf_render-1.4.12/","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":"syncfusion_pdfviewer_web","path":"/home/venba/.pub-cache/hosted/pub.dev/syncfusion_pdfviewer_web-31.1.19/","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":"device_info_plus","dependencies":[]},{"name":"file_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"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":"pdf_render","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":"syncfusion_flutter_pdfviewer","dependencies":["url_launcher","device_info_plus","syncfusion_pdfviewer_web","syncfusion_pdfviewer_macos","syncfusion_pdfviewer_windows","syncfusion_pdfviewer_linux"]},{"name":"syncfusion_pdfviewer_linux","dependencies":[]},{"name":"syncfusion_pdfviewer_macos","dependencies":[]},{"name":"syncfusion_pdfviewer_web","dependencies":[]},{"name":"syncfusion_pdfviewer_windows","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":[]}],"date_created":"2025-12-23 10:01:20.068991","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 2266257..f01254f 100644 --- a/lib/core/services/api_service.dart +++ b/lib/core/services/api_service.dart @@ -43,23 +43,6 @@ class ApiService { return _handleResponse(response); } - // Future> _makePostRequest( - // Uri url, Map body, Map headers) async { - // final response = await http.post(url, headers: headers, body: body); - // return _handleResponse(response); - // } - // - // Future> _handleResponse(http.Response response) async { - // if (response.statusCode == 200) { - // return jsonDecode(response.body); - // } else if (response.statusCode == 401) { - // await clearLocalStorageAndRedirect(); - // return {}; - // } else { - // throw Exception('Failed to load data'); - // } - // } - Future _makeGethttpRequest( Uri url, Map headers, @@ -176,21 +159,39 @@ class ApiService { } // 3. UNAUTHORIZED / FORBIDDEN (The 401/403 Fix) - if ((response.statusCode == 401 && body['status'] == 401) || - (response.statusCode == 403 && body['status'] == 403)) { - // Perform cleanup - await AuthService.clearToken(); + // if ((response.statusCode == 401 && body['status'] == 401) || + // (response.statusCode == 403 && body['status'] == 403)) { + // // Perform cleanup + // await AuthService.clearToken(); + // + // // Redirect using global appRouter (avoids context errors) + // context.go(AppRoutes.login); + // + // // Return a structured error so the UI knows why it failed + // return {'status': 401, 'message': 'Session expired or invalid'}; + // } + // + // if (response.statusCode == 401 || response.statusCode == 403) { + // await clearLocalStorageAndRedirect(); + // return {}; + // } - // Redirect using global appRouter (avoids context errors) - context.go(AppRoutes.login); + final message = (body['message'] ?? body['error'] ?? '') + .toString() + .toLowerCase(); - // Return a structured error so the UI knows why it failed - return {'status': 401, 'message': 'Session expired or invalid'}; - } + // 2️⃣ TOKEN / AUTH FAILURE (message OR status based) + final isAuthError = + response.statusCode == 401 || + response.statusCode == 403 || + message.contains('token required') || + message.contains('invalid or expired token'); - if (response.statusCode == 401 || response.statusCode == 403) { - await clearLocalStorageAndRedirect(); - return {}; + if (isAuthError) { + await clearLocalStorageAndRedirect(); // handles navigation internally + + // Stop further execution + throw Exception('Authentication error'); } // 4. ALL OTHER ERRORS diff --git a/lib/presentation/screens/Enquiry/enquiry/policy_popup.dart b/lib/presentation/screens/Enquiry/enquiry/policy_popup.dart index c1fc719..53dbed8 100644 --- a/lib/presentation/screens/Enquiry/enquiry/policy_popup.dart +++ b/lib/presentation/screens/Enquiry/enquiry/policy_popup.dart @@ -785,6 +785,7 @@ class _AddDialogState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, children: [ buildUploadDocumentClaims(context), SizedBox(width: 15), @@ -813,6 +814,7 @@ class _AddDialogState extends State { SizedBox(height: 10), Row( + crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ buildUploadDocumentClaims(context), @@ -850,11 +852,11 @@ class _AddDialogState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text("Claims Description ", style: _textStyle), - // SizedBox(height: 10), + SizedBox(height: 10), ThemedFormField( backgroundColor: Color(0xFFEDF6F5), controller: controllers['claimsDesc']!, - txtheight: 45, + // txtheight: 45, validator: (value) => Validators.requiredField(value, "claimsDesc"), txtwidth: ResponsiveLayout.isMobile(context) ? null @@ -960,7 +962,7 @@ class _AddDialogState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text("Upload Document", style: _textStyle), - SizedBox(width: 10), + SizedBox(height: 10), ThemedUploadField( backgroundColor: Color(0xFFEDF6F5), hintText: selectedClaimFileNames ?? "Upload Document", @@ -1143,8 +1145,8 @@ class _AddDialogState extends State { txtwidth: ResponsiveLayout.isMobile(context) ? null : MediaQuery.of(context).size.width * 0.26, - keyboardType: TextInputType.multiline, - txtheight: 45, + // keyboardType: TextInputType.multiline, + // txtheight: 45, ), ], ); diff --git a/lib/presentation/screens/dashboard/tabs/bussiness.dart b/lib/presentation/screens/dashboard/tabs/bussiness.dart index bdd2e54..865b1db 100644 --- a/lib/presentation/screens/dashboard/tabs/bussiness.dart +++ b/lib/presentation/screens/dashboard/tabs/bussiness.dart @@ -719,6 +719,7 @@ class _BussinessDashboardState extends ConsumerState { crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( + crossAxisAlignment: CrossAxisAlignment.center, children: [ Expanded(child: Text('Product-Wise', style: _chartHeader)), Text( diff --git a/lib/presentation/screens/dashboard/tabs/partner.dart b/lib/presentation/screens/dashboard/tabs/partner.dart index 34eab5b..d9fd884 100644 --- a/lib/presentation/screens/dashboard/tabs/partner.dart +++ b/lib/presentation/screens/dashboard/tabs/partner.dart @@ -301,7 +301,7 @@ class _DashboardState extends ConsumerState { scrollDirection: Axis.vertical, child: Column( children: [ - if (role == 'manager' || role == 'hanlder') + if (role == 'manager' || role == 'handler') SizedBox( height: MediaQuery.of(context).size.height * 0.78, // ✅ replace Expanded diff --git a/lib/presentation/screens/dashboard/tabs/productivity.dart b/lib/presentation/screens/dashboard/tabs/productivity.dart index 8e03f76..67470f2 100644 --- a/lib/presentation/screens/dashboard/tabs/productivity.dart +++ b/lib/presentation/screens/dashboard/tabs/productivity.dart @@ -353,6 +353,7 @@ class _ProductivityDashboardState extends ConsumerState { return Card( margin: const EdgeInsets.only(right: 10), color: Colors.white, + shadowColor: Colors.black, elevation: 1, // card shadow shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), @@ -394,17 +395,20 @@ class _ProductivityDashboardState extends ConsumerState { ], ), SizedBox(height: 10), - Expanded( - child: CustomStackedBarChart( - labels: staffLabels, - labelsId: staffLabelsId, - // maxY: (maxPremium * 1.1).ceilToDouble(), - maxY: _getSmartMaxValue(), - initialRotation: 1, - dataList: [], - productsList: staffChartData, - vehicleTypeNames: - staffVehicleTypeNames, // 👈 NEW: Pass vehicle names + Container( + // color: Colors.amber.shade100, + child: Expanded( + child: CustomStackedBarChart( + labels: staffLabels, + labelsId: staffLabelsId, + // maxY: (maxPremium * 1.1).ceilToDouble(), + maxY: _getSmartMaxValue(), + initialRotation: 1, + dataList: [], + productsList: staffChartData, + vehicleTypeNames: + staffVehicleTypeNames, // 👈 NEW: Pass vehicle names + ), ), ), Row(children: [Expanded(child: legendWidget())]), diff --git a/lib/presentation/screens/payout/custom_dateRange.dart b/lib/presentation/screens/payout/custom_dateRange.dart index da2e71f..d33b695 100644 --- a/lib/presentation/screens/payout/custom_dateRange.dart +++ b/lib/presentation/screens/payout/custom_dateRange.dart @@ -292,7 +292,7 @@ class _DateFilterRowState extends ConsumerState { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('Start Date', style: _textStyle), + Text('Start Date *', style: _textStyle), SizedBox(height: 5), SizedBox( height: 35, @@ -323,7 +323,7 @@ class _DateFilterRowState extends ConsumerState { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('End Date', style: _textStyle), + Text('End Date *', style: _textStyle), SizedBox(height: 5), SizedBox( height: 35, @@ -371,7 +371,7 @@ class _DateFilterRowState extends ConsumerState { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text('Broker', style: _textStyle), + Text('Broker *', style: _textStyle), SizedBox(height: 5), SizedBox( height: 35, @@ -523,7 +523,7 @@ class _DateFilterRowState extends ConsumerState { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text("Referer", style: _textStyle), + Text("Referer *", style: _textStyle), SizedBox(height: 5), SizedBox( height: 35, @@ -554,9 +554,14 @@ class _DateFilterRowState extends ConsumerState { // }, validator: (val) { if (val == null || val.isEmpty) { - return "Required"; + return ""; // 👈 triggers error border, no text } return null; + + // if (val == null || val.isEmpty) { + // return "Required"; + // } + // return null; }, decoratorProps: DropDownDecoratorProps( @@ -569,6 +574,7 @@ class _DateFilterRowState extends ConsumerState { color: Colors.black, ), filled: true, + errorStyle: const TextStyle(height: 0, fontSize: 0), fillColor: Colors.white, // 👈 makes the dropdown input white enabledBorder: OutlineInputBorder( diff --git a/lib/presentation/screens/payout/payout_screen.dart b/lib/presentation/screens/payout/payout_screen.dart index f46bc16..ab25cc5 100644 --- a/lib/presentation/screens/payout/payout_screen.dart +++ b/lib/presentation/screens/payout/payout_screen.dart @@ -783,8 +783,8 @@ class _PayOutScreenState extends ConsumerState { ), ), ), - SizedBox(height: 5), + // SizedBox(height: 5), if (!isEdit) ...[ Container( padding: EdgeInsets.all(8.0), @@ -828,6 +828,8 @@ class _PayOutScreenState extends ConsumerState { }, ), ), + + SizedBox(height: 10), ], // Policy Selection Card( diff --git a/lib/presentation/screens/staff/policy/policy_list.dart b/lib/presentation/screens/staff/policy/policy_list.dart index 13dd8bf..9e8ec78 100644 --- a/lib/presentation/screens/staff/policy/policy_list.dart +++ b/lib/presentation/screens/staff/policy/policy_list.dart @@ -295,10 +295,13 @@ class policylistState extends ConsumerState { } Future fetchPolicyExcelReport() async { - final String fromDate = controllers['startDate']!.text; // "11-01-2025" - final String toDate = controllers['endDate']!.text; // "20-01-2025" - final response = await apiService.generatePolicyExcel(managerId,fromDate,toDate); + final String toDate = controllers['endDate']!.text; // "20-01-2025" + final response = await apiService.generatePolicyExcel( + managerId, + fromDate, + toDate, + ); // Map your controllers and IDs to the API parameters // final String fromDate = controllers['startDate']!.text; // "11-01-2025" // final String toDate = controllers['endDate']!.text; // "20-01-2025" @@ -321,7 +324,6 @@ class policylistState extends ConsumerState { // } } - @override Widget build(BuildContext context) { return MainLayout( @@ -824,7 +826,7 @@ class policylistState extends ConsumerState { SizedBox(width: 10), InkWell( onTap: () { - showAuditHistoryModal(context,item['id']); + showAuditHistoryModal(context, item['id']); }, child: Container( padding: EdgeInsets.all(5.4), @@ -859,42 +861,47 @@ class policylistState extends ConsumerState { onTap: () { context.push(AppRoutes.policyValidation, extra: item); }, - child: Container( - width: 80, // ⭐ FIXED WIDTH → Equal in both states - padding: const EdgeInsets.symmetric( - horizontal: 8, - vertical: 4, - ), - decoration: BoxDecoration( - color: item['is_data_accuracy_checked'] == '1' - ? const Color(0xFF2E7D6E) - : Colors.redAccent, - borderRadius: BorderRadius.circular(5), - ), - child: Row( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, // ⭐ Center content - children: [ - Icon( - item['is_data_accuracy_checked'] == '1' - ? Icons.check_circle - : Icons.error, - size: 12, - color: Colors.white, - ), - const SizedBox(width: 1), - Text( - item['is_data_accuracy_checked'] == '1' - ? 'Verified' - : 'To Verify', - style: GoogleFonts.poppins( + child: Tooltip( + message: item['is_data_accuracy_checked'] == '1' + ? 'Verified' + : 'To Verify', + child: Container( + width: 80, // ⭐ FIXED WIDTH → Equal in both states + padding: const EdgeInsets.symmetric( + horizontal: 8, + vertical: 4, + ), + decoration: BoxDecoration( + color: item['is_data_accuracy_checked'] == '1' + ? const Color(0xFF2E7D6E) + : Colors.redAccent, + borderRadius: BorderRadius.circular(5), + ), + child: Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment + .spaceEvenly, // ⭐ Center content + children: [ + Icon( + item['is_data_accuracy_checked'] == '1' + ? Icons.check_circle + : Icons.error, + size: 12, color: Colors.white, - fontSize: 10, - fontWeight: FontWeight.w500, ), - ), - ], + // const SizedBox(width: 1), + // Text( + // item['is_data_accuracy_checked'] == '1' + // ? 'Verified' + // : 'To Verify', + // style: GoogleFonts.poppins( + // color: Colors.white, + // fontSize: 10, + // fontWeight: FontWeight.w500, + // ), + // ), + ], + ), ), ), ), @@ -1134,7 +1141,10 @@ void showAuditHistoryModal(BuildContext context, dynamic policyId) { class AuditHistoryModal extends ConsumerStatefulWidget { final dynamic policyId; // Add this - const AuditHistoryModal({super.key, required this.policyId}); // Update constructor + const AuditHistoryModal({ + super.key, + required this.policyId, + }); // Update constructor @override ConsumerState createState() => AuditHistoryModalState(); @@ -1158,11 +1168,15 @@ class AuditHistoryModalState extends ConsumerState { setState(() => isLoading = true); try { // Use widget.policyId here! - final response = await apiService.fetchAuditHistory(widget.policyId.toString()); + final response = await apiService.fetchAuditHistory( + widget.policyId.toString(), + ); if (response != null && response['status'] == "success") { setState(() { - getAuditHistoryData = List>.from(response['data']); + getAuditHistoryData = List>.from( + response['data'], + ); }); } } catch (e) { @@ -1216,53 +1230,89 @@ class AuditHistoryModalState extends ConsumerState { ), const SizedBox(height: 5), Expanded( - child: isLoading - ? const Center(child: CircularProgressIndicator()) - : getAuditHistoryData.isEmpty - ? const Center(child: Text("No Audit History Data Found")) - : SingleChildScrollView( - scrollDirection: Axis.vertical, - child: SizedBox( - width: double.infinity, - child: Theme( - data: Theme.of(context).copyWith( - dividerColor: Colors.grey.shade200, - ), - child: DataTable( - headingRowColor: WidgetStateProperty.all(Color(0xFFF8FAFC)), - columnSpacing: 20, - columns: [ - DataColumn(label: Text("Column Name", style: _headerStyle())), - DataColumn(label: Text("Message", style: _headerStyle())), - DataColumn(label: Text("Changed On", style: _headerStyle())), - DataColumn(label: Text("Changed By", style: _headerStyle())), - ], - // Inside your build method's DataTable - rows: getAuditHistoryData.map((data) { - return DataRow(cells: [ - DataCell(Text(data['column_name'] ?? "-", style: _cellStyle())), - DataCell( - SizedBox( - width: 300, // Give message more width - child: Text( - data['message'] ?? "-", - style: _cellStyle(), - softWrap: true, // Ensure text wraps to next line + child: isLoading + ? const Center(child: CircularProgressIndicator()) + : getAuditHistoryData.isEmpty + ? const Center(child: Text("No Audit History Data Found")) + : SingleChildScrollView( + scrollDirection: Axis.vertical, + child: SizedBox( + width: double.infinity, + child: Theme( + data: Theme.of( + context, + ).copyWith(dividerColor: Colors.grey.shade200), + child: DataTable( + headingRowColor: WidgetStateProperty.all( + Color(0xFFF8FAFC), + ), + columnSpacing: 20, + columns: [ + DataColumn( + label: Text( + "Column Name", + style: _headerStyle(), + ), ), - ) + DataColumn( + label: Text("Message", style: _headerStyle()), + ), + DataColumn( + label: Text( + "Changed On", + style: _headerStyle(), + ), + ), + DataColumn( + label: Text( + "Changed By", + style: _headerStyle(), + ), + ), + ], + // Inside your build method's DataTable + rows: getAuditHistoryData.map((data) { + return DataRow( + cells: [ + DataCell( + Text( + data['column_name'] ?? "-", + style: _cellStyle(), + ), + ), + DataCell( + SizedBox( + width: 300, // Give message more width + child: Text( + data['message'] ?? "-", + style: _cellStyle(), + softWrap: + true, // Ensure text wraps to next line + ), + ), + ), + DataCell( + Text( + formatIndianDate( + data['changed_on'] ?? "", + ), + style: _cellStyle(), + ), + ), + DataCell( + Text( + data['changed_by'] ?? "-", + style: _cellStyle(), + ), + ), + ], + ); + }).toList(), + ), ), - DataCell(Text( - formatIndianDate(data['changed_on'] ?? ""), - style: _cellStyle(), - )), - DataCell(Text(data['changed_by'] ?? "-", style: _cellStyle())), - ]); - }).toList(), - ), - ), - ), - ), - ) + ), + ), + ), ], ), ), @@ -1270,19 +1320,22 @@ class AuditHistoryModalState extends ConsumerState { } } - // Helper styles to keep code clean - TextStyle _headerStyle() => GoogleFonts.poppins( - fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xFF475569)); +// Helper styles to keep code clean +TextStyle _headerStyle() => GoogleFonts.poppins( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xFF475569), +); - TextStyle _cellStyle() => GoogleFonts.poppins( - fontSize: 11, color: Color(0xFF1E293B)); +TextStyle _cellStyle() => + GoogleFonts.poppins(fontSize: 11, color: Color(0xFF1E293B)); - String formatIndianDate(String dateStr) { - try { - DateTime dateTime = DateTime.parse(dateStr); - // Format: Day-Month-Year Hour:Minute AM/PM - return DateFormat('dd-MM-yyyy hh:mm a').format(dateTime); - } catch (e) { - return dateStr; // Fallback to original string if parsing fails - } - } +String formatIndianDate(String dateStr) { + try { + DateTime dateTime = DateTime.parse(dateStr); + // Format: Day-Month-Year Hour:Minute AM/PM + return DateFormat('dd-MM-yyyy hh:mm a').format(dateTime); + } catch (e) { + return dateStr; // Fallback to original string if parsing fails + } +} diff --git a/lib/presentation/screens/staff/policy/policy_validation.dart b/lib/presentation/screens/staff/policy/policy_validation.dart index 95123f4..38bdb0f 100644 --- a/lib/presentation/screens/staff/policy/policy_validation.dart +++ b/lib/presentation/screens/staff/policy/policy_validation.dart @@ -36,6 +36,8 @@ class _policyValidationState extends ConsumerState { // --- Api / state late ApiService apiService; bool isLoading = false; + bool isLoadingVehicleType = false; + bool isLoadingFuelType = false; dynamic managerId; dynamic userId; @@ -266,7 +268,6 @@ class _policyValidationState extends ConsumerState { }); } - @override void dispose() { for (final controller in controllers.values) { @@ -289,7 +290,7 @@ class _policyValidationState extends ConsumerState { Future getVehicleType() async { print('getvehicleType called'); - setState(() => isLoading = true); + setState(() => isLoadingVehicleType = true); try { final response = await apiService.fetchPolicyMasterDropDown( @@ -311,13 +312,13 @@ class _policyValidationState extends ConsumerState { } catch (e) { print('Exception occurred: $e'); } finally { - setState(() => isLoading = false); + setState(() => isLoadingVehicleType = false); } } Future getFuelType() async { print('getfuelType called'); - setState(() => isLoading = true); + setState(() => isLoadingFuelType = true); try { final response = await apiService.fetchPolicyMasterDropDown('fuelType'); @@ -337,7 +338,7 @@ class _policyValidationState extends ConsumerState { } catch (e) { print('Exception occurred: $e'); } finally { - setState(() => isLoading = false); + setState(() => isLoadingFuelType = false); } } @@ -591,16 +592,16 @@ class _policyValidationState extends ConsumerState { // print('_fetchCommision2'); // 👉 CRITICAL FIX: Set loading to true BEFORE the API call starts - setState(() { isLoading = true; }); + setState(() { + isLoading = true; + }); try { - final payload = buildCommissionPayload(); debugPrint('Payload in fetchCommission: $payload'); final result = await apiService.calculateCommissionRequest(payload); debugPrint('Result in fetchCommission: $result'); - if (result != null && result['status'] == 'success') { if (!mounted) return; // setState(() => isLoading = false); @@ -613,12 +614,16 @@ class _policyValidationState extends ConsumerState { isLoading = false; // Stop loading if (commissionAmount != null) { // Update controller so the Confirm button becomes active - controllers["commission_amount"]?.text = - double.parse(commissionAmount.toString()).toStringAsFixed(2); + controllers["commission_amount"]?.text = double.parse( + commissionAmount.toString(), + ).toStringAsFixed(2); } }); - ToastHelper.showSuccessToast(context, "Commission calculated successfully"); + ToastHelper.showSuccessToast( + context, + "Commission calculated successfully", + ); // WidgetsBinding.instance.addPostFrameCallback((_) { // // Now safe to do navigation + provider updates @@ -728,7 +733,10 @@ class _policyValidationState extends ConsumerState { crossAxisAlignment: CrossAxisAlignment.start, // mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text("Vehicle Type", style: TextStyle(fontWeight: FontWeight.w500)), + Text( + "Vehicle Type", + style: GoogleFonts.poppins(fontWeight: FontWeight.w500, fontSize: 11), + ), const SizedBox(height: 6), DropdownSearch( key: dropDownKey, @@ -745,7 +753,7 @@ class _policyValidationState extends ConsumerState { validator: (val) { if (val == null || val.isEmpty) { - return "Required"; + return ""; // 👈 triggers error border, no text } return null; }, @@ -831,7 +839,10 @@ class _policyValidationState extends ConsumerState { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text("Fuel Type ", style: TextStyle(fontWeight: FontWeight.w500)), + Text( + "Fuel Type ", + style: GoogleFonts.poppins(fontWeight: FontWeight.w500, fontSize: 11), + ), const SizedBox(width: 6), DropdownSearch( key: dropDownKeyFuel, @@ -848,7 +859,7 @@ class _policyValidationState extends ConsumerState { validator: (val) { if (val == null || val.isEmpty) { - return "Required"; + return ""; // 👈 triggers error border, no text } return null; }, @@ -944,12 +955,12 @@ class _policyValidationState extends ConsumerState { color: Color(0xFF2E7D6E), shape: BoxShape.circle, ), - child: Icon(icon, size: 16, color: Colors.white), + child: Icon(icon, size: 12, color: Colors.white), ), const SizedBox(width: 10), Text( title, - style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600), + style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w600), ), ], ), @@ -968,7 +979,10 @@ class _policyValidationState extends ConsumerState { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(label, style: const TextStyle(fontWeight: FontWeight.w500)), + Text( + label, + style: GoogleFonts.poppins(fontWeight: FontWeight.w500, fontSize: 11), + ), const SizedBox(height: 6), TextFormField( controller: controller, @@ -976,9 +990,9 @@ class _policyValidationState extends ConsumerState { readOnly: readOnly, onTap: onTap, inputFormatters: inputFormatters, // 👈 USE HERE - validator: (value) { - if (required && (value == null || value.trim().isEmpty)) { - return "$label is required"; + validator: (val) { + if (val == null || val.isEmpty) { + return ""; // 👈 triggers error border, no text } return null; }, @@ -1026,10 +1040,16 @@ class _policyValidationState extends ConsumerState { // (controllers['commission_amount']?.text.isEmpty ?? true) // ? null // : _save, - onPressed: ( - widget.item?['is_data_accuracy_checked']?.toString() == '0' && - ((double.tryParse(controllers["commission_amount"]?.text ?? '0') ?? 0).floor() >= 1) - ) + onPressed: + (widget.item?['is_data_accuracy_checked']?.toString() == + '0' && + ((double.tryParse( + controllers["commission_amount"]?.text ?? + '0', + ) ?? + 0) + .floor() >= + 1)) ? _save : null, style: ElevatedButton.styleFrom( @@ -1045,8 +1065,8 @@ class _policyValidationState extends ConsumerState { ), child: Text( 'Confirm Data Accuracy ', - // '(${controllers["commission_amount"]?.text ?? '0'} | ' - // '${widget.item?['is_data_accuracy_checked'] ?? '0'})', + // '(${controllers["commission_amount"]?.text ?? '0'} | ' + // '${widget.item?['is_data_accuracy_checked'] ?? '0'})', style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600), ), ), @@ -1162,7 +1182,7 @@ class _policyValidationState extends ConsumerState { const Text( 'Original Policy Document', style: TextStyle( - fontSize: 16, + fontSize: 14, fontWeight: FontWeight.w600, ), ), @@ -1268,7 +1288,7 @@ class _policyValidationState extends ConsumerState { children: [ Expanded( child: _buildInput( - 'Policy Number', + 'Policy Number *', controllers['policyNumber']!, required: true, ), @@ -1276,7 +1296,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'Insured Name', + 'Insured Name *', controllers['insuredName']!, required: true, ), @@ -1287,7 +1307,7 @@ class _policyValidationState extends ConsumerState { children: [ Expanded( child: _buildInput( - 'Issued Date', + 'Issued Date *', controllers['issuedDate']!, readOnly: true, required: true, @@ -1300,7 +1320,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'Start Date', + 'Start Date *', controllers['startDate']!, readOnly: true, @@ -1314,7 +1334,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'End Date', + 'End Date *', controllers['endDate']!, readOnly: true, required: true, @@ -1330,7 +1350,7 @@ class _policyValidationState extends ConsumerState { children: [ Expanded( child: _buildInput( - 'Premium Amount', + 'Premium Amount *', controllers['premiumAmount']!, required: true, @@ -1345,7 +1365,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'Remarks', + 'Remarks *', required: false, controllers['remarks']!, ), @@ -1357,7 +1377,7 @@ class _policyValidationState extends ConsumerState { ), ), - const SizedBox(height: 12), + const SizedBox(height: 7), // Tax Details Card( @@ -1373,7 +1393,7 @@ class _policyValidationState extends ConsumerState { CrossAxisAlignment.stretch, children: [ _sectionHeader( - 'Tax / Cover Details', + 'Tax / Cover Details *', icon: Icons.attach_money, ), SizedBox(height: 10), @@ -1381,7 +1401,7 @@ class _policyValidationState extends ConsumerState { children: [ Expanded( child: _buildInput( - 'TP', + 'TP *', controllers['tp']!, required: true, keyboardType: @@ -1395,7 +1415,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'OD', + 'OD *', controllers['od']!, required: true, keyboardType: @@ -1409,7 +1429,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'PA', + 'PA *', controllers['pa']!, required: true, keyboardType: @@ -1426,7 +1446,7 @@ class _policyValidationState extends ConsumerState { children: [ Expanded( child: _buildInput( - 'CGST', + 'CGST *', controllers['cgst']!, required: true, keyboardType: @@ -1440,7 +1460,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'SGST', + 'SGST *', controllers['sgst']!, required: true, keyboardType: @@ -1454,7 +1474,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'IGST', + 'IGST *', controllers['igst']!, required: true, keyboardType: @@ -1472,7 +1492,7 @@ class _policyValidationState extends ConsumerState { ), ), - const SizedBox(height: 12), + const SizedBox(height: 7), // Vehicle Details Card( @@ -1497,7 +1517,7 @@ class _policyValidationState extends ConsumerState { children: [ Expanded( child: _buildInput( - 'RTO State Name', + 'RTO State Name *', controllers['rtoStateCode']!, required: true, ), @@ -1505,7 +1525,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'RTO City Code', + 'RTO City Code *', controllers['rtoCityCode']!, required: true, keyboardType: @@ -1517,7 +1537,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'Weight', + 'Weight *', controllers['weight']!, required: true, keyboardType: @@ -1541,7 +1561,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'Date of Registration', + 'Date of Registration *', controllers['dateOfRegistration']!, required: true, readOnly: true, @@ -1554,7 +1574,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'Year of Manufacture', + 'Year of Manufacture *', controllers['yearOfManufacture']!, required: true, keyboardType: @@ -1569,7 +1589,7 @@ class _policyValidationState extends ConsumerState { children: [ Expanded( child: _buildInput( - 'Engine No', + 'Engine No *', controllers['engineNo']!, required: true, ), @@ -1577,7 +1597,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'Chassis No', + 'Chassis No *', controllers['chassisNo']!, required: true, ), @@ -1586,7 +1606,7 @@ class _policyValidationState extends ConsumerState { Expanded( child: Expanded( child: _buildInput( - 'Make', + 'Make *', controllers['make']!, required: true, ), @@ -1598,7 +1618,7 @@ class _policyValidationState extends ConsumerState { children: [ Expanded( child: _buildInput( - 'Model', + 'Model *', controllers['model']!, required: true, ), @@ -1606,7 +1626,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'Cubic Capacity', + 'Cubic Capacity *', controllers['cubicCapacity']!, required: true, keyboardType: @@ -1634,8 +1654,7 @@ class _policyValidationState extends ConsumerState { ), ), ), - - const SizedBox(height: 12), + const SizedBox(height: 7), // Broker Details Card( @@ -1659,7 +1678,7 @@ class _policyValidationState extends ConsumerState { children: [ Expanded( child: _buildInput( - 'Broker Name', + 'Broker Name *', controllers['broker_name']!, required: true, ), @@ -1667,7 +1686,7 @@ class _policyValidationState extends ConsumerState { const SizedBox(width: 8), Expanded( child: _buildInput( - 'Commission Amount', + 'Commission Amount *', controllers['commission_amount']!, // required: true, keyboardType: @@ -1681,24 +1700,36 @@ class _policyValidationState extends ConsumerState { ], ), Row( - mainAxisAlignment: MainAxisAlignment.end, // Pushes children to the right + mainAxisAlignment: MainAxisAlignment + .end, // Pushes children to the right children: [ TextButton( - onPressed: (widget.item?['is_data_accuracy_checked'] == '1' || isLoading) + onPressed: + (widget.item?['is_data_accuracy_checked'] == + '1' || + isLoading) ? null // Disable if already checked or currently loading : _fetchCommision, - child: Text(isLoading ? "Calculating..." : "Calculate", + child: Text( + isLoading + ? "Calculating..." + : "Calculate", style: TextStyle( - color: (widget.item?['is_data_accuracy_checked'] == '1' || isLoading) + color: + (widget.item?['is_data_accuracy_checked'] == + '1' || + isLoading) ? Colors.grey - : const Color(0xFF2E7D6E), - fontWeight: FontWeight.bold, - ) + : const Color( + 0xFF2E7D6E, + ), + fontWeight: + FontWeight.bold, + ), ), - ), ], - ) + ), ], ), ), diff --git a/lib/presentation/themes/charts/barChart.dart b/lib/presentation/themes/charts/barChart.dart index 9b74b9d..3a844dc 100644 --- a/lib/presentation/themes/charts/barChart.dart +++ b/lib/presentation/themes/charts/barChart.dart @@ -94,6 +94,24 @@ class _CustomBarChartState extends ConsumerState { } String compactNumber(num value) { + if (value >= 10000000) { + return '${(value / 10000000).toStringAsFixed(1).replaceAll('.0', '')}Cr'; + } else if (value >= 1000000) { + return '${(value / 1000000).toStringAsFixed(1).replaceAll('.0', '')}M'; + } else if (value >= 1000) { + return '${(value / 1000).toStringAsFixed(1).replaceAll('.0', '')}K'; + } else if (value >= 1) { + // 👇 remove .0 ONLY when it's an integer + return value % 1 == 0 + ? value.toInt().toString() + : value.toStringAsFixed(1); + } else { + // 👇 keep decimals for small values + return value == 0 ? '0' : value.toStringAsFixed(1); + } + } + + String compactNumberToolTip(num value) { if (value >= 10000000) { return '${(value / 10000000).toStringAsFixed(1).replaceAll('.0', '')}Cr'; } else if (value >= 1000000) { @@ -187,7 +205,7 @@ class _CustomBarChartState extends ConsumerState { // rod.toY.round(), // ); - final formattedValue = compactNumber(rod.toY); + final formattedValue = compactNumberToolTip(rod.toY); return BarTooltipItem(formattedValue, textStyle); // return BarTooltipItem('${rod.toY.round()}', textStyle); }, diff --git a/lib/presentation/themes/charts/barChart_horizontal.dart b/lib/presentation/themes/charts/barChart_horizontal.dart index 55babf7..ec8ddbd 100644 --- a/lib/presentation/themes/charts/barChart_horizontal.dart +++ b/lib/presentation/themes/charts/barChart_horizontal.dart @@ -85,6 +85,7 @@ class _CustomBarChartState extends ConsumerState { // BarChartRodData(toY: 2, color: Colors.orange.shade300, width: 6), BarChartRodData( toY: value2, + // toY: value2, color: const Color(0xFFA5E4E1), // color: Colors.orange.shade300, width: 10, diff --git a/lib/presentation/themes/charts/stackedBarChart.dart b/lib/presentation/themes/charts/stackedBarChart.dart index ce3cf94..04c094e 100644 --- a/lib/presentation/themes/charts/stackedBarChart.dart +++ b/lib/presentation/themes/charts/stackedBarChart.dart @@ -60,12 +60,34 @@ class _CustomStackedBarChartState extends ConsumerState { }); } + String compactNumber(num value) { + if (value >= 10000000) { + return '${(value / 10000000).toStringAsFixed(1).replaceAll('.0', '')}Cr'; + } else if (value >= 1000000) { + return '${(value / 1000000).toStringAsFixed(1).replaceAll('.0', '')}M'; + } else if (value >= 1000) { + return '${(value / 1000).toStringAsFixed(1).replaceAll('.0', '')}K'; + } else if (value >= 1) { + // 👇 remove .0 ONLY when it's an integer + return value % 1 == 0 + ? value.toInt().toString() + : value.toStringAsFixed(1); + } else { + // 👇 keep decimals for small values + return value == 0 ? '0' : value.toStringAsFixed(1); + } + } + + // else { + // return value.toInt().toString(); + // } + @override Widget build(BuildContext context) { final maxY = widget.maxY <= 0 ? 100.0 : widget.maxY; return AspectRatio( - aspectRatio: 1.6, + aspectRatio: 4, child: BarChart( BarChartData( alignment: BarChartAlignment.spaceAround, @@ -110,7 +132,7 @@ class _CustomStackedBarChartState extends ConsumerState { bottomTitles: AxisTitles( sideTitles: SideTitles( showTitles: true, - reservedSize: 56, + reservedSize: 130, getTitlesWidget: (value, meta) { final i = value.toInt(); if (i < 0 || i >= widget.labels.length) { @@ -124,7 +146,7 @@ class _CustomStackedBarChartState extends ConsumerState { fontSize: 10, fontWeight: FontWeight.w500, ), - textAlign: TextAlign.center, + textAlign: TextAlign.end, ), ); }, @@ -140,7 +162,8 @@ class _CustomStackedBarChartState extends ConsumerState { child: Padding( padding: const EdgeInsets.only(right: 3.0), child: Text( - value.toInt().toString(), + compactNumber(value), + // value.toInt().toString(), textAlign: TextAlign.end, style: GoogleFonts.inter(fontSize: 10), ),