From 1619cb25dde4332df635b34f33125e1c1e16a534 Mon Sep 17 00:00:00 2001 From: SurendarSuri30 Date: Wed, 4 Jun 2025 16:52:11 +0530 Subject: [PATCH] case sensitive --- .../arm64-v8a/configure_fingerprint.bin | 24 +- .../armeabi-v7a/configure_fingerprint.bin | 24 +- .../574gs2w4/x86/configure_fingerprint.bin | 24 +- .../574gs2w4/x86_64/configure_fingerprint.bin | 24 +- android/app/build.gradle | 4 +- android/build.gradle | 10 + ios/Podfile.lock | 12 + ios/Runner.xcodeproj/project.pbxproj | 20 +- ios/Runner/Info.plist | 8 +- lib/config/app_links_helper.dart | 72 +++ .../UAE_Numbers/uae_numbers.dart | 4 +- .../auth_verification/registration.dart | 5 +- .../Screens/charts/screens/chart_screen.dart | 113 +++-- .../Screens/charts/widgets/chart_widget.dart | 442 ++++++++++++++++-- .../routes/auth_routes/login_route.dart | 77 ++- macos/Flutter/GeneratedPluginRegistrant.swift | 4 + pubspec.lock | 50 +- pubspec.yaml | 7 +- 18 files changed, 749 insertions(+), 175 deletions(-) create mode 100644 lib/config/app_links_helper.dart diff --git a/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/configure_fingerprint.bin index 1ac82c0b..3f03efa5 100644 --- a/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/configure_fingerprint.bin +++ b/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Log  /Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  2 +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  2  -/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/android_gradle_build.json  2 2 +/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/android_gradle_build.json  2 2  -/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/android_gradle_build_mini.json  2 2u +/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/android_gradle_build_mini.json  2 2u s -q/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/build.ninja  2 2y +q/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/build.ninja  2 2y w -u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/build.ninja.txt  2~ +u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/build.ninja.txt  2~ | -z/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/build_file_index.txt  2 _ 2 +z/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/build_file_index.txt  2 _ 2 } -{/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/compile_commands.json  2 +{/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/compile_commands.json  2  -/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/compile_commands.json.bin  2  +/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/compile_commands.json.bin  2   -/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/metadata_generation_command.txt  2 +/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/metadata_generation_command.txt  2  2| z -x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/prefab_config.json  2  ( 2 +x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/prefab_config.json  2  ( 2  -}/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/symbol_folder_index.txt  2  t 2c +}/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/symbol_folder_index.txt  2  t 2c a -_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  2  ހ2 \ No newline at end of file +_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  2  ހ2 \ No newline at end of file diff --git a/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/configure_fingerprint.bin index c88f783c..daab6016 100644 --- a/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/configure_fingerprint.bin +++ b/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Log  /Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  2 +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  2  -/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/android_gradle_build.json  2 2 +/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/android_gradle_build.json  2 2  -/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/android_gradle_build_mini.json  2 2w +/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/android_gradle_build_mini.json  2 2w u -s/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/build.ninja  2 2{ +s/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/build.ninja  2 2{ y -w/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/build.ninja.txt  2 +w/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/build.ninja.txt  2 ~ -|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/build_file_index.txt  2 _ 2 +|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/build_file_index.txt  2 _ 2  -}/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/compile_commands.json  2 +}/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/compile_commands.json  2  -/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/compile_commands.json.bin  2  +/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/compile_commands.json.bin  2   -/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/metadata_generation_command.txt  2 +/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/metadata_generation_command.txt  2  2~ | -z/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/prefab_config.json  2  ( 2 +z/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/prefab_config.json  2  ( 2  -/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/symbol_folder_index.txt  2  v 2c +/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/symbol_folder_index.txt  2  v 2c a -_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  2  ހ2 \ No newline at end of file +_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  2  ހ2 \ No newline at end of file diff --git a/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/configure_fingerprint.bin index 7f4200e4..2b2d3720 100644 --- a/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/configure_fingerprint.bin +++ b/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Log ~ |/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  ϧ2} +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  ϧ2} { -y/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/android_gradle_build.json  2 ϧ2 +y/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/android_gradle_build.json  2 ϧ2  -~/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/android_gradle_build_mini.json  2 Ч2o +~/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/android_gradle_build_mini.json  2 Ч2o m -k/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/build.ninja  2 ǧ2s +k/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/build.ninja  2 ǧ2s q -o/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/build.ninja.txt  2x +o/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/build.ninja.txt  2x v -t/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/build_file_index.txt  2 _ Ч2y +t/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/build_file_index.txt  2 _ Ч2y w -u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/compile_commands.json  2} +u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/compile_commands.json  2} { -y/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/compile_commands.json.bin  2  +y/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/compile_commands.json.bin  2   -/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/metadata_generation_command.txt  2 +/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/metadata_generation_command.txt  2  Ч2v t -r/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/prefab_config.json  2  ( Ч2{ +r/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/prefab_config.json  2  ( Ч2{ y -w/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/symbol_folder_index.txt  2  n Ч2c +w/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/symbol_folder_index.txt  2  n Ч2c a -_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  2  ހ2 \ No newline at end of file +_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  2  ހ2 \ No newline at end of file diff --git a/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/configure_fingerprint.bin index c3d384a7..aecda56d 100644 --- a/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/configure_fingerprint.bin +++ b/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Log  /Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  ҩ2 +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  ҩ2 ~ -|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/android_gradle_build.json  2 ҩ2 +|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/android_gradle_build.json  2 ҩ2  -/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/android_gradle_build_mini.json  2 ө2r +/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/android_gradle_build_mini.json  2 ө2r p -n/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/build.ninja  2 ˩2v +n/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/build.ninja  2 ˩2v t -r/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/build.ninja.txt  2{ +r/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/build.ninja.txt  2{ y -w/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/build_file_index.txt  2 _ ө2| +w/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/build_file_index.txt  2 _ ө2| z -x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/compile_commands.json  2 +x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/compile_commands.json  2 ~ -|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/compile_commands.json.bin  2  +|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/compile_commands.json.bin  2   -/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/metadata_generation_command.txt  2 +/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/metadata_generation_command.txt  2  ө2y w -u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/prefab_config.json  2  ( ө2~ +u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/prefab_config.json  2  ( ө2~ | -z/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/symbol_folder_index.txt  2  q ө2c +z/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/symbol_folder_index.txt  2  q ө2c a -_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  2  ހ2 \ No newline at end of file +_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  2  ހ2 \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 83716b02..7ee3cc68 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -20,12 +20,12 @@ if (project.hasProperty('google-services.json')) { def flutterVersionCode = localProperties.getProperty("flutter.versionCode") if (flutterVersionCode == null) { - flutterVersionCode = "56" + flutterVersionCode = "59" } def flutterVersionName = localProperties.getProperty("flutter.versionName") if (flutterVersionName == null) { - flutterVersionName = "1.0.55" + flutterVersionName = "1.0.58" } def keystorePropertiesFile = rootProject.file("key.properties") diff --git a/android/build.gradle b/android/build.gradle index 0f6859f8..f721bd9c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -14,6 +14,16 @@ allprojects { google() mavenCentral() } + subprojects { + configurations.all { + resolutionStrategy.eachDependency { DependencyResolveDetails details -> + if (details.requested.group == 'org.bouncycastle' && + details.requested.name == 'bcprov-jdk18on') { + details.useVersion '1.77' + } + } + } + } } rootProject.buildDir = "../build" diff --git a/ios/Podfile.lock b/ios/Podfile.lock index f4225401..e99ecab3 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,8 +1,12 @@ PODS: - app_links (0.0.2): - Flutter + - app_settings (5.1.1): + - Flutter - connectivity_plus (0.0.1): - Flutter + - device_info_plus (0.0.1): + - Flutter - Firebase/CoreOnly (11.10.0): - FirebaseCore (~> 11.10.0) - Firebase/Messaging (11.10.0): @@ -99,7 +103,9 @@ PODS: DEPENDENCIES: - app_links (from `.symlinks/plugins/app_links/ios`) + - app_settings (from `.symlinks/plugins/app_settings/ios`) - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) + - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) - Flutter (from `Flutter`) @@ -130,8 +136,12 @@ SPEC REPOS: EXTERNAL SOURCES: app_links: :path: ".symlinks/plugins/app_links/ios" + app_settings: + :path: ".symlinks/plugins/app_settings/ios" connectivity_plus: :path: ".symlinks/plugins/connectivity_plus/ios" + device_info_plus: + :path: ".symlinks/plugins/device_info_plus/ios" firebase_core: :path: ".symlinks/plugins/firebase_core/ios" firebase_messaging: @@ -163,7 +173,9 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: app_links: 76b66b60cc809390ca1ad69bfd66b998d2387ac7 + app_settings: 5127ae0678de1dcc19f2293271c51d37c89428b2 connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd + device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe Firebase: 1fe1c0a7d9aaea32efe01fbea5f0ebd8d70e53a2 firebase_core: 2d4534e7b489907dcede540c835b48981d890943 firebase_messaging: 75bc93a4df25faccad67f6662ae872ac9ae69b64 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 082f130c..cb61a72b 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -322,14 +322,10 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; @@ -358,14 +354,10 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); name = "[CP] Copy Pods Resources"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", ); - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; @@ -506,7 +498,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_ASSET_PATHS = Runner/Assets.xcassets; DEVELOPMENT_TEAM = 9N5SRFUGK2; ENABLE_BITCODE = NO; @@ -517,7 +509,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.3; + MARKETING_VERSION = 1.0.4; PRODUCT_BUNDLE_IDENTIFIER = ae.gov.fcsc.frontend.ios; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -705,7 +697,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_ASSET_PATHS = Runner/Assets.xcassets; DEVELOPMENT_TEAM = 9N5SRFUGK2; ENABLE_BITCODE = NO; @@ -716,7 +708,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.3; + MARKETING_VERSION = 1.0.4; PRODUCT_BUNDLE_IDENTIFIER = ae.gov.fcsc.frontend.ios; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -742,7 +734,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_ASSET_PATHS = Runner/Assets.xcassets; DEVELOPMENT_TEAM = 9N5SRFUGK2; ENABLE_BITCODE = NO; @@ -753,7 +745,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.0.3; + MARKETING_VERSION = 1.0.4; PRODUCT_BUNDLE_IDENTIFIER = ae.gov.fcsc.frontend.ios; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index cc5775ef..51e0cf86 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -68,7 +68,7 @@ remote-notification UILaunchStoryboardName - LaunchScreen.storyboard + LaunchScreen UIMainStoryboardFile Main UIStatusBarHidden @@ -79,10 +79,10 @@ UISupportedInterfaceOrientations~ipad + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortraitUpsideDown UNUserNotificationCenterDelegate YES diff --git a/lib/config/app_links_helper.dart b/lib/config/app_links_helper.dart new file mode 100644 index 00000000..e21cdd96 --- /dev/null +++ b/lib/config/app_links_helper.dart @@ -0,0 +1,72 @@ +import 'dart:io'; +import 'package:flutter/material.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:android_intent_plus/android_intent.dart'; +import 'package:android_intent_plus/flag.dart'; +import 'package:app_settings/app_settings.dart'; + +class AppLinksHelper { + static Future checkAndShowDialogOnce(BuildContext context) async { + final prefs = await SharedPreferences.getInstance(); + final shown = prefs.getBool('supported_links_enabled') ?? false; + + if (!shown) { + _showAppLinkDialog(context); + } + } + + static void _showAppLinkDialog(BuildContext context) { + showDialog( + context: context, + builder: (_) => AlertDialog( + title: const Text('Enable App Links'), + content: Platform.isIOS + ? const Text( + 'To ensure links like www.fcsc.com open directly in this app:\n\n' + '1. Open iOS Settings.\n' + '2. Scroll down and tap on "Your App Name".\n' + '3. Make sure "Allow Universal Links" is enabled (if visible).\n\n' + 'Note: Some iOS versions do not show this explicitly.', + ) + : const Text( + 'To enable links like www.fcsc.com to open in this app:\n\n' + '1. Tap "Open Settings".\n' + '2. Tap "Supported web addresses".\n' + '3. Make sure your domain is enabled.\n\n' + 'This helps open links directly in the app.', + ), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: const Text('Later'), + ), + TextButton( + onPressed: () async { + Navigator.of(context).pop(); + + if (Platform.isIOS) { + AppSettings.openAppSettings(); + } else { + _openAppLinkSettingsAndroid(); + } + + final prefs = await SharedPreferences.getInstance(); + await prefs.setBool('supported_links_enabled', true); + }, + child: const Text('Open Settings'), + ), + ], + ), + ); + } + + static void _openAppLinkSettingsAndroid() { + const packageName = 'ae.gov.fcsc.frontend'; // 🔁 Replace with your app's package + final intent = AndroidIntent( + action: 'android.settings.APP_OPEN_BY_DEFAULT_SETTINGS', + data: 'package:$packageName', + flags: [Flag.FLAG_ACTIVITY_NEW_TASK], + ); + intent.launch(); + } +} diff --git a/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart b/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart index 91e27a46..029e0301 100644 --- a/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart +++ b/lib/presentation/Screens/Bottom Navigation Pages/UAE_Numbers/uae_numbers.dart @@ -242,7 +242,7 @@ class _UaenumberWidgetState extends ConsumerState { color: Color(0xFFAA8E83), fontFamily: context.translate('Roboto', 'NotoKufi'), fontSize: 14, - height: 2.0, + // height: 1.8, ), prefixIconConstraints: BoxConstraints( maxWidth: 42, @@ -272,7 +272,7 @@ class _UaenumberWidgetState extends ConsumerState { }, ) : null, - contentPadding: EdgeInsets.symmetric(vertical: 9, horizontal: 18.0), + contentPadding: EdgeInsets.symmetric(vertical: 12, horizontal: 18.0), border: InputBorder.none, // contentPadding: // EdgeInsets.symmetric(vertical: 9, horizontal: 18.0), diff --git a/lib/presentation/Screens/auth_verification/registration.dart b/lib/presentation/Screens/auth_verification/registration.dart index 599fdb9c..226cf068 100644 --- a/lib/presentation/Screens/auth_verification/registration.dart +++ b/lib/presentation/Screens/auth_verification/registration.dart @@ -235,10 +235,13 @@ class _RegisterScreenState extends ConsumerState { final adminToken = adminAuth.token; print('adminTokenREgistration- ${adminToken}'); + var mailId = _emailController.text; + final email = mailId.toLowerCase(); + print('LowerCase $email'); // Create user in PocketBase final response = await pb.collection('users').create(body: { 'uname': _usernameController.text, - 'email': _emailController.text, + 'email': email, 'password': _passwordController.text, 'passwordConfirm': _passwordController.text, 'status': 'Pending', diff --git a/lib/presentation/Screens/charts/screens/chart_screen.dart b/lib/presentation/Screens/charts/screens/chart_screen.dart index 5cef8e62..cdffb658 100644 --- a/lib/presentation/Screens/charts/screens/chart_screen.dart +++ b/lib/presentation/Screens/charts/screens/chart_screen.dart @@ -2220,6 +2220,70 @@ class _ChartScreen1State extends ConsumerState { } } + Future shareCurrentPage(BuildContext context, bool isSharing) async { + if (isSharing) return; // Prevent multiple taps + + isSharing = true; + setState(() { + isLoading = true; + }); + + try { + final String currentRoute = GoRouterState.of(context).uri.toString(); + final String baseAppLink = 'https://www.fcsc.com'; + final String shareLink = '$baseAppLink$currentRoute'; + final String shareText = 'Check this out!\n\n$shareLink'; + print('Generated Share Link: $shareLink'); + + // Optional: Capture SVG to image + final String svgAssetPath = 'assets/backgrounds/share/fcsc.svg'; + final screenshotController = ScreenshotController(); + final svgWidget = SvgPicture.asset( + svgAssetPath, + width: 200, + height: 200, + ); + + final Uint8List? capturedImage = + await screenshotController.captureFromWidget( + Material(child: svgWidget), + ); + + if (capturedImage == null) { + print('SVG capture failed, proceeding without image.'); + await Share.share(shareText, subject: 'App Link'); + } else { + final directory = await getTemporaryDirectory(); + final file = File('${directory.path}/share_image.png'); + await file.writeAsBytes(capturedImage); + + await Share.shareXFiles( + [XFile(file.path)], + text: shareText, + subject: 'Shared Content', + ); + + await file.delete(); + } + setState(() { + isLoading = false; + }); + } catch (e) { + setState(() { + isLoading = false; + }); + print("Error sharing content: $e"); + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text('Error sharing: ${e.toString()}')), + ); + } finally { + setState(() { + isLoading = false; + }); + isSharing = false; // Reset flag + } + } + // double calculateAspectRatio(int crossAxisCount, List cardData) { // if (cardData.any((item) => // item['chart_type'] == 'total' || item['chart_type'] == 'average')) { @@ -2890,56 +2954,7 @@ class _ChartScreen1State extends ConsumerState { } } -Future shareCurrentPage(BuildContext context, bool isSharing) async { - if (isSharing) return; // Prevent multiple taps - isSharing = true; - try { - final String currentRoute = GoRouterState.of(context).uri.toString(); - final String baseAppLink = 'https://www.fcsc.com'; - final String shareLink = '$baseAppLink$currentRoute'; - final String shareText = 'Check this out!\n\n$shareLink'; - print('Generated Share Link: $shareLink'); - - // Optional: Capture SVG to image - final String svgAssetPath = 'assets/backgrounds/share/fcsc.svg'; - final screenshotController = ScreenshotController(); - final svgWidget = SvgPicture.asset( - svgAssetPath, - width: 200, - height: 200, - ); - - final Uint8List? capturedImage = - await screenshotController.captureFromWidget( - Material(child: svgWidget), - ); - - if (capturedImage == null) { - print('SVG capture failed, proceeding without image.'); - await Share.share(shareText, subject: 'App Link'); - } else { - final directory = await getTemporaryDirectory(); - final file = File('${directory.path}/share_image.png'); - await file.writeAsBytes(capturedImage); - - await Share.shareXFiles( - [XFile(file.path)], - text: shareText, - subject: 'Shared Content', - ); - - await file.delete(); - } - } catch (e) { - print("Error sharing content: $e"); - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text('Error sharing: ${e.toString()}')), - ); - } finally { - isSharing = false; // Reset flag - } -} // Function to convert hex color string to Color Color _getColorFromHex(String hexColor) { diff --git a/lib/presentation/Screens/charts/widgets/chart_widget.dart b/lib/presentation/Screens/charts/widgets/chart_widget.dart index 50e49228..d8cd40b8 100644 --- a/lib/presentation/Screens/charts/widgets/chart_widget.dart +++ b/lib/presentation/Screens/charts/widgets/chart_widget.dart @@ -1,5 +1,6 @@ import 'dart:convert'; import 'dart:math'; +import 'dart:math' as math; import 'package:fl_chart/fl_chart.dart'; import 'package:flutter/foundation.dart'; @@ -315,9 +316,9 @@ class ChartWidget extends StatelessWidget { // color: adjustColor(bodyColor, index), // Adjust alpha dynamically color: uniqueColors[index % uniqueColors.length], // title: '${percentage.toStringAsFixed(1)}%', - title: percentage >= 0.1 ? '${percentage.toStringAsFixed(1)}%' : '', - // title: percentage >= 0.1 ? '$displayTitle\n${percentage.toStringAsFixed(1)}%' : '', - radius: isTouched ? 70 : 50, + // title: percentage >= 0.1 ? '${percentage.toStringAsFixed(1)}%' : '', + title: percentage >= 0.1 ? '$displayTitle\n${percentage.toStringAsFixed(1)}%' : '', + radius: isTouched ? 60 : 50, // Increase size when touched titleStyle: TextStyle( @@ -330,8 +331,8 @@ class ChartWidget extends StatelessWidget { color: Colors.black, // color: Colors.white, ), - titlePositionPercentageOffset: 1.4, - // titlePositionPercentageOffset: 1.7, + // titlePositionPercentageOffset: 1.4, + titlePositionPercentageOffset: 1.8, ); }).toList(); } @@ -2948,7 +2949,395 @@ class ChartWidget extends StatelessWidget { _buildChartLegend(groupedCrops, parsedChartBarColors, uniqueColors,context), ], ); - // case 'd_chart_grouped_bar_horizantal': + case 'demo_line': + print('demo_line $groupByValues'); + Map groupColorMap = {}; + int colorIndex = 0; + + var chartBarColors = chartData['chart_bar_color'] ?? {}; + Map barColorsMap = {}; + chartBarColors.forEach((key, value) { + barColorsMap[key] = value.toString(); // Ensure values are strings + }); + bool hasBarColors = barColorsMap.isNotEmpty; + + var chartBarColorsRaw = chartData['chart_bar_color'] ?? {}; + + // Convert LinkedMap to Map + Map chartBarColrs = Map.from( + chartBarColorsRaw, + ); + + // Now map to Color + Map parsedChartBarColors = chartBarColrs.map(( + key, + value, + ) { + return MapEntry(key, _hexToColor(value)); + }); + + print('parsedChartBarColors1 - $parsedChartBarColors'); + + for (String group in groupByValues) { + if (hasBarColors && + chartData['dataset'] == 'population' && + parsedChartBarColors.containsKey(group)) { + groupColorMap[group] = parsedChartBarColors[group]!; + } else { + groupColorMap[group] = uniqueColors[colorIndex % uniqueColors.length]; + colorIndex++; + } + } + + + print('Group-Color Map: $groupColorMap'); + + // Extract all years from the chart data + List years = (chartData['response'] as List) + .map( + (entry) => + int.tryParse(entry['ObsKey'][groupByKey] ?? '0') ?? 0, + ).toList(); + years.sort(); + print(years); + print('years $years'); + + if (years.isEmpty) { + // Return an empty chart if no data + return LineChart( + LineChartData( + titlesData: FlTitlesData(show: false), + lineBarsData: [], + ), + ); + } + + print('LnTrnd1.2'); + + // Find the maximum year and calculate the range for the last 5 years + int maxYear = years.reduce((a, b) => a > b ? a : b); + int minYear = maxYear - 5; + + // Filter chart data to only include entries within the last 5 years + List filteredData = + (chartData['response'] as List).where((entry) { + int year = int.tryParse(entry['ObsKey'][groupByKey] ?? '0') ?? 0; + return year >= minYear && year <= maxYear; + }).toList(); + print('LnTrnd2 $filteredData'); + + final Map>> groupedData = {}; + +// Step 1: Group data by PLANT_TYPE + for (var item in filteredData) { + final plantType = item['ObsKey'][groupByKey]; + groupedData.putIfAbsent(plantType, () => []).add(item); + } + +// Step 2: Convert grouped data into List + final List lineBars = []; + final List colorPalette = [ + Color(0xFF6097CD), + Color(0xFFD086A7), + Color(0xFF98BCE5), + Color(0xFFA7B5C5), + Color(0xFFBED3EC), + Color(0xFFD4E3F4), + ]; + + + String formatNumber(double value) { + if (value >= 1e12) { + return '${(value / 1e12).toStringAsFixed(2)}T'; + } else if (value >= 1e9) { + return '${(value / 1e9).toStringAsFixed(2)}B'; + } else if (value >= 1e6) { + return '${(value / 1e6).toStringAsFixed(2)}M'; + } else if (value >= 1e3) { + return '${(value / 1e3).toStringAsFixed(2)}K'; + } else { + return value.toStringAsFixed(2); // No decimals for small numbers + } + } + + final getXValue = chartData['chart_type_json']['x'] ?? ''; + groupedData.forEach((plantType, entries) { + final spots = entries.map((entry) { + final year = double.tryParse(entry['ObsKey'][getXValue].toString()) ?? 0; + final value = double.tryParse(entry['ObsValue']['Value'].toString()) ?? 0; + return FlSpot(year, value); + }).toList() + ..sort((a, b) => a.x.compareTo(b.x)); // Sort by year + final baseColor = groupColorMap[plantType] ?? Colors.grey; + lineBars.add( + LineChartBarData( + spots: spots, + isCurved: true, + barWidth: 3, + // color: groupColorMap[plantType] ?? Colors.grey, + color: baseColor.withOpacity(0.9), + dotData: FlDotData(show: true), + belowBarData: BarAreaData( + show: true, + gradient: LinearGradient( + colors: [ + // baseColor.withOpacity(0.2), // visible base color + // Colors.white, // fade to white + baseColor.withOpacity(0.4), // increase opacity + baseColor.withOpacity(0.0), // fade to transparent (not white) + ], + stops: [ + 0.2, // shift teal color start downward (20% from the top) + 1.0, // white at the bottom + ], + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + ), + ), + showingIndicators: List.generate(spots.length, (index) => index), + + ), + ); + colorIndex++; + }); + + return Scaffold( + backgroundColor: Colors.white, + body: Padding( + padding: const EdgeInsets.all(10), + child: LayoutBuilder( + builder: (context, constraints) { + final chartWidth = constraints.maxWidth; + final chartHeight = constraints.maxHeight; + final allSpots = lineBars.expand((line) => line.spots); + final minY = allSpots.map((e) => e.y).reduce((a, b) => a < b ? a : b); + final maxY = allSpots.map((e) => e.y).reduce((a, b) => a > b ? a : b); + + + final xValues = allSpots.map((e) => e.x).toList(); + final minX = xValues.reduce((a, b) => a < b ? a : b).toInt(); + final maxX = xValues.reduce((a, b) => a > b ? a : b).toInt(); + + final paddingFactor = 0.3; // 10% extra padding + + final chartMinY = minY - (maxY - minY) * paddingFactor; + final chartMaxY = maxY + (maxY - minY) * paddingFactor; + + + return Column( + crossAxisAlignment: CrossAxisAlignment.center, // ensures center alignment + children: [ + Padding( + padding: const EdgeInsets.only(top: 0), + child: Text( + chartData['chart_heading'] ?? 'Production Quantity by Crop Type (Metric Tonne)', + style: TextStyle( + fontFamily: context.translate('Roboto', 'NotoKufi'), + fontSize: 14, + fontWeight: FontWeight.w400, + ), + textAlign: TextAlign.center, + ), + ), + // SizedBox(height: 6), + Expanded( + child: Stack( + children: [ + LineChart( + LineChartData( + minY: chartMinY, + maxY: chartMaxY, + lineBarsData: lineBars, + clipData: FlClipData.all(), // make sure this doesn't clip the left side + + // Add space for tooltip/dot + // extraLeftTitlesReservedWidth: 24, + titlesData: FlTitlesData( + bottomTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: true, + getTitlesWidget: (value, meta) { + const style = TextStyle( + color: Colors.black, + fontSize: 10, + ); + + // Show only for full years + if (value.toInt() >= 2013 && value.toInt() <= 2022) { + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + // Top tick mark (simulated using a container) + Container( + width: 1, + height: 8, + color: Colors.black, + margin: EdgeInsets.only(bottom: 2), + ), + Text(value.toInt().toString(), style: style), + ], + ); + } + return const SizedBox.shrink(); + }, + reservedSize: 30, + interval: 1, + ), + ), + leftTitles: AxisTitles( + sideTitles: SideTitles( + showTitles: false, + // interval: 5, + reservedSize: 90, + getTitlesWidget: (value, _) => + Text('${value.toInt()}', style: TextStyle(fontSize: 12)), + ), + ), + topTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)), + rightTitles: AxisTitles(sideTitles: SideTitles(showTitles: false)), + ), + borderData: FlBorderData( + show: true, + border: const Border( + left: BorderSide.none, + bottom: BorderSide(color: Colors.black), + ), + ), + gridData: FlGridData(show: false), + lineTouchData: LineTouchData( + enabled: true, + touchTooltipData: LineTouchTooltipData( + // tooltipBgColor: Colors.black.withOpacity(0.7), + fitInsideHorizontally: true, + fitInsideVertically: true, + getTooltipItems: (spots) { + return spots.map((spot) { + final x = spot.x.toInt(); + // if (x == minX || x == maxX) return null; + return LineTooltipItem( + formatNumber(spot.y), + const TextStyle(color: Colors.white), + ); + }).toList(); + }, + ), + ), + ), + ), + // ...lineBars.map((barData) { + // final List spots = barData.spots; + // if (spots.isEmpty) return const SizedBox.shrink(); + // + // final firstSpot = spots.first; + // final lastSpot = spots.last; + // + // return Stack( + // children: [ + // // First Y value label + // Positioned( + // left: 10, + // top: (1 - (firstSpot.y - chartMinY) / (chartMaxY - chartMinY)) * chartHeight - 60, + // bottom: 0, + // + // // top: ((1 - (firstSpot.y - minY) / (m axY - minY)) * chartHeight) + // // .clamp(0.0, chartHeight - 20), + // child: Text( + // formatNumber(firstSpot.y), + // style: TextStyle( + // fontSize: 12, + // fontWeight: FontWeight.bold, + // color: Colors.black87, + // // color: barData.color, // use line color for label + // ), + // ), + // ), + // // Last Y value label + // Positioned( + // right: 10, + // top: (1 - (lastSpot.y - chartMinY) / (chartMaxY - chartMinY)) * chartHeight - 60, + // bottom: 0, + // // top: ((1 - (lastSpot.y - minY) / (maxY - minY)) * chartHeight) + // // .clamp(0.0, chartHeight - 20), + // child: Text( + // formatNumber(lastSpot.y), + // style: TextStyle( + // fontSize: 12, + // fontWeight: FontWeight.bold, + // // color: barData.color, + // color: Colors.black87, + // ), + // ), + // ), + // ], + // ); + // }).toList(), + ...lineBars.expand((barData) { + final List spots = barData.spots; + final color = barData.color ?? Colors.black; + + return spots.map((spot) { + final xPos = ((spot.x - minX) / (maxX - minX)) * chartWidth; + final yPos = (1 - (spot.y - chartMinY) / (chartMaxY - chartMinY)) * chartHeight; + // Prevent label from going outside on the left + double adjustedLeft = math.max(0, xPos - 30); + return Stack( + children: [ + Positioned( + left: adjustedLeft, // fine-tune horizontal position + top: yPos - 60, // fine-tune vertical position + child: Text( + formatNumber(spot.y), + textAlign: TextAlign.right, + style: TextStyle( + fontSize: 9, + fontWeight: FontWeight.w500, + // color: color, + color: Colors.black, + ), + ), + ) + ] + ); + + }); + }).toList(), + + ], + ), + ), + SizedBox(height: 12), + Wrap( // <-- Legend added here + spacing: 12, + runSpacing: 8, + children: groupByValues.map((group) { + return Row( + mainAxisSize: MainAxisSize.min, + children: [ + Container(width: 12, height: 12, color: groupColorMap[group]), + SizedBox(width: 6), + Text( + group, + style: TextStyle( + fontSize: 14, + fontFamily: context.translate('Roboto', 'NotoKufi'), + ), + ), + ], + ); + }).toList(), + ), + ], + ); + + + + }, + ), + ), + ); + + + // case 'd_chart_grouped_bar_horizantal': // return DChartBar( // vertical: false, // <--- Important: rotate the chart // barGroupingType: BarGroupingType.grouped, @@ -3175,30 +3564,6 @@ class ChartWidget extends StatelessWidget { // Iterate through each group and generate line data for (String group in groupByValues) { print('lineGrp1'); - - // List spots = filteredData - // .where((entry) => entry['ObsKey'][groupByKey] == group) - // .map((entry) { - // print("FindTimePeriod"); - // print(entry['ObsKey'][groupByKey]); - // double xValue = double.parse(entry['ObsKey']['TIME_PERIOD']); - // double yValue = double.parse(entry['ObsValue']['Value']); - // return FlSpot(xValue, yValue); - // }).toList(); - - // List spots = filteredData - // .where((entry) => entry['ObsKey'][groupByKey] == group) - // .map((entry) { - // String timePeriod = entry['ObsKey']['TIME_PERIOD']; - // print("FindTimePeriod: $timePeriod"); - // - // double xValue = parseTimePeriodToDouble(timePeriod); // Convert to double for graph plotting - // double yValue = double.parse(entry['ObsValue']['Value']); - // print('TimePeriod: $timePeriod, xValue: $xValue, yValue: $yValue'); - // - // return FlSpot(xValue, yValue); - // }).toList(); - List spots = filteredData .where((entry) => entry['ObsKey'][groupByKey] == group) .map((entry) { @@ -3235,23 +3600,6 @@ class ChartWidget extends StatelessWidget { print('spots - $spots'); - // lineChartLabel = spots; - - // List spots = filteredData - // .where((entry) => entry['ObsKey'][groupByKey] == group) - // .map((entry) { - // String timePeriod = entry['ObsKey']['TIME_PERIOD']; - // List parts = timePeriod.split('-'); // Split "2017-01" into ["2017", "01"] - // - // double year = double.parse(parts[0]); // Convert "2017" to 2017.0 - // double month = double.parse(parts[1]) / 12; // Convert "01" to 1/12 - // - // double xValue = year + month; // E.g., "2017-06" becomes 2017.5 - // double yValue = double.parse(entry['ObsValue']['Value']); - // - // return FlSpot(xValue, yValue); - // }).toList(); - print('lineGrp2'); // Add a line for this group lineBars.add( diff --git a/lib/presentation/routes/auth_routes/login_route.dart b/lib/presentation/routes/auth_routes/login_route.dart index 5609449c..66dd39ca 100644 --- a/lib/presentation/routes/auth_routes/login_route.dart +++ b/lib/presentation/routes/auth_routes/login_route.dart @@ -1,5 +1,7 @@ import 'dart:convert'; +import 'package:android_intent_plus/android_intent.dart'; +import 'package:android_intent_plus/flag.dart'; import 'package:external_repos/external_repos.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; @@ -10,6 +12,7 @@ import 'package:go_router/go_router.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:the_validator/the_validator.dart'; +import 'package:uae_stat/config/app_links_helper.dart'; import 'package:uae_stat/config/connectivity_provider.dart'; import 'package:uae_stat/config/my_theme.dart'; import 'package:uae_stat/domain/use_cases/auth_use_case.dart'; @@ -257,6 +260,59 @@ class LoginRoute extends HookConsumerWidget { }; } + void _showAppLinkDialog(BuildContext context) { + showDialog( + context: context, + builder: (_) => AlertDialog( + title: const Text('Enable App Links'), + content: const Text( + 'To enable links like www.fcsc.com to open in this app:\n\n' + '1. Tap "Open Settings".\n' + '2. Then tap on "Supported web addresses".\n' + '3. Make sure your domain is enabled.\n\n' + 'This helps open web links directly in the app.', + ), + actions: [ + TextButton( + onPressed: () => Navigator.of(context).pop(), + child: const Text('Later'), + ), + TextButton( + onPressed: () async { + Navigator.of(context).pop(); + openAppLinkSettings(); + + // Optionally mark as shown so dialog doesn't show again + final prefs = await SharedPreferences.getInstance(); + await prefs.setBool('supported_links_enabled', true); + }, + child: const Text('Open Settings'), + ), + ], + ), + ); + } + + void openAppLinkSettings() { + const packageName = 'ae.gov.fcsc.frontend'; // Replace with your app's package + final intent = AndroidIntent( + action: 'android.settings.APP_OPEN_BY_DEFAULT_SETTINGS', + data: 'package:$packageName', + flags: [Flag.FLAG_ACTIVITY_NEW_TASK], + ); + intent.launch(); + } + + Future checkAndShowDialogOnce(BuildContext context) async { + final prefs = await SharedPreferences.getInstance(); + final shown = prefs.getBool('supported_links_enabled') ?? false; + + if (!shown) { + _showAppLinkDialog(context); + } + } + + @override Widget build(BuildContext context, WidgetRef ref) { ref.listen>(connectivityProvider, (previous, hasInternet) { @@ -265,6 +321,23 @@ class LoginRoute extends HookConsumerWidget { } }); + // useEffect(() { + // // Wait until first frame is rendered + // Future.microtask(() { + // checkAndShowDialogOnce(context); + // }); + // return null; + // }, []); + + // if(!isWeb){ + // WidgetsBinding.instance.addPostFrameCallback((_) { + // AppLinksHelper.checkAndShowDialogOnce(context); + // }); + // } + + + + final hasValidated = useState(false); final locale = ref.watch(localeProvider); final emailCtl = useTextEditingController(); @@ -438,13 +511,15 @@ class LoginRoute extends HookConsumerWidget { hasValidated.value = true; final isValid = formKey.currentState!.validate(); if (!isValid) return; + var mailId = emailCtl.text; + final email = mailId.toLowerCase(); final session = await context.loaderWithErrorDialog( () => ref .read( authUseCaseProvider.notifier, ) .login( - emailCtl.text, + email, pwCtl.text, ), errorDialogBuilder: ( diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index c0df0f8d..750dfb64 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,7 +6,9 @@ import FlutterMacOS import Foundation import app_links +import app_settings import connectivity_plus +import device_info_plus import file_selector_macos import firebase_core import firebase_messaging @@ -21,7 +23,9 @@ import webview_flutter_wkwebview func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin")) + AppSettingsPlugin.register(with: registry.registrar(forPlugin: "AppSettingsPlugin")) ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin")) + DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) diff --git a/pubspec.lock b/pubspec.lock index ba768351..94289d50 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -33,6 +33,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.12.0" + android_intent_plus: + dependency: "direct main" + description: + name: android_intent_plus + sha256: dfc1fd3a577205ae8f11e990fb4ece8c90cceabbee56fcf48e463ecf0bd6aae3 + url: "https://pub.dev" + source: hosted + version: "5.3.0" ansicolor: dependency: transitive description: @@ -73,6 +81,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" + app_settings: + dependency: "direct main" + description: + name: app_settings + sha256: "3e46c561441e5820d3a25339bf8b51b9e45a5f686873851a20c257a530917795" + url: "https://pub.dev" + source: hosted + version: "6.1.1" archive: dependency: transitive description: @@ -377,6 +393,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.11" + device_info_plus: + dependency: "direct main" + description: + name: device_info_plus + sha256: "0c6396126421b590089447154c5f98a5de423b70cfb15b1578fd018843ee6f53" + url: "https://pub.dev" + source: hosted + version: "11.4.0" + device_info_plus_platform_interface: + dependency: transitive + description: + name: device_info_plus_platform_interface + sha256: "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2" + url: "https://pub.dev" + source: hosted + version: "7.0.2" dio: dependency: transitive description: @@ -444,10 +476,10 @@ packages: dependency: transitive description: name: ffi - sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" file: dependency: transitive description: @@ -1763,10 +1795,18 @@ packages: dependency: transitive description: name: win32 - sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e + sha256: "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba" url: "https://pub.dev" source: hosted - version: "5.10.1" + version: "5.13.0" + win32_registry: + dependency: transitive + description: + name: win32_registry + sha256: "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae" + url: "https://pub.dev" + source: hosted + version: "2.1.0" xdg_directories: dependency: transitive description: @@ -1792,5 +1832,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.7.0-0 <4.0.0" + dart: ">=3.7.0 <4.0.0" flutter: ">=3.27.0" diff --git a/pubspec.yaml b/pubspec.yaml index 377161ba..55d7611d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,8 @@ name: uae_stat description: "View statistics about the UAE from the Federal Center for Statistics and Competitiveness." publish_to: "none" -#version: 1.0.55+56 -version: 1.0.3+4 +#version: 1.0.58+59 +version: 1.0.4+5 environment: sdk: ">=3.2.3 <4.0.0" @@ -72,6 +72,9 @@ dependencies: d_chart: ^2.10.5 firebase_core: ^3.13.0 firebase_messaging: ^15.2.5 + device_info_plus: ^11.4.0 + android_intent_plus: ^5.3.0 + app_settings: ^6.1.1 dependency_overrides: fading_edge_scrollview: ^4.1.1