From 1da2357124a5ab2f3c55e4c3a6419d6bb559382e Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Wed, 21 Jan 2026 17:31:10 +0300 Subject: [PATCH] Initial commit for Tripz Admin --- .gitignore | 2 + android/app/build.gradle | 5 +- android/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/settings.gradle | 2 +- ios/Podfile | 34 +- ios/Podfile.lock | 215 +++-- ios/Runner.xcodeproj/project.pbxproj | 18 - lib/constant/api_key.dart | 6 + lib/constant/box_name.dart | 8 + lib/constant/info.dart | 1 + lib/constant/links.dart | 55 +- .../admin/dashboard_controller.dart | 52 +- lib/controller/admin/static_controller.dart | 163 ++-- lib/controller/drivers/driverthebest.dart | 41 + lib/controller/functions/crud.dart | 319 +++++-- lib/controller/functions/device_info.dart | 44 +- lib/controller/functions/encrypt_decrypt.dart | 70 ++ lib/controller/functions/wallet.dart | 8 +- lib/main.dart | 2 + lib/views/admin/admin_home_page.dart | 818 +++++++++--------- lib/views/admin/captain/captain.dart | 3 +- lib/views/admin/dashboard_widget.dart | 94 ++ lib/views/admin/drivers/alexandria.dart | 69 ++ lib/views/admin/drivers/driver_the_best.dart | 104 ++- lib/views/admin/drivers/giza.dart | 69 ++ lib/views/admin/employee/employee_page.dart | 5 +- lib/views/admin/passenger/passenger.dart | 3 +- macos/Flutter/GeneratedPluginRegistrant.swift | 6 +- pubspec.lock | 551 +++++++----- pubspec.yaml | 21 +- 31 files changed, 1812 insertions(+), 980 deletions(-) create mode 100644 lib/controller/functions/encrypt_decrypt.dart create mode 100644 lib/views/admin/dashboard_widget.dart create mode 100644 lib/views/admin/drivers/alexandria.dart create mode 100644 lib/views/admin/drivers/giza.dart diff --git a/.gitignore b/.gitignore index 014d0e0..bdd4fed 100644 --- a/.gitignore +++ b/.gitignore @@ -5,9 +5,11 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ migrate_working_dir/ # IntelliJ related diff --git a/android/app/build.gradle b/android/app/build.gradle index 2b60416..9f9dc83 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -25,8 +25,8 @@ if (flutterVersionName == null) { android { namespace = "com.example.sefer_admin1" - compileSdk = flutter.compileSdkVersion - ndkVersion = "26.1.10909125" + compileSdk = 35 + ndkVersion = '27.0.12077973' compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 @@ -42,6 +42,7 @@ android { targetSdk = flutter.targetSdkVersion versionCode = flutterVersionCode.toInteger() versionName = flutterVersionName + multiDexEnabled = true } buildTypes { diff --git a/android/build.gradle b/android/build.gradle index 9028d2a..7971918 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,7 +8,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:8.0.2' // Use a compatible AGP version + classpath 'com.android.tools.build:gradle:8.8.0' // Use a compatible AGP version classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 11fce01..6b74f0f 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip diff --git a/android/settings.gradle b/android/settings.gradle index 92694c3..d2f260e 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -19,7 +19,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version '8.0.2' apply false + id "com.android.application" version '8.8.0' apply false // START: FlutterFire Configuration id "com.google.gms.google-services" version "4.3.15" apply false // END: FlutterFire Configuration diff --git a/ios/Podfile b/ios/Podfile index 04c36cf..d18453c 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,15 +1,17 @@ -# Uncomment this line to define a global platform for your project +# Define the minimum iOS deployment target platform :ios, '14.0' -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +# Disable CocoaPods analytics to improve Flutter build latency ENV['COCOAPODS_DISABLE_STATS'] = 'true' +# Define Flutter project configurations project 'Runner', { 'Debug' => :debug, 'Profile' => :release, 'Release' => :release, } +# Helper function to locate the Flutter installation path def flutter_root generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) unless File.exist?(generated_xcode_build_settings_path) @@ -25,20 +27,42 @@ end require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) +# Set up Flutter iOS Pods flutter_ios_podfile_setup target 'Runner' do - use_frameworks! - use_modular_headers! + # Enable modular headers and static linkage for better compatibility + use_frameworks! :linkage => :static + # Install all Flutter-related pods flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + + # Test target configuration target 'RunnerTests' do inherit! :search_paths end end +# Post-install configurations for CocoaPods post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) + + target.build_configurations.each do |config| + # Ensure compatibility with non-modular includes + config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES' + + # Set the iOS deployment target + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0' + + # Enable dynamic library distribution for compatibility + config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' + + # Restrict builds to active architecture for simulators + config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES' + + # Define the module for compatibility + config.build_settings['DEFINES_MODULE'] = 'YES' + end end -end +end \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ee46282..c571ddf 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,69 +1,69 @@ PODS: - - AppAuth (1.7.5): - - AppAuth/Core (= 1.7.5) - - AppAuth/ExternalUserAgent (= 1.7.5) - - AppAuth/Core (1.7.5) - - AppAuth/ExternalUserAgent (1.7.5): + - AppAuth (1.7.6): + - AppAuth/Core (= 1.7.6) + - AppAuth/ExternalUserAgent (= 1.7.6) + - AppAuth/Core (1.7.6) + - AppAuth/ExternalUserAgent (1.7.6): - AppAuth/Core - - Firebase/CoreOnly (10.25.0): - - FirebaseCore (= 10.25.0) - - Firebase/Crashlytics (10.25.0): + - Firebase/CoreOnly (11.4.0): + - FirebaseCore (= 11.4.0) + - Firebase/Crashlytics (11.4.0): - Firebase/CoreOnly - - FirebaseCrashlytics (~> 10.25.0) - - Firebase/Messaging (10.25.0): + - FirebaseCrashlytics (~> 11.4.0) + - Firebase/Messaging (11.4.0): - Firebase/CoreOnly - - FirebaseMessaging (~> 10.25.0) - - firebase_core (2.32.0): - - Firebase/CoreOnly (= 10.25.0) + - FirebaseMessaging (~> 11.4.0) + - firebase_core (3.9.0): + - Firebase/CoreOnly (= 11.4.0) - Flutter - - firebase_crashlytics (3.5.7): - - Firebase/Crashlytics (= 10.25.0) + - firebase_crashlytics (4.2.0): + - Firebase/Crashlytics (= 11.4.0) - firebase_core - Flutter - - firebase_messaging (14.9.4): - - Firebase/Messaging (= 10.25.0) + - firebase_messaging (15.1.6): + - Firebase/Messaging (= 11.4.0) - firebase_core - Flutter - - FirebaseCore (10.25.0): - - FirebaseCoreInternal (~> 10.0) - - GoogleUtilities/Environment (~> 7.12) - - GoogleUtilities/Logger (~> 7.12) - - FirebaseCoreExtension (10.29.0): - - FirebaseCore (~> 10.0) - - FirebaseCoreInternal (10.27.0): - - "GoogleUtilities/NSData+zlib (~> 7.8)" - - FirebaseCrashlytics (10.25.0): - - FirebaseCore (~> 10.5) - - FirebaseInstallations (~> 10.0) - - FirebaseRemoteConfigInterop (~> 10.23) - - FirebaseSessions (~> 10.5) - - GoogleDataTransport (~> 9.2) - - GoogleUtilities/Environment (~> 7.8) - - nanopb (< 2.30911.0, >= 2.30908.0) - - PromisesObjC (~> 2.1) - - FirebaseInstallations (10.27.0): - - FirebaseCore (~> 10.0) - - GoogleUtilities/Environment (~> 7.8) - - GoogleUtilities/UserDefaults (~> 7.8) - - PromisesObjC (~> 2.1) - - FirebaseMessaging (10.25.0): - - FirebaseCore (~> 10.0) - - FirebaseInstallations (~> 10.0) - - GoogleDataTransport (~> 9.3) - - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - - GoogleUtilities/Environment (~> 7.8) - - GoogleUtilities/Reachability (~> 7.8) - - GoogleUtilities/UserDefaults (~> 7.8) - - nanopb (< 2.30911.0, >= 2.30908.0) - - FirebaseRemoteConfigInterop (10.29.0) - - FirebaseSessions (10.29.0): - - FirebaseCore (~> 10.5) - - FirebaseCoreExtension (~> 10.0) - - FirebaseInstallations (~> 10.0) - - GoogleDataTransport (~> 9.2) - - GoogleUtilities/Environment (~> 7.13) - - GoogleUtilities/UserDefaults (~> 7.13) - - nanopb (< 2.30911.0, >= 2.30908.0) + - FirebaseCore (11.4.0): + - FirebaseCoreInternal (~> 11.0) + - GoogleUtilities/Environment (~> 8.0) + - GoogleUtilities/Logger (~> 8.0) + - FirebaseCoreExtension (11.4.1): + - FirebaseCore (~> 11.0) + - FirebaseCoreInternal (11.6.0): + - "GoogleUtilities/NSData+zlib (~> 8.0)" + - FirebaseCrashlytics (11.4.0): + - FirebaseCore (~> 11.4) + - FirebaseInstallations (~> 11.0) + - FirebaseRemoteConfigInterop (~> 11.0) + - FirebaseSessions (~> 11.0) + - GoogleDataTransport (~> 10.0) + - GoogleUtilities/Environment (~> 8.0) + - nanopb (~> 3.30910.0) + - PromisesObjC (~> 2.4) + - FirebaseInstallations (11.4.0): + - FirebaseCore (~> 11.0) + - GoogleUtilities/Environment (~> 8.0) + - GoogleUtilities/UserDefaults (~> 8.0) + - PromisesObjC (~> 2.4) + - FirebaseMessaging (11.4.0): + - FirebaseCore (~> 11.0) + - FirebaseInstallations (~> 11.0) + - GoogleDataTransport (~> 10.0) + - GoogleUtilities/AppDelegateSwizzler (~> 8.0) + - GoogleUtilities/Environment (~> 8.0) + - GoogleUtilities/Reachability (~> 8.0) + - GoogleUtilities/UserDefaults (~> 8.0) + - nanopb (~> 3.30910.0) + - FirebaseRemoteConfigInterop (11.6.0) + - FirebaseSessions (11.4.0): + - FirebaseCore (~> 11.4) + - FirebaseCoreExtension (~> 11.4) + - FirebaseInstallations (~> 11.0) + - GoogleDataTransport (~> 10.0) + - GoogleUtilities/Environment (~> 8.0) + - GoogleUtilities/UserDefaults (~> 8.0) + - nanopb (~> 3.30910.0) - PromisesSwift (~> 2.1) - Flutter (1.0.0) - flutter_image_compress_common (1.0.0): @@ -79,46 +79,44 @@ PODS: - FlutterMacOS - GoogleSignIn (~> 7.1) - GTMSessionFetcher (>= 3.4.0) - - GoogleDataTransport (9.4.1): - - GoogleUtilities/Environment (~> 7.7) - - nanopb (< 2.30911.0, >= 2.30908.0) - - PromisesObjC (< 3.0, >= 1.2) + - GoogleDataTransport (10.1.0): + - nanopb (~> 3.30910.0) + - PromisesObjC (~> 2.4) - GoogleSignIn (7.1.0): - AppAuth (< 2.0, >= 1.7.3) - GTMAppAuth (< 5.0, >= 4.1.1) - GTMSessionFetcher/Core (~> 3.3) - - GoogleUtilities/AppDelegateSwizzler (7.13.3): + - GoogleUtilities/AppDelegateSwizzler (8.0.2): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - GoogleUtilities/Privacy - - GoogleUtilities/Environment (7.13.3): + - GoogleUtilities/Environment (8.0.2): - GoogleUtilities/Privacy - - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/Logger (7.13.3): + - GoogleUtilities/Logger (8.0.2): - GoogleUtilities/Environment - GoogleUtilities/Privacy - - GoogleUtilities/Network (7.13.3): + - GoogleUtilities/Network (8.0.2): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Privacy - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (7.13.3)": + - "GoogleUtilities/NSData+zlib (8.0.2)": - GoogleUtilities/Privacy - - GoogleUtilities/Privacy (7.13.3) - - GoogleUtilities/Reachability (7.13.3): + - GoogleUtilities/Privacy (8.0.2) + - GoogleUtilities/Reachability (8.0.2): - GoogleUtilities/Logger - GoogleUtilities/Privacy - - GoogleUtilities/UserDefaults (7.13.3): + - GoogleUtilities/UserDefaults (8.0.2): - GoogleUtilities/Logger - GoogleUtilities/Privacy - GTMAppAuth (4.1.1): - AppAuth/Core (~> 1.7) - GTMSessionFetcher/Core (< 4.0, >= 3.3) - - GTMSessionFetcher (3.4.1): - - GTMSessionFetcher/Full (= 3.4.1) - - GTMSessionFetcher/Core (3.4.1) - - GTMSessionFetcher/Full (3.4.1): + - GTMSessionFetcher (3.5.0): + - GTMSessionFetcher/Full (= 3.5.0) + - GTMSessionFetcher/Core (3.5.0) + - GTMSessionFetcher/Full (3.5.0): - GTMSessionFetcher/Core - image_cropper (0.0.4): - Flutter @@ -139,27 +137,28 @@ PODS: - libwebp/sharpyuv - local_auth_darwin (0.0.1): - Flutter + - FlutterMacOS - Mantle (2.2.0): - Mantle/extobjc (= 2.2.0) - Mantle/extobjc (2.2.0) - - nanopb (2.30910.0): - - nanopb/decode (= 2.30910.0) - - nanopb/encode (= 2.30910.0) - - nanopb/decode (2.30910.0) - - nanopb/encode (2.30910.0) + - nanopb (3.30910.0): + - nanopb/decode (= 3.30910.0) + - nanopb/encode (= 3.30910.0) + - nanopb/decode (3.30910.0) + - nanopb/encode (3.30910.0) - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - PromisesObjC (2.4.0) - PromisesSwift (2.4.0): - PromisesObjC (= 2.4.0) - - SDWebImage (5.19.7): - - SDWebImage/Core (= 5.19.7) - - SDWebImage/Core (5.19.7) + - SDWebImage (5.20.0): + - SDWebImage/Core (= 5.20.0) + - SDWebImage/Core (5.20.0) - SDWebImageWebPCoder (0.14.6): - libwebp (~> 1.0) - SDWebImage/Core (~> 5.17) - - sqflite (0.0.3): + - sqflite_darwin (0.0.4): - Flutter - FlutterMacOS - TOCropViewController (2.7.4) @@ -178,7 +177,7 @@ DEPENDENCIES: - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - - sqflite (from `.symlinks/plugins/sqflite/darwin`) + - sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) SPEC REPOS: @@ -230,49 +229,49 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/local_auth_darwin/darwin" path_provider_foundation: :path: ".symlinks/plugins/path_provider_foundation/darwin" - sqflite: - :path: ".symlinks/plugins/sqflite/darwin" + sqflite_darwin: + :path: ".symlinks/plugins/sqflite_darwin/darwin" url_launcher_ios: :path: ".symlinks/plugins/url_launcher_ios/ios" SPEC CHECKSUMS: - AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa - Firebase: 0312a2352584f782ea56f66d91606891d4607f06 - firebase_core: a626d00494efa398e7c54f25f1454a64c8abf197 - firebase_crashlytics: 17e856fabec68d993662abaf2f6fe2413f0abece - firebase_messaging: 06391e8f35dc65a00c56580266285263d2861f10 - FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483 - FirebaseCoreExtension: 705ca5b14bf71d2564a0ddc677df1fc86ffa600f - FirebaseCoreInternal: 4b297a2d56063dbea2c1d0d04222d44a8d058862 - FirebaseCrashlytics: 4b96efb0ce73b38b2a85e8b8bd1bd8f63f09d015 - FirebaseInstallations: 766dabca09fd94aef922538aaf144cc4a6fb6869 - FirebaseMessaging: 88950ba9485052891ebe26f6c43a52bb62248952 - FirebaseRemoteConfigInterop: 6efda51fb5e2f15b16585197e26eaa09574e8a4d - FirebaseSessions: dbd14adac65ce996228652c1fc3a3f576bdf3ecc + AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73 + Firebase: cf1b19f21410b029b6786a54e9764a0cacad3c99 + firebase_core: b62a5080210edad3f2934314a8b2c6f5124e8e10 + firebase_crashlytics: 757e252772ed3dd37c07638f9fcd4dceb5f101c8 + firebase_messaging: 98619a0572d82cfb3668e78859ba9f1110e268c9 + FirebaseCore: e0510f1523bc0eb21653cac00792e1e2bd6f1771 + FirebaseCoreExtension: f1bc67a4702931a7caa097d8e4ac0a1b0d16720e + FirebaseCoreInternal: d98ab91e2d80a56d7b246856a8885443b302c0c2 + FirebaseCrashlytics: 41bbdd2b514a8523cede0c217aee6ef7ecf38401 + FirebaseInstallations: 6ef4a1c7eb2a61ee1f74727d7f6ce2e72acf1414 + FirebaseMessaging: f8a160d99c2c2e5babbbcc90c4a3e15db036aee2 + FirebaseRemoteConfigInterop: e75e348953352a000331eb77caf01e424248e176 + FirebaseSessions: 3f56f177d9e53a85021d16b31f9a111849d1dd8b Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_image_compress_common: ec1d45c362c9d30a3f6a0426c297f47c52007e3e flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12 google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38 - GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a + GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db - GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15 + GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de - GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd + GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 image_cropper: 37d40f62177c101ff4c164906d259ea2c3aa70cf image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1 libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009 - local_auth_darwin: 4d56c90c2683319835a61274b57620df9c4520ab + local_auth_darwin: 66e40372f1c29f383a314c738c7446e2f7fdadc3 Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d - nanopb: 438bc412db1928dac798aa6fd75726007be04262 + nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851 - SDWebImage: 8a6b7b160b4d710e2a22b6900e25301075c34cb3 + SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8 SDWebImageWebPCoder: e38c0a70396191361d60c092933e22c20d5b1380 - sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec + sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654 url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe -PODFILE CHECKSUM: 1959d098c91d8a792531a723c4a9d7e9f6a01e38 +PODFILE CHECKSUM: 2d6dcdfb73160995f364ae9cd67e4000fd6077a8 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index eb750e0..b5fd2e2 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -202,7 +202,6 @@ 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - E9260FFCE0F15D904C6E7C16 /* [CP] Embed Pods Frameworks */, 6A69BFBF5DAB5F688C4AF4E3 /* [CP] Copy Pods Resources */, ); buildRules = ( @@ -346,23 +345,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - E9260FFCE0F15D904C6E7C16 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; F30F6A7446087F285F80AA2C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/lib/constant/api_key.dart b/lib/constant/api_key.dart index 6433459..6422d14 100644 --- a/lib/constant/api_key.dart +++ b/lib/constant/api_key.dart @@ -4,6 +4,12 @@ import '../env/env.dart'; import 'char_map.dart'; class AK { + static final String allowed = Env.allowed; + static final String passnpassenger = X + .r(X.r(X.r(Env.passnpassenger, cn), cC), cs) + .toString() + .split(Env.addd)[0]; + static final String newId = Env.newId; static final String publishableKey = X.r(X.r(X.r(Env.stripePublishableKe, cn), cC), cs); static final String secretKey = X.r(X.r(X.r(Env.secretKey, cn), cC), cs); diff --git a/lib/constant/box_name.dart b/lib/constant/box_name.dart index 7797c5a..49a6acc 100644 --- a/lib/constant/box_name.dart +++ b/lib/constant/box_name.dart @@ -8,6 +8,14 @@ class BoxName { static const String carPlate = "carPlate"; static const String statusDriverLocation = "statusDriverLocation"; static const String password = "password"; + static const String keyOfApp = 'keyOfApp'; + static const String initializationVector = 'initializationVector'; + static const String firstTimeLoadKey = 'firstTimeLoadKey'; + static const String jwt = "jwt"; + static const String hmac = "hmac"; + static const String fingerPrint = "fingerPrint"; + static const String payMobApikey = "payMobApikey"; + static const String refreshToken = "refreshToken"; static const String arrivalTime = "arrivalTime"; static const String passwordDriver = "passwordDriver"; static const String agreeTerms = "agreeTerms"; diff --git a/lib/constant/info.dart b/lib/constant/info.dart index 5a41e7b..b1d2f97 100644 --- a/lib/constant/info.dart +++ b/lib/constant/info.dart @@ -8,6 +8,7 @@ class AppInformation { static const String email = 'hamzaayed@mobile-app.store'; static const String complaintPrompt = 'for this data for complaint from driver or passenger i collect all data i want you analyze this complaint and show what is reason and what is solution .this data collected from many table to find solution if payment in visa not complete and if ride status is finished it will be paymnet in payment table if ride status is not finished there is no need to pay and payment table is null for this ride and if paymentFromPaymentTable not null and visa type not cash the payment sucssessed . if ratingpassenger is low or passengr rating drivers low grade then dont mine of this passenger ,look at driver too like passengerratingdriver with rating or ratingtopassenger .in json add status of complaint and message to passenger and message to driver and message to call center write in arabic in json output with key in english .for output please just json i want'; + static const String addd = 'BlBlNl'; static const String privacyPolicy = ''' diff --git a/lib/constant/links.dart b/lib/constant/links.dart index bd1f829..61affd3 100644 --- a/lib/constant/links.dart +++ b/lib/constant/links.dart @@ -1,19 +1,25 @@ import '../env/env.dart'; class AppLink { - static final String seferPaymentServer0 = Env.seferPaymentServer; - static final String seferPaymentServer = '${Env.seferPaymentServer}/ride'; - static final String seferAlexandriaServer = Env.seferAlexandriaServer; - static final String seferCairoServer = Env.seferCairoServer; - // static final String seferGizaServer = Env.seferGizaServer; + static String seferPaymentServer = 'https://wl.tripz-egypt.com/v1/main'; + static final String tripzPaymentServer0 = seferPaymentServer; + static final String tripzPaymentServer = '$seferPaymentServer/ride'; + static final String tripzAlexandriaServer = Env.seferAlexandriaServer; + static final String tripzCairoServer = Env.seferCairoServer; + static final String tripzGizaServer = Env.seferGizaServer; // static final String endPoint = box.read(BoxName.serverChosen); - static final String server = Env.seferCairoServer; - // static const String server = 'https://api.sefer.live/sefer'; + // static final String server = Env.seferCairoServer; + static final String server = 'https://api.tripz-egypt.com/tripz'; + static String loginJwtDriver = + "https://api.tripz-egypt.com/tripz/loginAdmin.php"; + static String getPaymentsDashboard = + "$seferPaymentServer/Admin/getPaymentsDashboard.php"; static String googleMapsLink = 'https://maps.googleapis.com/maps/api/'; static String llama = 'https://api.llama-api.com/chat/completions'; static String gemini = 'https://generativelanguage.googleapis.com/v1beta3/models/text-bison-001:generateText'; + static String loginWalletAdmin = "$seferPaymentServer/loginWalletAdmin.php"; static String test = "$server/test.php"; //===============firebase========================== @@ -28,14 +34,14 @@ class AppLink { //=======================Wallet=================== static String addPaymentTokenDriver = - "$seferPaymentServer/driverWallet/addPaymentToken.php"; - static String addSeferWallet = "$seferPaymentServer/seferWallet/add.php"; - static String getSeferWallet = "$seferPaymentServer/seferWallet/get.php"; - static String addDrivePayment = "$seferPaymentServer/payment/add.php"; + "$tripzPaymentServer/driverWallet/addPaymentToken.php"; + static String addSeferWallet = "$tripzPaymentServer/seferWallet/add.php"; + static String getSeferWallet = "$tripzPaymentServer/seferWallet/get.php"; + static String addDrivePayment = "$tripzPaymentServer/payment/add.php"; static String updatePaymetToPaid = - "$seferPaymentServer/payment/updatePaymetToPaid.php"; - static String wallet = '$seferPaymentServer/passengerWallet'; - static String walletDriver = '$seferPaymentServer/driverWallet'; + "$tripzPaymentServer/payment/updatePaymetToPaid.php"; + static String wallet = '$tripzPaymentServer/passengerWallet'; + static String walletDriver = '$tripzPaymentServer/driverWallet'; static String getAllPassengerTransaction = "$wallet/getAllPassengerTransaction.php"; static String getWalletByPassenger = "$wallet/getWalletByPassenger.php"; @@ -85,17 +91,17 @@ class AppLink { static String addKazanPercent = "$ride/kazan/add.php"; ////-----------------DriverPayment------------------ - static String addDriverpayment = "$seferPaymentServer/payment/add.php"; + static String addDriverpayment = "$tripzPaymentServer/payment/add.php"; static String addDriverPaymentPoints = - "$seferPaymentServer/driverPayment/add.php"; + "$tripzPaymentServer/driverPayment/add.php"; static String getDriverPaymentPoints = - "$seferPaymentServer/driverWallet/get.php"; - static String getDriverpaymentToday = "$seferPaymentServer/payment/get.php"; - static String getCountRide = "$seferPaymentServer/payment/getCountRide.php"; + "$tripzPaymentServer/driverWallet/get.php"; + static String getDriverpaymentToday = "$tripzPaymentServer/payment/get.php"; + static String getCountRide = "$tripzPaymentServer/payment/getCountRide.php"; static String getAllPaymentFromRide = - "$seferPaymentServer/payment/getAllPayment.php"; + "$tripzPaymentServer/payment/getAllPayment.php"; static String getAllPaymentVisa = - "$seferPaymentServer/payment/getAllPaymentVisa.php"; + "$tripzPaymentServer/payment/getAllPaymentVisa.php"; //-----------------Passenger NotificationCaptain------------------ static String addNotificationPassenger = @@ -166,7 +172,7 @@ class AppLink { static String sendEmailToPassengerForTripDetails = "$ride/rides/emailToPassengerTripDetail.php"; static String sendEmailToDrivertransaction = - "https://api.sefer.live/sefer/Admin/sendEmailToDrivertransaction.php"; + "https://api.tripz-egypt.com/tripz/Admin/sendEmailToDrivertransaction.php"; // =========================================== static String pathImage = "$server/upload/types/"; @@ -232,6 +238,11 @@ class AppLink { static String getdashbord = "$server/Admin/dashbord.php"; static String getEmployee = "$server/Admin/employee/get.php"; static String getBestDriver = "$server/Admin/driver/getBestDriver.php"; + static String getBestDriverGiza = + "https://gizasefer.online/sefer/Admin/driver/getBestDriver.php"; + static String getBestDriverAlexandria = + "$tripzAlexandriaServer/Admin/driver/getBestDriver.php"; + static String deleteRecord = "$server/Admin/driver/deleteRecord.php"; static String addEmployee = "$server/Admin/employee/add.php"; static String getdashbordPayment = "$server/Admin/dashbordPayment.php"; static String getAdminUser = "$server/Admin/adminUser/get.php"; diff --git a/lib/controller/admin/dashboard_controller.dart b/lib/controller/admin/dashboard_controller.dart index e70763a..91373e4 100644 --- a/lib/controller/admin/dashboard_controller.dart +++ b/lib/controller/admin/dashboard_controller.dart @@ -17,18 +17,60 @@ class DashboardController extends GetxController { final formKey = GlobalKey(); final smsText = TextEditingController(); + // Future getDashBoard() async { + // isLoading = true; + // update(); + // var res = await CRUD().get(link: AppLink.getdashbord, payload: {}); + // if (res != 'failure') { + // var d = jsonDecode(res); + // Log.print('d: ${d}'); + // dashbord = d['message']; + // isLoading = false; + // update(); + // } + + // var res2 = await CRUD().kazumiSMS( + // link: 'https://sms.kazumi.me/api/sms/check-credit', + // payload: {"username": "Sefer", "password": AK.smsPasswordEgypt}, + // ); + + // creditSMS = res2['credit']; + // Log.print(' res2[credit]: ${res2['credit']}'); + // Log.print('creditSMS: ${creditSMS}'); + + // update(); + // } Future getDashBoard() async { isLoading = true; update(); + + // الطلب من السيرفر الرئيسي var res = await CRUD().get(link: AppLink.getdashbord, payload: {}); if (res != 'failure') { var d = jsonDecode(res); - Log.print('d: ${d}'); - dashbord = d['message']; - isLoading = false; - update(); + // Log.print('d: ${d}'); + dashbord = d['message']; // هذا عبارة عن List } + // الطلب من سيرفر المحافظ + var resPayments = await CRUD().postWallet( + link: AppLink.getPaymentsDashboard, + payload: {}, + ); + + if (resPayments != 'failure') { + var p = resPayments; + // Log.print('p: ${p}'); + + // نتأكد أن الكل Map بداخل List + if (dashbord.isNotEmpty && + p['message'] is List && + p['message'].isNotEmpty) { + dashbord[0].addAll(p['message'][0]); // ندمج المعلومات داخل نفس الـ Map + } + } + + // كريدت الرسائل var res2 = await CRUD().kazumiSMS( link: 'https://sms.kazumi.me/api/sms/check-credit', payload: {"username": "Sefer", "password": AK.smsPasswordEgypt}, @@ -38,9 +80,11 @@ class DashboardController extends GetxController { Log.print(' res2[credit]: ${res2['credit']}'); Log.print('creditSMS: ${creditSMS}'); + isLoading = false; update(); } + sendSMSMethod() async { if (formKey.currentState!.validate()) { for (var phoneNumber in box.read(BoxName.tokensDrivers)['message']) { diff --git a/lib/controller/admin/static_controller.dart b/lib/controller/admin/static_controller.dart index da49c9f..8797cfe 100644 --- a/lib/controller/admin/static_controller.dart +++ b/lib/controller/admin/static_controller.dart @@ -87,79 +87,104 @@ class StaticController extends GetxController { } Future fetchEmployee() async { - isLoading = true; - update(); + try { + isLoading = true; + update(); - var res = await CRUD().get(link: AppLink.getEmployeeStatic, payload: {}); - var jsonResponse = jsonDecode(res) as Map; - isLoading = false; + var res = await CRUD().get(link: AppLink.getEmployeeStatic, payload: {}); - final List jsonData = jsonResponse['message']; - totalMonthlyRides = jsonData[0]['totalMonthly'].toString(); - - // Group data by employee - Map> employeeDataMap = {}; - - for (var item in jsonData) { - var employeeData = MonthlyEmployeeData.fromJson(item); - if (!employeeDataMap.containsKey(employeeData.name)) { - employeeDataMap[employeeData.name] = []; + // First check if the response is valid JSON + if (res == 'failure') { + throw FormatException('Invalid response: $res'); } - employeeDataMap[employeeData.name]!.add(employeeData); + + var jsonResponse = jsonDecode(res) as Map; + + // Initialize empty lists for all chart data + chartDataEmployeeMaryam = []; + chartDataEmployeeRawda = []; + chartDataEmployeeMena = []; + chartDataEmployeeSefer4 = []; + totalMonthlyRides = '0'; + + // Check for error response + if (jsonResponse['status'] == 'failure') { + isLoading = false; + update(); + return; + } + + final List jsonData = jsonResponse['message']; + if (jsonData.isEmpty) { + isLoading = false; + update(); + return; + } + + totalMonthlyRides = jsonData[0]['totalMonthly']?.toString() ?? '0'; + + // Group data by employee + Map> employeeDataMap = {}; + + for (var item in jsonData) { + var employeeData = MonthlyEmployeeData.fromJson(item); + if (!employeeDataMap.containsKey(employeeData.name)) { + employeeDataMap[employeeData.name] = []; + } + employeeDataMap[employeeData.name]!.add(employeeData); + } + + final today = DateTime.now().day; + + // Create data for each employee + final employeeNames = { + 'maryam': chartDataEmployeeMaryam, + 'yasmine': chartDataEmployeeRawda, + 'mena': chartDataEmployeeMena, + 'ashjan': chartDataEmployeeSefer4, + }; + + employeeNames.forEach((name, chartData) { + var spots = []; + for (int day = 1; day <= today; day++) { + spots.add(FlSpot( + day.toDouble(), + employeeDataMap[name] + ?.firstWhere( + (e) => e.day == day, + orElse: () => MonthlyEmployeeData( + day: day, + totalEmployees: 0, + name: name, + ), + ) + .totalEmployees + .toDouble() ?? + 0, + )); + } + + // Explicitly cast to List + if (name == 'maryam') + chartDataEmployeeMaryam = List.from(spots); + if (name == 'yasmine') + chartDataEmployeeRawda = List.from(spots); + if (name == 'mena') chartDataEmployeeMena = List.from(spots); + if (name == 'ashjan') + chartDataEmployeeSefer4 = List.from(spots); + }); + } catch (e) { + Log.print('Error in fetchEmployee: $e'); + // Set empty FlSpot lists in case of error + chartDataEmployeeMaryam = []; + chartDataEmployeeRawda = []; + chartDataEmployeeMena = []; + chartDataEmployeeSefer4 = []; + totalMonthlyRides = '0'; + } finally { + isLoading = false; + update(); } - - // Create FlSpot data for each employee - List chartDataMaryam = []; - List chartDataRawda = []; - List chartDataMena = []; - List chartDataSefer4 = []; - - for (int day = 1; day <= DateTime.now().day; day++) { - chartDataMaryam.add(FlSpot( - day.toDouble(), - employeeDataMap['maryam'] - ?.firstWhere((e) => e.day == day, - orElse: () => MonthlyEmployeeData( - day: day, totalEmployees: 0, name: 'maryam')) - .totalEmployees - .toDouble() ?? - 0)); - chartDataRawda.add(FlSpot( - day.toDouble(), - employeeDataMap['yasmine'] - ?.firstWhere((e) => e.day == day, - orElse: () => MonthlyEmployeeData( - day: day, totalEmployees: 0, name: 'yasmine')) - .totalEmployees - .toDouble() ?? - 0)); - chartDataMena.add(FlSpot( - day.toDouble(), - employeeDataMap['mena'] - ?.firstWhere((e) => e.day == day, - orElse: () => MonthlyEmployeeData( - day: day, totalEmployees: 0, name: 'mena')) - .totalEmployees - .toDouble() ?? - 0)); - chartDataSefer4.add(FlSpot( - day.toDouble(), - employeeDataMap['ashjan'] - ?.firstWhere((e) => e.day == day, - orElse: () => MonthlyEmployeeData( - day: day, totalEmployees: 0, name: 'ashjan')) - .totalEmployees - .toDouble() ?? - 0)); - } - - // Combine spots into a single list if needed or keep them separate - chartDataEmployeeMaryam = chartDataMaryam; - chartDataEmployeeRawda = chartDataRawda; - chartDataEmployeeMena = chartDataMena; - chartDataEmployeeSefer4 = chartDataSefer4; - - update(); } Future fetchDrivers() async { diff --git a/lib/controller/drivers/driverthebest.dart b/lib/controller/drivers/driverthebest.dart index 15fa16b..a6298c8 100644 --- a/lib/controller/drivers/driverthebest.dart +++ b/lib/controller/drivers/driverthebest.dart @@ -25,3 +25,44 @@ class Driverthebest extends GetxController { super.onInit(); } } + +class DriverTheBestGizaController extends GetxController { + bool isLoading = false; + List driver = []; + getBestDriver() async { + var res = await CRUD().get(link: AppLink.getBestDriverGiza, payload: {}); + if (res != 'failure') { + driver = jsonDecode(res)['message']; + update(); + } else { + Get.snackbar('error', '', backgroundColor: AppColor.redColor); + } + } + + @override + void onInit() { + getBestDriver(); + super.onInit(); + } +} + +class DriverTheBestAlexandriaController extends GetxController { + bool isLoading = false; + List driver = []; + getBestDriver() async { + var res = + await CRUD().get(link: AppLink.getBestDriverAlexandria, payload: {}); + if (res != 'failure') { + driver = jsonDecode(res)['message']; + update(); + } else { + Get.snackbar('error', '', backgroundColor: AppColor.redColor); + } + } + + @override + void onInit() { + getBestDriver(); + super.onInit(); + } +} diff --git a/lib/controller/functions/crud.dart b/lib/controller/functions/crud.dart index a70ac87..60bca5a 100644 --- a/lib/controller/functions/crud.dart +++ b/lib/controller/functions/crud.dart @@ -1,22 +1,144 @@ import 'dart:convert'; +import 'dart:io'; import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:get/get.dart'; import 'package:http/http.dart' as http; +import 'package:jwt_decoder/jwt_decoder.dart'; +import 'package:secure_string_operations/secure_string_operations.dart'; import '../../constant/api_key.dart'; import '../../constant/box_name.dart'; +import '../../constant/char_map.dart'; +import '../../constant/info.dart'; import '../../constant/links.dart'; import '../../env/env.dart'; import '../../main.dart'; import '../../print.dart'; import '../../views/widgets/elevated_btn.dart'; +import 'device_info.dart'; +import 'encrypt_decrypt.dart'; class CRUD { + var dev = ''; + getJWT() async { + dev = Platform.isAndroid ? 'android' : 'ios'; + + var payload = { + 'id': 'admin', + 'password': AK.passnpassenger, + 'aud': '${AK.allowed}$dev', + }; + var response1 = await http.post( + Uri.parse(AppLink.loginJwtDriver), + body: payload, + ); + + if (response1.statusCode == 200) { + final decodedResponse1 = jsonDecode(response1.body); + + final jwt = decodedResponse1['jwt']; + await box.write(BoxName.jwt, X.c(X.c(X.c(jwt, cn), cC), cs)); + // await AppInitializer().getKey(); + } + } + + getJwtWallet() async { + String fingerPrint = await DeviceHelper.getDeviceFingerprint(); + print('fingerPrint: ${fingerPrint}'); + dev = Platform.isAndroid ? 'android' : 'ios'; + var payload = { + 'id': '1', + 'password': AK.passnpassenger, + 'aud': '${Env.allowedWallet}$dev', + 'fingerPrint': fingerPrint + }; + // Log.print('payload: ${payload}'); + var response1 = await http.post( + Uri.parse(AppLink.loginWalletAdmin), + body: payload, + ); + // Log.print('response.request: ${response1.request}'); + // Log.print('response.body: ${response1.body}'); + // print(payload); + // Log.print( + // 'jsonDecode(response1.body)["jwt"]: ${jsonDecode(response1.body)['jwt']}'); + await box.write(BoxName.hmac, jsonDecode(response1.body)['hmac']); + return jsonDecode(response1.body)['jwt'].toString(); + } + + Future postWallet( + {required String link, Map? payload}) async { + var s = await getJwtWallet(); + Log.print('jwt: ${s}'); + final hmac = box.read(BoxName.hmac); + Log.print('hmac: ${hmac}'); + var url = Uri.parse(link); + Log.print('url: ${url}'); + try { + // await LoginDriverController().getJWT(); + + var response = await http.post( + url, + body: payload, + headers: { + "Content-Type": "application/x-www-form-urlencoded", + 'Authorization': 'Bearer $s', + 'X-HMAC-Auth': hmac.toString(), + }, + ); + Log.print('response.request:${response.request}'); + Log.print('response.body: ${response.body}'); + Log.print('payload:$payload'); + if (response.statusCode == 200) { + try { + var jsonData = jsonDecode(response.body); + if (jsonData['status'] == 'success') { + return jsonData; + } else { + return jsonData['status']; + } + } catch (e) { + // addError(e.toString(), 'crud().post - JSON decoding'); + return 'failure'; + } + } else if (response.statusCode == 401) { + // Specifically handle 401 Unauthorized + var jsonData = jsonDecode(response.body); + + if (jsonData['error'] == 'Token expired') { + return 'token_expired'; // Return a specific value for token expiration + } else { + // Other 401 errors + // addError('Unauthorized: ${jsonData['error']}', 'crud().post - 401'); + return 'failure'; + } + } else { + // addError('Non-200 response code: ${response.statusCode}', + // 'crud().post - Other'); + return 'failure'; + } + } catch (e) { + // addError('HTTP request error: $e', 'crud().post - HTTP'); + return 'failure'; + } + } + Future get({ required String link, Map? payload, }) async { + if (box.read(BoxName.jwt) == null) { + await getJWT(); + } + bool isTokenExpired = JwtDecoder.isExpired(X + .r(X.r(X.r(box.read(BoxName.jwt), cn), cC), cs) + .toString() + .split(AppInformation.addd)[0]); + if (isTokenExpired) { + await getJWT(); + } + // await Get.put(LoginDriverController()).getJWT(); var url = Uri.parse( link, ); @@ -26,18 +148,148 @@ class CRUD { headers: { "Content-Type": "application/x-www-form-urlencoded", 'Authorization': - 'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}', + 'Bearer ${X.r(X.r(X.r(box.read(BoxName.jwt), cn), cC), cs).toString().split(AppInformation.addd)[0]}' }, ); - Log.print('response: ${response.request}'); - // if (response.statusCode == 200) { - var jsonData = jsonDecode(response.body); + if (response.statusCode == 200) { + Log.print('response: ${response.body}'); + var jsonData = jsonDecode(response.body); + if (jsonData['status'] == 'success') { + return response.body; + } - if (jsonData['status'] == 'success') { - return response.body; + return jsonData['status']; + } else if (response.statusCode == 401) { + // Specifically handle 401 Unauthorized + var jsonData = jsonDecode(response.body); + + if (jsonData['error'] == 'Token expired') { + // Show snackbar prompting to re-login + // await Get.put(LoginDriverController()).getJWT(); + // mySnackbarSuccess('please order now'.tr); + + return 'token_expired'; // Return a specific value for token expiration + } else { + // Other 401 errors + // addError('Unauthorized: ${jsonData['error']}', 'crud().post - 401'); + return 'failure'; + } + } else { + // addError('Non-200 response code: ${response.statusCode}', + // 'crud().post - Other'); + return 'failure'; } + } - return jsonData['status']; + // Future getWallet({ + // required String link, + // Map? payload, + // }) async { + // var s = await getJwtWallet(); + // var url = Uri.parse( + // link, + // ); + // var response = await http.post( + // url, + // body: payload, + // headers: { + // "Content-Type": "application/x-www-form-urlencoded", + // 'Authorization': 'Bearer $s' + // }, + // ); + // if (response.statusCode == 200) { + // var jsonData = jsonDecode(response.body); + // if (jsonData['status'] == 'success') { + // return response.body; + // } + + // return jsonData['status']; + // } else if (response.statusCode == 401) { + // // Specifically handle 401 Unauthorized + // var jsonData = jsonDecode(response.body); + + // if (jsonData['error'] == 'Token expired') { + // // Show snackbar prompting to re-login + // // await Get.put(LoginDriverController()).getJwtWallet(); + + // return 'token_expired'; // Return a specific value for token expiration + // } else { + // // Other 401 errors + // addError('Unauthorized: ${jsonData['error']}', 'crud().post - 401'); + // return 'failure'; + // } + // } else { + // addError('Non-200 response code: ${response.statusCode}', + // 'crud().post - Other'); + // return 'failure'; + // } + // } + + Future post( + {required String link, Map? payload}) async { + var url = Uri.parse(link); + try { + bool isTokenExpired = JwtDecoder.isExpired(X + .r(X.r(X.r(box.read(BoxName.jwt), cn), cC), cs) + .toString() + .split(AppInformation.addd)[0]); + if (isTokenExpired) { + await getJWT(); + } + var response = await http.post( + url, + body: payload, + headers: { + "Content-Type": "application/x-www-form-urlencoded", + 'Authorization': + 'Bearer ${X.r(X.r(X.r(box.read(BoxName.jwt), cn), cC), cs).toString().split(AppInformation.addd)[0]}' + // 'Authorization': 'Bearer ${box.read(BoxName.jwt)}' + }, + ); + if (response.statusCode == 200) { + try { + var jsonData = jsonDecode(response.body); + if (jsonData['status'] == 'success') { + return jsonData; + } else { + return jsonData['status']; + } + } catch (e) { + // addError(e.toString(), 'crud().post - JSON decoding'); + return 'failure'; + } + } else if (response.statusCode == 401) { + // Specifically handle 401 Unauthorized + var jsonData = jsonDecode(response.body); + + if (jsonData['error'] == 'Token expired') { + // Show snackbar prompting to re-login + await getJWT(); + // MyDialog().getDialog( + // 'Session expired. Please log in again.'.tr, + // '', + // () { + // Get.put(LoginController()).loginUsingCredentials( + // box.read(BoxName.passengerID), box.read(BoxName.email)); + // Get.back(); + // }, + // ); + + return 'token_expired'; // Return a specific value for token expiration + } else { + // Other 401 errors + // addError('Unauthorized: ${jsonData['error']}', 'crud().post - 401'); + return 'failure'; + } + } else { + // addError('Non-200 response code: ${response.statusCode}', + // 'crud().post - Other'); + return 'failure'; + } + } catch (e) { + // addError('HTTP request error: $e', 'crud().post - HTTP'); + return 'failure'; + } } // } @@ -67,10 +319,7 @@ class CRUD { http.StreamedResponse response = await request.send(); if (response.statusCode == 200) { - print(await response.stream.bytesToString()); - } else { - print(response.reasonPhrase); - } + } else {} } Future getAgoraToken({ @@ -209,15 +458,12 @@ class CRUD { String imagePathFull = '${AppLink.server}/card_image/$imagePath-$driverID.jpg'; - Log.print('imagePathFull: $imagePathFull'); var request = http.Request( 'POST', Uri.parse( 'https://eastus.api.cognitive.microsoft.com/computervision/imageanalysis:analyze?features=caption,read&model-version=latest&language=en&api-version=2024-02-01')); request.body = json.encode({"url": imagePathFull}); - Log.print('request.body: ${request.body}'); request.headers.addAll(headers); - Log.print('request.headers: ${request.headers}'); http.StreamedResponse response = await request.send(); @@ -281,49 +527,6 @@ class CRUD { } else {} } - Future post({ - required String link, - Map? payload, - }) async { - try { - var url = Uri.parse(link); - var response = await http.post( - url, - body: payload, - headers: { - "Content-Type": "application/x-www-form-urlencoded", - 'Authorization': - 'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}', - }, - ); - Log.print('payload: ${payload}'); - var jsonData = jsonDecode(response.body); - Log.print('jsonData: ${jsonData}'); - - if (response.statusCode == 200) { - if (jsonData['status'] == 'success') { - return response.body; - } else { - return jsonData['status']; - } - } else { - // Log non-fatal errors to Crashlytics - await FirebaseCrashlytics.instance.log("Failed API request :$link"); - FirebaseCrashlytics.instance.recordError( - Exception('Error: ${response.statusCode}'), - null, - reason: 'Failed HTTP POST request', - ); - return response.statusCode; - } - } catch (e, stackTrace) { - // Log error to Crashlytics - await FirebaseCrashlytics.instance - .recordError(e, stackTrace, reason: 'Exception in post request'); - return 'Error occurred'; - } - } - Future kazumiSMS({ required String link, Map? payload, @@ -344,7 +547,6 @@ class CRUD { if (response.statusCode == 200) { var responseBody = await response.stream.bytesToString(); var data = json.decode(responseBody); - Log.print('data: ${data}'); return data; } else {} } @@ -366,7 +568,6 @@ class CRUD { body: body, headers: headers, ); - Log.print('res: ${res.body}'); } Future postPayMob({ diff --git a/lib/controller/functions/device_info.dart b/lib/controller/functions/device_info.dart index 3091394..d2c4092 100644 --- a/lib/controller/functions/device_info.dart +++ b/lib/controller/functions/device_info.dart @@ -1,6 +1,48 @@ // import 'dart:io'; -// import 'package:device_info_plus/device_info_plus.dart'; +import 'package:device_info_plus/device_info_plus.dart'; +import 'dart:io'; + +class DeviceHelper { + static Future getDeviceFingerprint() async { + final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); + var deviceData; + + try { + if (Platform.isAndroid) { + // Fetch Android-specific device information + AndroidDeviceInfo androidInfo = await deviceInfoPlugin.androidInfo; + deviceData = androidInfo.toMap(); // Convert to a map for easier access + // Log.print('deviceData: ${jsonEncode(deviceData)}'); + } else if (Platform.isIOS) { + // Fetch iOS-specific device information + IosDeviceInfo iosInfo = await deviceInfoPlugin.iosInfo; + deviceData = iosInfo.toMap(); // Convert to a map for easier access + } else { + throw UnsupportedError('Unsupported platform'); + } + + // Extract relevant device information + final String deviceId = Platform.isAndroid + ? deviceData['androidId'] ?? deviceData['serialNumber'] ?? 'unknown' + : deviceData['identifierForVendor'] ?? 'unknown'; + + final String deviceModel = deviceData['model'] ?? 'unknown'; + final String osVersion = Platform.isAndroid + ? deviceData['version']['release'] ?? 'unknown' + : deviceData['systemVersion'] ?? 'unknown'; + + // Log the extracted information + + // Generate and return the encrypted fingerprint + final String fingerprint = '${deviceId}_${deviceModel}_$osVersion'; + // print(EncryptionHelper.instance.encryptData(fingerprint)); + return (fingerprint); + } catch (e) { + throw Exception('Failed to generate device fingerprint'); + } + } +} // class DeviceInfoPlus { // static List> deviceDataList = []; diff --git a/lib/controller/functions/encrypt_decrypt.dart b/lib/controller/functions/encrypt_decrypt.dart new file mode 100644 index 0000000..3415e25 --- /dev/null +++ b/lib/controller/functions/encrypt_decrypt.dart @@ -0,0 +1,70 @@ +import 'package:encrypt/encrypt.dart' as encrypt; +import 'package:flutter/foundation.dart'; +import 'package:sefer_admin1/env/env.dart'; + +import '../../constant/box_name.dart'; +import '../../main.dart'; + +class EncryptionHelper { + static EncryptionHelper? _instance; + + late final encrypt.Key key; + late final encrypt.IV iv; + + EncryptionHelper._(this.key, this.iv); + static EncryptionHelper get instance { + if (_instance == null) { + throw Exception( + "EncryptionHelper is not initialized. Call `await EncryptionHelper.initialize()` in main."); + } + return _instance!; + } + + /// Initializes and stores the instance globally + static Future initialize() async { + if (_instance != null) { + debugPrint("EncryptionHelper is already initialized."); + return; // Prevent re-initialization + } + debugPrint("Initializing EncryptionHelper..."); + // Read stored keys + String? keyOfApp = Env.keyOfApp.toString().split('XrXlBl')[0]; + //await storage.read(key: BoxName.keyOfApp); + // Log.print('keyOfApp: ${keyOfApp}'); + String? initializationVector = Env.initializationVector; + // await storage.read(key: BoxName.initializationVector); + // Log.print('initializationVector: ${initializationVector}'); + // Set the global instance + _instance = EncryptionHelper._( + encrypt.Key.fromUtf8(keyOfApp!), + encrypt.IV.fromUtf8(initializationVector!), + ); + debugPrint("EncryptionHelper initialized successfully."); + } + + /// Encrypts a string + String encryptData(String plainText) { + try { + final encrypter = + encrypt.Encrypter(encrypt.AES(key, mode: encrypt.AESMode.cbc)); + final encrypted = encrypter.encrypt(plainText, iv: iv); + return encrypted.base64; + } catch (e) { + debugPrint('Encryption Error: $e'); + return ''; + } + } + + /// Decrypts a string + String decryptData(String encryptedText) { + try { + final encrypter = + encrypt.Encrypter(encrypt.AES(key, mode: encrypt.AESMode.cbc)); + final encrypted = encrypt.Encrypted.fromBase64(encryptedText); + return encrypter.decrypt(encrypted, iv: iv); + } catch (e) { + debugPrint('Decryption Error: $e'); + return ''; + } + } +} diff --git a/lib/controller/functions/wallet.dart b/lib/controller/functions/wallet.dart index de99327..a644599 100644 --- a/lib/controller/functions/wallet.dart +++ b/lib/controller/functions/wallet.dart @@ -21,17 +21,17 @@ class WalletController extends GetxController { addPaymentToDriver(String amount, driverID, token) async { paymentToken = await generateTokenDriver(amount.toString(), driverID); var res = await CRUD().post(link: AppLink.addDrivePayment, payload: { - 'rideId': 'gift$driverID', + 'rideId': 'gift_$driverID _${DateTime.now().toIso8601String()}', 'amount': amount, 'payment_method': 'visaRide', - 'passengerID': 'passengerId', + 'passengerID': 'gift', 'token': paymentToken, 'driverID': driverID.toString(), }); if (res != 'failure') { FirebaseMessagesController().sendNotificationToAnyWithoutData( - 'you have gift from SEFER'.tr, - '', + "لديك هدية من سفَر".tr, + 'لقد حصلت على هدية من سفر بقيمة $amount ', token, // Access token correctly 'ding.wav', ); diff --git a/lib/main.dart b/lib/main.dart index b7bd733..e09b1f8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -10,6 +10,7 @@ import 'package:get/get.dart'; import 'package:get_storage/get_storage.dart'; import 'controller/firebase/firbase_messge.dart'; +import 'controller/functions/encrypt_decrypt.dart'; import 'firebase_options.dart'; import 'models/db_sql.dart'; import 'views/admin/admin_home_page.dart'; @@ -29,6 +30,7 @@ DbSql sql = DbSql.instance; void main() async { WidgetsFlutterBinding.ensureInitialized(); await GetStorage.init(); + await EncryptionHelper.initialize(); if (Platform.isAndroid || Platform.isIOS) { await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, diff --git a/lib/views/admin/admin_home_page.dart b/lib/views/admin/admin_home_page.dart index d012b7c..eafa6cc 100644 --- a/lib/views/admin/admin_home_page.dart +++ b/lib/views/admin/admin_home_page.dart @@ -20,6 +20,7 @@ import '../../controller/functions/gemeni.dart'; import '../../print.dart'; import '../widgets/my_scafold.dart'; import 'captain/captain.dart'; +import 'dashboard_widget.dart'; import 'drivers/driver_the_best.dart'; import 'packages.dart'; import 'passenger/passenger.dart'; @@ -29,432 +30,352 @@ import 'wallet/wallet.dart'; class AdminHomePage extends StatelessWidget { const AdminHomePage({super.key}); + int _calculateCrossAxisCount(BuildContext context) { + double screenWidth = MediaQuery.of(context).size.width; + if (screenWidth > 1200) { + // Large desktops + return 5; + } else if (screenWidth > 900) { + // Desktops / Large Tablets + return 4; + } else if (screenWidth > 600) { + // Tablets + return 3; + } else { + // Phones + return 2; + } + } + + // Helper to format currency (assuming '₵' is your currency symbol) + String _formatCurrency(dynamic value) { + final number = double.tryParse(value.toString()); + if (number != null) { + return '₵${number.toStringAsFixed(2)}'; + } + return value.toString(); // Fallback to original string if not a number + } @override Widget build(BuildContext context) { Get.put(DashboardController()); return MyScafolld( - title: 'Admin Home Page', - action: IconButton( - onPressed: () async { - await Get.find().getDashBoard(); - }, - icon: const Icon( - Icons.refresh, - color: AppColor.greenColor, - ), + title: 'Admin Home Page', + action: IconButton( + onPressed: () async { + await Get.find().getDashBoard(); + }, + icon: const Icon( + Icons.refresh, + color: AppColor.greenColor, ), - body: [ - GetBuilder(builder: (dashboardController) { - return dashboardController.dashbord.isEmpty - ? const MyCircularProgressIndicator() - : Padding( - padding: const EdgeInsets.all(8.0), - child: ListView( - // crossAxisAlignment: WrapCrossAlignment.center, - // alignment: WrapAlignment.center, - children: [ - Container( - width: Get.width, - height: Get.height * .6, - decoration: AppStyle.boxDecoration1, - child: Wrap( - spacing: 6, - alignment: WrapAlignment.spaceBetween, - runAlignment: WrapAlignment.spaceBetween, - children: [ - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'Sms', - style: AppStyle.title, - ), - Text(dashboardController.creditSMS - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'Passengers', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['countPassengers'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'Drivers', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['countDriver'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'Rides this month', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['countRideThisMonth'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'avg costs', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['avg_passenger_price'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'completed ride', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['completed_rides'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'cancelled ride', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['cancelled_rides'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'payments to driver', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['payments'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'sefer wallet', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['seferWallet'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'count of transfer', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['transfer_from_count'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'Morning', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['morning_ride_count'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'evening', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['evening_ride_count'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'night', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['night_ride_count'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'comfort', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['comfort'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'Speed', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['speed'] - .toString()), - ], - ), - )), - Container( - decoration: AppStyle.boxDecoration1, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text( - 'Lady', - style: AppStyle.title, - ), - Text(dashboardController.dashbord[0] - ['lady'] - .toString()), - ], - ), - )), - ], - )), - AdminWidgetsDashBoard( - title: 'Passengers', - onPressed: () => Get.to(() => Passengrs(), - transition: Transition.topLevel)), - AdminWidgetsDashBoard( - title: 'Captains', - onPressed: () => Get.to(() => Captain(), - transition: Transition.size)), - AdminWidgetsDashBoard( - title: 'Wallet', - onPressed: () => Get.to(() => Wallet(), - transition: Transition.fade)), - AdminWidgetsDashBoard( - title: 'Rides', - onPressed: () => Get.to(() => Rides(), - transition: Transition.downToUp)), - AdminWidgetsDashBoard( - title: 'Static', - onPressed: () async { - await Get.put(StaticController()).getAll(); + ), + body: [ + // This is a List for MyScafolld + GetBuilder(builder: (dashboardController) { + return dashboardController.dashbord.isEmpty + ? const MyCircularProgressIndicator() + : Padding( + // This Padding wraps the entire content for this section + padding: const EdgeInsets.all(8.0), + child: ListView( + // Changed from a direct ListView for the whole page + // to a ListView that contains the stats grid and then other items. + children: [ + // --- Statistics Grid Section --- + Container( + // width: Get.width, // Not needed in ListView + // height: Get.height * .6, // Let GridView determine its height + padding: const EdgeInsets.all( + 8.0), // Padding for the grid container + decoration: AppStyle.boxDecoration1.copyWith( + // Optional: slightly different background for the grid area + // color: (AppStyle.boxDecoration1.color as Color?)?.withAlpha(200) ?? Theme.of(context).cardColor.withAlpha(200), + boxShadow: [] // Remove shadow if cards have them, or use a very subtle one + ), + child: GridView.count( + crossAxisCount: _calculateCrossAxisCount(context), + shrinkWrap: true, + physics: + const NeverScrollableScrollPhysics(), // Grid shouldn't scroll independently + mainAxisSpacing: 10.0, + crossAxisSpacing: 10.0, + childAspectRatio: + 1.7, // Adjust for desired card W/H ratio (e.g. 1.5 to 2.0) + children: [ + DashboardStatCard( + title: 'SMS Credits', + value: dashboardController.creditSMS.toString(), + icon: Icons.sms_outlined, + iconColor: Colors.lightBlueAccent, + ), + DashboardStatCard( + title: 'Passengers', + value: dashboardController.dashbord[0] + ['countPassengers'] + .toString(), + icon: Icons.people_alt_outlined, + iconColor: Colors.teal, + ), + DashboardStatCard( + title: 'Drivers', + value: dashboardController.dashbord[0] + ['countDriver'] + .toString(), + icon: Icons.sports_motorsports_outlined, + iconColor: Colors.orangeAccent, + ), + DashboardStatCard( + title: 'Rides (Month)', + value: dashboardController.dashbord[0] + ['countRideThisMonth'] + .toString(), + icon: Icons.calendar_month_outlined, + iconColor: Colors.purpleAccent, + ), + DashboardStatCard( + title: 'Avg. Ride Cost', + value: _formatCurrency(dashboardController + .dashbord[0]['avg_passenger_price']), + icon: Icons.monetization_on_outlined, + iconColor: Colors.green, + valueColor: Colors.green.shade700, + ), + DashboardStatCard( + title: 'Completed Rides', + value: dashboardController.dashbord[0] + ['completed_rides'] + .toString(), + icon: Icons.check_circle_outline, + iconColor: AppColor.greenColor, + ), + DashboardStatCard( + title: 'Cancelled Rides', + value: dashboardController.dashbord[0] + ['cancelled_rides'] + .toString(), + icon: Icons.cancel_outlined, + iconColor: AppColor.redColor, + ), + DashboardStatCard( + title: 'Driver Payments', + value: _formatCurrency( + dashboardController.dashbord[0]['payments']), + icon: Icons.payments_outlined, + iconColor: Colors.indigoAccent, + valueColor: Colors.indigo.shade700, + ), + DashboardStatCard( + title: 'Tripz Wallet', + value: _formatCurrency(dashboardController + .dashbord[0]['seferWallet']), + icon: Icons.account_balance_wallet_outlined, + iconColor: Colors.deepOrangeAccent, + valueColor: Colors.deepOrange.shade700, + ), + DashboardStatCard( + title: 'Transfers Count', + value: dashboardController.dashbord[0] + ['transfer_from_count'] + .toString(), + icon: Icons.swap_horiz_outlined, + iconColor: Colors.brown, + ), + DashboardStatCard( + title: 'Morning Rides', + value: dashboardController.dashbord[0] + ['morning_ride_count'] + .toString(), + icon: Icons.wb_sunny_outlined, + iconColor: Colors.amberAccent, + ), + DashboardStatCard( + title: 'Evening Rides', + value: dashboardController.dashbord[0] + ['evening_ride_count'] + .toString(), + icon: Icons.brightness_4_outlined, + iconColor: Colors.blueGrey, + ), + DashboardStatCard( + title: 'Night Rides', + value: dashboardController.dashbord[0] + ['night_ride_count'] + .toString(), + icon: Icons.nightlight_round_outlined, + iconColor: Colors.black54, + ), + DashboardStatCard( + title: 'Comfort Type', + value: dashboardController.dashbord[0]['comfort'] + .toString(), + icon: Icons.event_seat_outlined, + iconColor: Colors.cyan, + ), + DashboardStatCard( + title: 'Speed Type', + value: dashboardController.dashbord[0]['speed'] + .toString(), + icon: Icons.speed_outlined, + iconColor: Colors.red, + ), + DashboardStatCard( + title: 'Lady Type', + value: dashboardController.dashbord[0]['lady'] + .toString(), + icon: Icons.woman_2_outlined, + iconColor: Colors.pinkAccent, + ), + ], + ), + ), + // --- End of Statistics Grid Section --- - Get.to(() => const StaticDash()); - }, - ), - AdminWidgetsDashBoard( - title: 'send Whatsapp to Drivers', - onPressed: () async { - Get.defaultDialog( - title: 'Are you sure to send by WhatsApp ?', - middleText: '', - confirm: MyElevatedButton( - title: 'Ok', - kolor: AppColor.greenColor, - onPressed: () async { - Log.print( - 'CRUD().phoneDriversTest.: ${CRUD().phoneDriversTest}'); - for (var phoneNumber - in CRUD().phoneDrivers) { - await CRUD().sendWhatsAppAuth( - phoneNumber.toString()); - } - }), - cancel: MyElevatedButton( - title: 'cancel', - kolor: AppColor.redColor, - onPressed: () => Get.back())); - }), - AdminWidgetsDashBoard( - title: 'send notification Drivers', - onPressed: () async { - await Get.put(NotificationController()) - .getTokensDrivers(); - }), - AdminWidgetsDashBoard( - title: 'send SMS Drivers', - onPressed: () async { - Get.defaultDialog( - title: 'Are you sure to send SMS ?', - middleText: '', - content: Padding( - padding: const EdgeInsets.all(8.0), - child: Form( - key: dashboardController.formKey, - child: MyTextForm( - controller: - dashboardController.smsText, - label: 'label', - hint: 'hint', - type: TextInputType.name)), - ), - confirm: MyElevatedButton( - title: 'Ok', - kolor: AppColor.greenColor, - onPressed: () async { - dashboardController.sendSMSMethod(); - }), - cancel: MyElevatedButton( - title: 'cancel', - kolor: AppColor.redColor, - onPressed: () => Get.back())); - }), - AdminWidgetsDashBoard( - title: 'send notification Passengers', - onPressed: () async { - await Get.put(NotificationController()) - .getTokensPassengers(); - }), - AdminWidgetsDashBoard( - title: 'register captain'.tr, + // --- Your AdminWidgetsDashBoard items follow --- + AdminWidgetsDashBoard( + title: 'Passengers', + icon: Icons.people_outline, + onPressed: () => Get.to(() => Passengrs(), + transition: Transition.topLevel)), + AdminWidgetsDashBoard( + title: 'Captains', + icon: Icons.sports_motorsports_outlined, + onPressed: () => Get.to(() => Captain(), + transition: Transition.size)), + // ... (Add all your other AdminWidgetsDashBoard items here with icons) + AdminWidgetsDashBoard( + title: 'Wallet', + icon: Icons.account_balance_wallet_outlined, + onPressed: () => Get.to(() => Wallet(), + transition: Transition.fade)), + AdminWidgetsDashBoard( + title: 'Rides', + icon: Icons.directions_car_filled_outlined, + onPressed: () => Get.to(() => Rides(), + transition: Transition.downToUp)), + AdminWidgetsDashBoard( + title: 'Static', + icon: Icons.bar_chart_outlined, + onPressed: () async { + await Get.put(StaticController()).getAll(); + Get.to(() => const StaticDash()); + }, + ), + AdminWidgetsDashBoard( + title: 'send Whatsapp to Drivers', + icon: Icons.message_outlined, + iconColor: Colors.green, onPressed: () async { - await Get.put(RegisterCaptainController()) - .getDriverNotCompleteRegistration(); - Get.to(() => const DriversCantRegister()); - }, - ), - AdminWidgetsDashBoard( - title: 'update packages'.tr, + Get.defaultDialog( + title: 'Are you sure to send by WhatsApp ?', + middleText: '', + confirm: MyElevatedButton( + title: 'Ok', + kolor: AppColor.greenColor, + onPressed: () async { + Log.print( + 'CRUD().phoneDriversTest.: ${CRUD().phoneDriversTest}'); + for (var phoneNumber + in CRUD().phoneDrivers) { + await CRUD().sendWhatsAppAuth( + phoneNumber.toString()); + } + }), + cancel: MyElevatedButton( + title: 'cancel', + kolor: AppColor.redColor, + onPressed: () => Get.back())); + }), + AdminWidgetsDashBoard( + title: 'send notification Drivers', + icon: Icons.notifications_active_outlined, onPressed: () async { - Get.to(() => PackageUpdateScreen()); - }, - ), - AdminWidgetsDashBoard( - title: 'Employee'.tr, + await Get.put(NotificationController()) + .getTokensDrivers(); + }), + AdminWidgetsDashBoard( + title: 'send SMS Drivers', + icon: Icons.sms_outlined, onPressed: () async { - Get.to(() => EmployeePage()); - }, - ), - AdminWidgetsDashBoard( - title: 'Drivers the best'.tr, + Get.defaultDialog( + title: 'Are you sure to send SMS ?', + middleText: '', + content: Padding( + padding: const EdgeInsets.all(8.0), + child: Form( + key: dashboardController.formKey, + child: MyTextForm( + controller: + dashboardController.smsText, + label: 'label', + hint: 'hint', + type: TextInputType.name)), + ), + confirm: MyElevatedButton( + title: 'Ok', + kolor: AppColor.greenColor, + onPressed: () async { + dashboardController.sendSMSMethod(); + }), + cancel: MyElevatedButton( + title: 'cancel', + kolor: AppColor.redColor, + onPressed: () => Get.back())); + }), + AdminWidgetsDashBoard( + title: 'send notification Passengers', + icon: Icons.notification_important_outlined, onPressed: () async { - Get.to(() => DriverTheBest()); - }, - ), - - // AdminWidgetsDashBoard( - // title: 'Llama', - // onPressed: () => - // CarRegistrationRecognizerController().scanText()), - AdminWidgetsDashBoard( - title: 'Add device to be Admin', - onPressed: () async { - // Map device = DeviceInfoPlus.deviceData; - await CRUD() - .post(link: AppLink.addAdminUser, payload: { - // 'deviceNumber': device['serialNumber'].toString(), - 'name': 'b', - }); - }), - ], - ), - ); - }) - ], - isleading: false); + await Get.put(NotificationController()) + .getTokensPassengers(); + }), + AdminWidgetsDashBoard( + title: 'register captain'.tr, + icon: Icons.person_add_alt_1_outlined, + onPressed: () async { + await Get.put(RegisterCaptainController()) + .getDriverNotCompleteRegistration(); + Get.to(() => const DriversCantRegister()); + }, + ), + AdminWidgetsDashBoard( + title: 'update packages'.tr, + icon: Icons.inventory_2_outlined, + onPressed: () async { + Get.to(() => PackageUpdateScreen()); + }, + ), + AdminWidgetsDashBoard( + title: 'Employee'.tr, + icon: Icons.badge_outlined, + onPressed: () async { + Get.to(() => EmployeePage()); + }, + ), + AdminWidgetsDashBoard( + title: 'Drivers the best'.tr, + icon: Icons.star_outline, + onPressed: () async { + Get.to(() => DriverTheBest()); + }, + ), + AdminWidgetsDashBoard( + title: 'Add device to be Admin', + icon: Icons.admin_panel_settings_outlined, + onPressed: () async { + await CRUD() + .post(link: AppLink.addAdminUser, payload: { + 'name': 'b', + }); + }), + ], + ), + ); + }) + ], + isleading: false, + ); } } @@ -463,25 +384,76 @@ class AdminWidgetsDashBoard extends StatelessWidget { super.key, required this.title, required this.onPressed, + this.icon, // Optional icon + this.iconColor, + this.backgroundColor, }); + final String title; final Callback onPressed; + final IconData? icon; + final Color? iconColor; + final Color? backgroundColor; @override Widget build(BuildContext context) { return Padding( - padding: const EdgeInsets.all(8.0), + padding: const EdgeInsets.symmetric(vertical: 6.0, horizontal: 12.0), child: InkWell( onTap: onPressed, + borderRadius: + BorderRadius.circular(12.0), // Rounded corners for tap effect child: Container( - decoration: AppStyle.boxDecoration, - height: 50, - width: Get.width * .4, - child: Center( - child: Text( - title.tr, - style: AppStyle.title, - ), + padding: const EdgeInsets.symmetric( + horizontal: 16.0, vertical: 16.0), // Increased padding + decoration: BoxDecoration( + color: backgroundColor ?? + Theme.of(context).cardColor, // Use provided or theme card color + borderRadius: BorderRadius.circular(12.0), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.15), + spreadRadius: 1, + blurRadius: 8, + offset: const Offset(0, 2), // changes position of shadow + ), + ], + // If you want to use AppStyle.boxDecoration as a base and modify it: + // ...AppStyle.boxDecoration.copyWith( + // color: backgroundColor ?? AppStyle.boxDecoration.color, + // // Potentially override other properties of AppStyle.boxDecoration if needed + // ), + ), + child: Row( + children: [ + if (icon != null) ...[ + Icon( + icon, + size: 28, // Slightly larger icon + color: iconColor ?? + AppColor.primaryColor, // Use primary color or provided + ), + const SizedBox(width: 16), + ], + Expanded( + child: Text( + title.tr, + style: AppStyle.title.copyWith( + fontSize: 16, // Adjust font size for better readability + fontWeight: FontWeight.w500, // Medium weight + color: Theme.of(context) + .textTheme + .bodyLarge + ?.color, // Use theme text color + ), + ), + ), + const Icon( + Icons.arrow_forward_ios, + size: 18, + color: Colors.grey, // Subtle indicator for navigation + ), + ], ), ), ), diff --git a/lib/views/admin/captain/captain.dart b/lib/views/admin/captain/captain.dart index 2a3ac66..ba2f269 100644 --- a/lib/views/admin/captain/captain.dart +++ b/lib/views/admin/captain/captain.dart @@ -4,6 +4,7 @@ import 'package:get/get.dart'; import '../../../constant/colors.dart'; import '../../../constant/style.dart'; import '../../../controller/admin/captain_admin_controller.dart'; +import '../../../controller/functions/encrypt_decrypt.dart'; import '../../widgets/elevated_btn.dart'; import '../../widgets/my_scafold.dart'; import '../../widgets/my_textField.dart'; @@ -153,7 +154,7 @@ class Captain extends StatelessWidget { .spaceBetween, children: [ Text( - 'Name : ${user['first_name']} ${user['last_name']}', + 'Name : ${(user['first_name'])} ${(user['last_name'])}', style: AppStyle.title, ), Text( diff --git a/lib/views/admin/dashboard_widget.dart b/lib/views/admin/dashboard_widget.dart new file mode 100644 index 0000000..04c8f95 --- /dev/null +++ b/lib/views/admin/dashboard_widget.dart @@ -0,0 +1,94 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; // For Get.width if needed, and .tr +import 'package:sefer_admin1/constant/colors.dart'; // Assuming AppColor is here +import 'package:sefer_admin1/constant/style.dart'; // Assuming AppStyle is here + +class DashboardStatCard extends StatelessWidget { + final String title; + final String value; + final IconData? icon; + final Color? iconColor; + final Color? backgroundColor; + final Color? valueColor; + + const DashboardStatCard({ + Key? key, + required this.title, + required this.value, + this.icon, + this.iconColor, + this.backgroundColor, + this.valueColor, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + // Attempt to use AppStyle.boxDecoration1 properties if it's a BoxDecoration + BoxDecoration? baseDecoration = AppStyle.boxDecoration1; + Color? finalBackgroundColor = + backgroundColor ?? baseDecoration?.color ?? Theme.of(context).cardColor; + BorderRadius? finalBorderRadius = + baseDecoration?.borderRadius?.resolve(Directionality.of(context)) ?? + BorderRadius.circular(12.0); + + return Container( + padding: const EdgeInsets.symmetric(horizontal: 14.0, vertical: 12.0), + decoration: BoxDecoration( + color: finalBackgroundColor, + borderRadius: finalBorderRadius, + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + spreadRadius: 1, + blurRadius: 6, + offset: const Offset(0, 2), + ), + ], + // If AppStyle.boxDecoration1 includes a border, you might want to add it here too + // border: baseDecoration?.border, + ), + child: Column( + mainAxisAlignment: + MainAxisAlignment.center, // Center content vertically + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Flexible( + child: Text( + title.tr, + style: AppStyle.title.copyWith( + fontSize: 13, + fontWeight: FontWeight.w500, + color: Theme.of(context).textTheme.bodySmall?.color, + ), + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), + ), + if (icon != null) + Icon( + icon, + size: 24, + color: iconColor ?? AppColor.primaryColor.withOpacity(0.7), + ), + ], + ), + const SizedBox(height: 6), + Text( + value, + style: TextStyle( + fontSize: 22, + fontWeight: FontWeight.bold, + color: valueColor ?? AppColor.primaryColor, + ), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ], + ), + ); + } +} diff --git a/lib/views/admin/drivers/alexandria.dart b/lib/views/admin/drivers/alexandria.dart new file mode 100644 index 0000000..d01bf2e --- /dev/null +++ b/lib/views/admin/drivers/alexandria.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:sefer_admin1/constant/links.dart'; +import 'package:sefer_admin1/controller/functions/crud.dart'; +import 'package:sefer_admin1/controller/functions/wallet.dart'; +import 'package:sefer_admin1/views/widgets/my_scafold.dart'; + +import '../../../controller/drivers/driverthebest.dart'; + +class DriverTheBestAlexandria extends StatelessWidget { + const DriverTheBestAlexandria({super.key}); + + @override + Widget build(BuildContext context) { + Get.put(DriverTheBestAlexandriaController(), permanent: true); + return MyScafolld( + title: 'Alexandria'.tr, + body: [ + GetBuilder(builder: (driverthebest) { + return driverthebest.driver.isNotEmpty + ? ListView.builder( + itemCount: driverthebest.driver.length, + itemBuilder: (context, index) { + final driver = driverthebest.driver[index]; + return ListTile( + leading: CircleAvatar( + child: Text( + ((driver['driver_count'] * 5) / 3600) + .toStringAsFixed(0), + ), + ), + title: Text(driver['name_arabic'] ?? 'Unknown Name'), + subtitle: Text('Phone: ${driver['phone'] ?? 'N/A'}'), + trailing: IconButton( + onPressed: () async { + Get.defaultDialog( + title: + 'are you sure to pay to this driver gift'.tr, + middleText: '', + onConfirm: () async { + final wallet = Get.put(WalletController()); + await wallet.addPaymentToDriver('100', + driver['id'].toString(), driver['token']); + await wallet.addSeferWallet( + '100', driver['id'].toString()); + await CRUD().post( + link: AppLink.deleteRecord, + payload: { + 'driver_id': driver['id'].toString() + }); + driverthebest.driver.removeAt(index); + driverthebest.update(); + }, + onCancel: () => Get.back()); + }, + icon: const Icon(Icons.wallet_giftcard_rounded), + ), + ); + }, + ) + : const Center( + child: Text('No drivers available.'), + ); + }) + ], + isleading: true, + ); + } +} diff --git a/lib/views/admin/drivers/driver_the_best.dart b/lib/views/admin/drivers/driver_the_best.dart index e600db8..0b57142 100644 --- a/lib/views/admin/drivers/driver_the_best.dart +++ b/lib/views/admin/drivers/driver_the_best.dart @@ -1,54 +1,96 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; +import 'package:sefer_admin1/constant/links.dart'; +import 'package:sefer_admin1/controller/functions/crud.dart'; +import 'package:sefer_admin1/controller/functions/encrypt_decrypt.dart'; import 'package:sefer_admin1/controller/functions/wallet.dart'; -import 'package:sefer_admin1/views/admin/wallet/wallet.dart'; +import 'package:sefer_admin1/views/widgets/elevated_btn.dart'; import 'package:sefer_admin1/views/widgets/my_scafold.dart'; import '../../../controller/drivers/driverthebest.dart'; +import 'alexandria.dart'; +import 'giza.dart'; class DriverTheBest extends StatelessWidget { const DriverTheBest({super.key}); @override Widget build(BuildContext context) { - Get.put(Driverthebest()); + Get.put(Driverthebest(), permanent: true); return MyScafolld( title: 'Best Drivers'.tr, body: [ GetBuilder(builder: (driverthebest) { return driverthebest.driver.isNotEmpty - ? ListView.builder( - itemCount: driverthebest.driver.length, - itemBuilder: (context, index) { - final driver = driverthebest.driver[index]; - return ListTile( - leading: CircleAvatar( - child: Text( - ((driver['driver_count'] * 5) / 3600) - .toStringAsFixed(0), - ), - ), - title: Text(driver['name_arabic'] ?? 'Unknown Name'), - subtitle: Text('Phone: ${driver['phone'] ?? 'N/A'}'), - trailing: IconButton( - onPressed: () async { - Get.defaultDialog( - title: - 'are you sure to pay to this driver gift'.tr, - middleText: '', - onConfirm: () async { - final wallet = Get.put(WalletController()); - await wallet.addPaymentToDriver('200', - driver['id'].toString(), driver['token']); - await wallet.addSeferWallet( - '200', driver['id'].toString()); + ? Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + MyElevatedButton( + title: 'Giza', + onPressed: () { + Get.to(() => DriverTheBestGiza()); + }), + MyElevatedButton( + title: 'Alexandria', + onPressed: () { + Get.to(() => DriverTheBestAlexandria()); + }), + ], + ), + SizedBox( + height: Get.height * .7, + child: ListView.builder( + itemCount: driverthebest.driver.length, + itemBuilder: (context, index) { + final driver = driverthebest.driver[index]; + return ListTile( + leading: CircleAvatar( + child: Text( + (int.parse(driver['driver_count']) * 5 / 3600) + .toStringAsFixed( + 0), // Perform division first, then convert to string + ), + ), + title: + Text((driver['name_arabic']) ?? 'Unknown Name'), + subtitle: + Text('Phone: ${(driver['phone']) ?? 'N/A'}'), + trailing: IconButton( + onPressed: () async { + Get.defaultDialog( + title: + 'are you sure to pay to this driver gift' + .tr, + middleText: '', + onConfirm: () async { + final wallet = + Get.put(WalletController()); + await wallet.addPaymentToDriver( + '200', + driver['id'].toString(), + driver['token']); + await wallet.addSeferWallet( + '200', driver['id'].toString()); + await CRUD().post( + link: AppLink.deleteRecord, + payload: { + 'driver_id': driver['id'].toString() + }); + driverthebest.driver.removeAt(index); + driverthebest.update(); + Get.back(); + }, + onCancel: () => Get.back()); }, - onCancel: () => Get.back()); + icon: const Icon(Icons.wallet_giftcard_rounded), + ), + ); }, - icon: const Icon(Icons.wallet_giftcard_rounded), ), - ); - }, + ), + ], ) : const Center( child: Text('No drivers available.'), diff --git a/lib/views/admin/drivers/giza.dart b/lib/views/admin/drivers/giza.dart new file mode 100644 index 0000000..bfb7338 --- /dev/null +++ b/lib/views/admin/drivers/giza.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:sefer_admin1/constant/links.dart'; +import 'package:sefer_admin1/controller/functions/crud.dart'; +import 'package:sefer_admin1/controller/functions/wallet.dart'; +import 'package:sefer_admin1/views/widgets/my_scafold.dart'; + +import '../../../controller/drivers/driverthebest.dart'; + +class DriverTheBestGiza extends StatelessWidget { + const DriverTheBestGiza({super.key}); + + @override + Widget build(BuildContext context) { + Get.put(DriverTheBestGizaController(), permanent: true); + return MyScafolld( + title: 'Giza'.tr, + body: [ + GetBuilder(builder: (driverthebest) { + return driverthebest.driver.isNotEmpty + ? ListView.builder( + itemCount: driverthebest.driver.length, + itemBuilder: (context, index) { + final driver = driverthebest.driver[index]; + return ListTile( + leading: CircleAvatar( + child: Text( + ((driver['driver_count'] * 5) / 3600) + .toStringAsFixed(0), + ), + ), + title: Text(driver['name_arabic'] ?? 'Unknown Name'), + subtitle: Text('Phone: ${driver['phone'] ?? 'N/A'}'), + trailing: IconButton( + onPressed: () async { + Get.defaultDialog( + title: + 'are you sure to pay to this driver gift'.tr, + middleText: '', + onConfirm: () async { + final wallet = Get.put(WalletController()); + await wallet.addPaymentToDriver('100', + driver['id'].toString(), driver['token']); + await wallet.addSeferWallet( + '100', driver['id'].toString()); + await CRUD().post( + link: AppLink.deleteRecord, + payload: { + 'driver_id': driver['id'].toString() + }); + driverthebest.driver.removeAt(index); + driverthebest.update(); + }, + onCancel: () => Get.back()); + }, + icon: const Icon(Icons.wallet_giftcard_rounded), + ), + ); + }, + ) + : const Center( + child: Text('No drivers available.'), + ); + }) + ], + isleading: true, + ); + } +} diff --git a/lib/views/admin/employee/employee_page.dart b/lib/views/admin/employee/employee_page.dart index 80971dc..d9732f4 100644 --- a/lib/views/admin/employee/employee_page.dart +++ b/lib/views/admin/employee/employee_page.dart @@ -165,7 +165,8 @@ class EmployeeDetails extends StatelessWidget { height: 200, width: 400, child: Image.network( - 'https://sefer.click/sefer/card_image/idFrontEmployee-${employeeController.employee[index]['id']}.jpg'), + // https: //server.sefer.click/sefer.click/sefer/card_image/idFrontEmployee-GC15188P.jpg + 'https://server.sefer.click/sefer.click/sefer/card_image/idFrontEmployee-${employeeController.employee[index]['id']}.jpg'), ), const SizedBox( height: 10, @@ -174,7 +175,7 @@ class EmployeeDetails extends StatelessWidget { height: 200, width: 400, child: Image.network( - 'https://sefer.click/sefer/card_image/idFrontEmployee-${employeeController.employee[index]['id']}.jpg'), + 'https://server.sefer.click/sefer.click/sefer/card_image/idFrontEmployee-${employeeController.employee[index]['id']}.jpg'), ) ], ); diff --git a/lib/views/admin/passenger/passenger.dart b/lib/views/admin/passenger/passenger.dart index 9ea0951..460268f 100644 --- a/lib/views/admin/passenger/passenger.dart +++ b/lib/views/admin/passenger/passenger.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; +import 'package:sefer_admin1/controller/functions/encrypt_decrypt.dart'; import '../../../constant/style.dart'; import '../../../controller/admin/passenger_admin_controller.dart'; @@ -136,7 +137,7 @@ class Passengrs extends StatelessWidget { .spaceBetween, children: [ Text( - 'Name : ${user['first_name']} ${user['last_name']}', + 'Name : ${(user['first_name'])} ${(user['last_name'])}', style: AppStyle.title, ), Text( diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 7994270..b32faa3 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,7 @@ import FlutterMacOS import Foundation +import device_info_plus import file_selector_macos import firebase_core import firebase_crashlytics @@ -12,11 +13,13 @@ import firebase_messaging import flutter_image_compress_macos import flutter_secure_storage_macos import google_sign_in_ios +import local_auth_darwin import path_provider_foundation -import sqflite +import sqflite_darwin import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseCrashlyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCrashlyticsPlugin")) @@ -24,6 +27,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FlutterImageCompressMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterImageCompressMacosPlugin")) FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin")) + FLALocalAuthPlugin.register(with: registry.registrar(forPlugin: "FLALocalAuthPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) diff --git a/pubspec.lock b/pubspec.lock index 2c7f543..8d56183 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,106 +5,119 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + sha256: "16e298750b6d0af7ce8a3ba7c18c69c3785d11b15ec83f6dcd0ad2a0009b3cab" url: "https://pub.dev" source: hosted - version: "67.0.0" + version: "76.0.0" _flutterfire_internals: dependency: transitive description: name: _flutterfire_internals - sha256: "37a42d06068e2fe3deddb2da079a8c4d105f241225ba27b7122b37e9865fd8f7" + sha256: daa1d780fdecf8af925680c06c86563cdd445deea995d5c9176f1302a2b10bbe url: "https://pub.dev" source: hosted - version: "1.3.35" + version: "1.3.48" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.3" analyzer: dependency: transitive description: name: analyzer - sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + sha256: "1f14db053a8c23e260789e9b0980fa27f2680dd640932cae5e1137cce0e46e1e" url: "https://pub.dev" source: hosted - version: "6.4.1" + version: "6.11.0" archive: dependency: transitive description: name: archive - sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + sha256: "6199c74e3db4fbfbd04f66d739e72fe11c8a8957d5f219f1f4482dbde6420b5a" url: "https://pub.dev" source: hosted - version: "3.6.1" + version: "4.0.2" args: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" + asn1lib: + dependency: transitive + description: + name: asn1lib + sha256: "1c296cd268f486cabcc3930e9b93a8133169305f18d722916e675959a88f6d2c" + url: "https://pub.dev" + source: hosted + version: "1.5.9" async: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.13.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" build: dependency: transitive description: name: build - sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" build_config: dependency: transitive description: name: build_config - sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" build_daemon: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "294a2edaf4814a378725bfe6358210196f5ea37af89ecd81bfa32960113d4948" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.3" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + sha256: "99d3980049739a985cf9b21f30881f46db3ebc62c5b8d5e60e27440876b1ba1e" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.4.3" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "74691599a5bc750dc96a6b4bfd48f7d9d66453eab04c7f4063134800d6a5c573" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.14" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + sha256: "22e3aa1c80e0ada3722fe5b63fd43d9c8990759d0a2cf489c8c5d7b2bdebc021" url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "8.0.0" built_collection: dependency: transitive description: @@ -117,18 +130,18 @@ packages: dependency: transitive description: name: built_value - sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2" url: "https://pub.dev" source: hosted - version: "8.9.2" + version: "8.9.3" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" checked_yaml: dependency: transitive description: @@ -141,138 +154,170 @@ packages: dependency: transitive description: name: cli_util - sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c url: "https://pub.dev" source: hosted - version: "0.4.1" + version: "0.4.2" clock: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" code_builder: dependency: transitive description: name: code_builder - sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" url: "https://pub.dev" source: hosted - version: "4.10.0" + version: "4.10.1" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" convert: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" cross_file: dependency: transitive description: name: cross_file - sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32" + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.4+1" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.6" dart_style: dependency: transitive description: name: dart_style - sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" url: "https://pub.dev" source: hosted - version: "2.3.6" + version: "2.3.7" + device_info_plus: + dependency: "direct main" + description: + name: device_info_plus + sha256: "98f28b42168cc509abc92f88518882fd58061ea372d7999aecc424345c7bff6a" + url: "https://pub.dev" + source: hosted + version: "11.5.0" + device_info_plus_platform_interface: + dependency: transitive + description: + name: device_info_plus_platform_interface + sha256: e1ea89119e34903dca74b883d0dd78eb762814f97fb6c76f35e9ff74d261a18f + url: "https://pub.dev" + source: hosted + version: "7.0.3" dio: dependency: "direct main" description: name: dio - sha256: "11e40df547d418cc0c4900a9318b26304e665da6fa4755399a9ff9efd09034b5" + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" url: "https://pub.dev" source: hosted - version: "5.4.3+1" + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + encrypt: + dependency: "direct main" + description: + name: encrypt + sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2" + url: "https://pub.dev" + source: hosted + version: "5.0.3" envied: dependency: "direct main" description: name: envied - sha256: bbff9c76120e4dc5e2e36a46690cf0a26feb65e7765633f4e8d916bcd173a450 + sha256: "129a0dbf32b90344fa2e9d6943569fdec8f17904e66161e0a1f09ee3416508ae" url: "https://pub.dev" source: hosted - version: "0.5.4+1" + version: "1.0.0" envied_generator: dependency: "direct dev" description: name: envied_generator - sha256: "517b70de08d13dcd40e97b4e5347e216a0b1c75c99e704f3c85c0474a392d14a" + sha256: "76aec98907872ce8488f021e68d213bd0d9bf224eb393a094be1708cc3180d41" url: "https://pub.dev" source: hosted - version: "0.5.4+1" + version: "1.0.0" equatable: dependency: transitive description: name: equatable - sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.0.7" fake_async: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.3" ffi: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" file: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" file_selector_linux: dependency: transitive description: name: file_selector_linux - sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" url: "https://pub.dev" source: hosted - version: "0.9.2+1" + version: "0.9.3+2" file_selector_macos: dependency: transitive description: name: file_selector_macos - sha256: f42eacb83b318e183b1ae24eead1373ab1334084404c8c16e0354f9a3e55d385 + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "0.9.4" + version: "0.9.4+2" file_selector_platform_interface: dependency: transitive description: @@ -285,90 +330,90 @@ packages: dependency: transitive description: name: file_selector_windows - sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0 + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" url: "https://pub.dev" source: hosted - version: "0.9.3+1" + version: "0.9.3+3" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: "26de145bb9688a90962faec6f838247377b0b0d32cc0abecd9a4e43525fc856c" + sha256: "15d761b95dfa2906dfcc31b7fc6fe293188533d1a3ffe78389ba9e69bd7fdbde" url: "https://pub.dev" source: hosted - version: "2.32.0" + version: "3.9.0" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface - sha256: "1003a5a03a61fc9a22ef49f37cbcb9e46c86313a7b2e7029b9390cf8c6fc32cb" + sha256: d7253d255ff10f85cfd2adaba9ac17bae878fa3ba577462451163bd9f1d1f0bf url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.4.0" firebase_core_web: dependency: transitive description: name: firebase_core_web - sha256: "6643fe3dbd021e6ccfb751f7882b39df355708afbdeb4130fc50f9305a9d1a3d" + sha256: fbc008cf390d909b823763064b63afefe9f02d8afdb13eb3f485b871afee956b url: "https://pub.dev" source: hosted - version: "2.17.2" + version: "2.19.0" firebase_crashlytics: dependency: "direct main" description: name: firebase_crashlytics - sha256: "9897c01efaa950d2f6da8317d12452749a74dc45f33b46390a14cfe28067f271" + sha256: e235c8452d5622fc271404592388fde179e4b62c50e777ad3c8c3369296104ed url: "https://pub.dev" source: hosted - version: "3.5.7" + version: "4.2.0" firebase_crashlytics_platform_interface: dependency: transitive description: name: firebase_crashlytics_platform_interface - sha256: "16a71e08fbf6e00382816e1b13397898c29a54fa0ad969c2c2a3b82a704877f0" + sha256: "4ddadf44ed0a202f3acad053f12c083877940fa8cc1a9f747ae09e1ef4372160" url: "https://pub.dev" source: hosted - version: "3.6.35" + version: "3.7.0" firebase_messaging: dependency: "direct main" description: name: firebase_messaging - sha256: a1662cc95d9750a324ad9df349b873360af6f11414902021f130c68ec02267c4 + sha256: "151a3ee68736abf293aab66d1317ade53c88abe1db09c75a0460aebf7767bbdf" url: "https://pub.dev" source: hosted - version: "14.9.4" + version: "15.1.6" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface - sha256: "87c4a922cb6f811cfb7a889bdbb3622702443c52a0271636cbc90d813ceac147" + sha256: f331ee51e40c243f90cc7bc059222dfec4e5df53125b08d31fb28961b00d2a9d url: "https://pub.dev" source: hosted - version: "4.5.37" + version: "4.5.49" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web - sha256: "0d34dca01a7b103ed7f20138bffbb28eb0e61a677bf9e78a028a932e2c7322d5" + sha256: efaf3fdc54cd77e0eedb8e75f7f01c808828c64d052ddbf94d3009974e47d30f url: "https://pub.dev" source: hosted - version: "3.8.7" + version: "3.9.5" fixnum: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" fl_chart: dependency: "direct main" description: name: fl_chart - sha256: "2b7c1f5d867da9a054661641c8f499c55c47c39acccb97b3bc673f5fa9a39e74" + sha256: c724234b05e378383e958f3e82ca84a3e1e3c06a0898462044dd8a24b1ee9864 url: "https://pub.dev" source: hosted - version: "0.67.0" + version: "0.70.0" flutter: dependency: "direct main" description: flutter @@ -426,26 +471,26 @@ packages: dependency: "direct main" description: name: flutter_launcher_icons - sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea" + sha256: "31cd0885738e87c72d6f055564d37fabcdacee743b396b78c7636c169cac64f5" url: "https://pub.dev" source: hosted - version: "0.13.1" + version: "0.14.2" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "5.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" + sha256: "615a505aef59b151b46bbeef55b36ce2b6ed299d160c51d84281946f0aa0ce0e" url: "https://pub.dev" source: hosted - version: "2.0.19" + version: "2.0.24" flutter_secure_storage: dependency: "direct main" description: @@ -540,42 +585,42 @@ packages: dependency: "direct main" description: name: google_fonts - sha256: "2776c66b3e97c6cdd58d1bd3281548b074b64f1fd5c8f82391f7456e38849567" + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 url: "https://pub.dev" source: hosted - version: "4.0.5" + version: "6.2.1" google_identity_services_web: dependency: transitive description: name: google_identity_services_web - sha256: "9482364c9f8b7bd36902572ebc3a7c2b5c8ee57a9c93e6eb5099c1a9ec5265d8" + sha256: "55580f436822d64c8ff9a77e37d61f5fb1e6c7ec9d632a43ee324e2a05c3c6c9" url: "https://pub.dev" source: hosted - version: "0.3.1+1" + version: "0.3.3" google_sign_in: dependency: "direct main" description: name: google_sign_in - sha256: "0b8787cb9c1a68ad398e8010e8c8766bfa33556d2ab97c439fb4137756d7308f" + sha256: fad6ddc80c427b0bba705f2116204ce1173e09cf299f85e053d57a55e5b2dd56 url: "https://pub.dev" source: hosted - version: "6.2.1" + version: "6.2.2" google_sign_in_android: dependency: transitive description: name: google_sign_in_android - sha256: "7647893c65e6720973f0e579051c8f84b877b486614d9f70a404259c41a4632e" + sha256: "3b96f9b6cf61915f73cbe1218a192623e296a9b8b31965702503649477761e36" url: "https://pub.dev" source: hosted - version: "6.1.23" + version: "6.1.34" google_sign_in_ios: dependency: transitive description: name: google_sign_in_ios - sha256: a058c9880be456f21e2e8571c1126eaacd570bdc5b6c6d9d15aea4bdf22ca9fe + sha256: "83f015169102df1ab2905cf8abd8934e28f87db9ace7a5fa676998842fed228a" url: "https://pub.dev" source: hosted - version: "5.7.6" + version: "5.7.8" google_sign_in_platform_interface: dependency: transitive description: @@ -588,10 +633,10 @@ packages: dependency: transitive description: name: google_sign_in_web - sha256: d606264c7a1a526a3aa79d938b85a601d8589731a478bd4a3dcbdeb14a572228 + sha256: ada595df6c30cead48e66b1f3a050edf0c5cf2ba60c185d69690e08adcc6281b url: "https://pub.dev" source: hosted - version: "0.12.4+1" + version: "0.12.4+3" googleapis_auth: dependency: "direct main" description: @@ -604,10 +649,10 @@ packages: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" http: dependency: "direct main" description: @@ -620,34 +665,34 @@ packages: dependency: transitive description: name: http_multi_server - sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" http_parser: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.1" image: dependency: transitive description: name: image - sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8" + sha256: "8346ad4b5173924b5ddddab782fc7d8a6300178c8b1dc427775405a01701c4a6" url: "https://pub.dev" source: hosted - version: "4.2.0" + version: "4.5.2" image_cropper: dependency: "direct main" description: name: image_cropper - sha256: fe37d9a129411486e0d93089b61bd326d05b89e78ad4981de54b560725bf5bd5 + sha256: "266760ed426d7121f0ada02c672bfe5c1b5c714e908328716aee756f045709dc" url: "https://pub.dev" source: hosted - version: "8.0.2" + version: "8.1.0" image_cropper_for_web: dependency: transitive description: @@ -676,26 +721,26 @@ packages: dependency: transitive description: name: image_picker_android - sha256: ff39a10ab4f48f4ac70776d0494a97bf073cd2570892cd46bc8a5cac162c25db + sha256: fa8141602fde3f7e2f81dbf043613eb44dfa325fa0bcf93c0f142c9f7a2c193e url: "https://pub.dev" source: hosted - version: "0.8.12+4" + version: "0.8.12+18" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: "5d6eb13048cd47b60dbf1a5495424dea226c5faf3950e20bf8120a58efb5b5f3" + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "3.0.6" image_picker_ios: dependency: transitive description: name: image_picker_ios - sha256: "6703696ad49f5c3c8356d576d7ace84d1faf459afb07accbb0fae780753ff447" + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" url: "https://pub.dev" source: hosted - version: "0.8.12" + version: "0.8.12+1" image_picker_linux: dependency: transitive description: @@ -740,10 +785,10 @@ packages: dependency: transitive description: name: io - sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" js: dependency: transitive description: @@ -760,22 +805,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.9.0" + jwt_decoder: + dependency: "direct main" + description: + name: jwt_decoder + sha256: "54774aebf83f2923b99e6416b4ea915d47af3bde56884eb622de85feabbc559f" + url: "https://pub.dev" + source: hosted + version: "2.0.1" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.9" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.9" leak_tracker_testing: dependency: transitive description: @@ -788,34 +841,34 @@ packages: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "4a16b3f03741e1252fda5de3ce712666d010ba2122f8e912c94f9f7b90e1a4c3" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "5.1.0" local_auth: dependency: "direct main" description: name: local_auth - sha256: "280421b416b32de31405b0a25c3bd42dfcef2538dfbb20c03019e02a5ed55ed0" + sha256: "434d854cf478f17f12ab29a76a02b3067f86a63a6d6c4eb8fbfdcfe4879c1b7b" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" local_auth_android: dependency: transitive description: name: local_auth_android - sha256: e0e5b1ea247c5a0951c13a7ee13dc1beae69750e6a2e1910d1ed6a3cd4d56943 + sha256: "6763aaf8965f21822624cb2fd3c03d2a8b3791037b5efb0fe4b13e110f5afc92" url: "https://pub.dev" source: hosted - version: "1.0.38" + version: "1.0.46" local_auth_darwin: dependency: transitive description: name: local_auth_darwin - sha256: e424ebf90d5233452be146d4a7da4bcd7a70278b67791592f3fde1bda8eef9e2 + sha256: "5c5127061107278ab4cafa1ac51b3b6760282bf1a2abf011270908a429d1634b" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.4.2" local_auth_platform_interface: dependency: transitive description: @@ -828,26 +881,34 @@ packages: dependency: transitive description: name: local_auth_windows - sha256: "505ba3367ca781efb1c50d3132e44a2446bccc4163427bc203b9b4d8994d97ea" + sha256: bc4e66a29b0fdf751aafbec923b5bed7ad6ed3614875d8151afe2578520b2ab5 url: "https://pub.dev" source: hosted - version: "1.0.10" + version: "1.0.11" logging: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" + macros: + dependency: transitive + description: + name: macros + sha256: "1d9e801cd66f7ea3663c45fc708450db1fa57f988142c64289142c9b7ee80656" + url: "https://pub.dev" + source: hosted + version: "0.1.3-main.0" matcher: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" material_color_utilities: dependency: transitive description: @@ -860,58 +921,58 @@ packages: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.16.0" mime: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "2.0.0" package_config: dependency: transitive description: name: package_config - sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" path: dependency: "direct main" description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" path_provider: dependency: transitive description: name: path_provider - sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2" url: "https://pub.dev" source: hosted - version: "2.2.4" + version: "2.2.15" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" path_provider_linux: dependency: transitive description: @@ -932,10 +993,10 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" petitparser: dependency: transitive description: @@ -948,10 +1009,10 @@ packages: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: @@ -960,6 +1021,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe" + url: "https://pub.dev" + source: hosted + version: "3.9.1" pool: dependency: transitive description: @@ -968,14 +1037,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" + posix: + dependency: transitive + description: + name: posix + sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a + url: "https://pub.dev" + source: hosted + version: "6.0.1" pub_semver: dependency: transitive description: name: pub_semver - sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" pubspec_parse: dependency: transitive description: @@ -1003,23 +1080,23 @@ packages: dependency: transitive description: name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.2" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.1" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_gen: dependency: transitive description: @@ -1032,138 +1109,162 @@ packages: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" sqflite: dependency: "direct main" description: name: sqflite - sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d + sha256: "2d7299468485dca85efeeadf5d38986909c5eb0cd71fd3db2c2f000e6c9454bb" url: "https://pub.dev" source: hosted - version: "2.3.3+1" + version: "2.4.1" + sqflite_android: + dependency: transitive + description: + name: sqflite_android + sha256: "78f489aab276260cdd26676d2169446c7ecd3484bbd5fead4ca14f3ed4dd9ee3" + url: "https://pub.dev" + source: hosted + version: "2.4.0" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4" + sha256: "761b9740ecbd4d3e66b8916d784e581861fd3c3553eda85e167bc49fdb68f709" url: "https://pub.dev" source: hosted - version: "2.5.4" + version: "2.5.4+6" + sqflite_darwin: + dependency: transitive + description: + name: sqflite_darwin + sha256: "96a698e2bc82bd770a4d6aab00b42396a7c63d9e33513a56945cbccb594c2474" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + sqflite_platform_interface: + dependency: transitive + description: + name: sqflite_platform_interface + sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920" + url: "https://pub.dev" + source: hosted + version: "2.4.0" stack_trace: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" stream_transform: dependency: transitive description: name: stream_transform - sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" synchronized: dependency: transitive description: name: synchronized - sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" + sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" url: "https://pub.dev" source: hosted - version: "3.1.0+1" + version: "3.3.0+3" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.4" timing: dependency: transitive description: name: timing - sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.0.2" typed_data: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" url_launcher: dependency: "direct main" description: name: url_launcher - sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193" url: "https://pub.dev" source: hosted - version: "6.3.2" + version: "6.3.14" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "7068716403343f6ba4969b4173cbf3b84fc768042124bc2c011e5d782b24fe89" + sha256: "16a513b6c12bb419304e72ea0ae2ab4fed569920d1c7cb850263fe3acc824626" url: "https://pub.dev" source: hosted - version: "6.3.0" + version: "6.3.2" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.2.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "3.2.2" url_launcher_platform_interface: dependency: transitive description: @@ -1176,18 +1277,18 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a" + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.3" vector_math: dependency: transitive description: @@ -1200,50 +1301,66 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "15.0.0" watcher: dependency: transitive description: name: watcher - sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" web: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "2.4.5" + version: "3.0.1" win32: dependency: transitive description: name: win32 - sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" + sha256: "66814138c3562338d05613a6e368ed8cfb237ad6d64a9e9334be3f309acfca03" url: "https://pub.dev" source: hosted - version: "5.5.4" + version: "5.14.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: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" xml: dependency: transitive description: @@ -1261,5 +1378,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + dart: ">=3.8.0 <4.0.0" + flutter: ">=3.29.0" diff --git a/pubspec.yaml b/pubspec.yaml index cff4a64..b379f3b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -33,20 +33,20 @@ dependencies: secure_string_operations: path: ./secure_string_operations dio: ^5.4.3+1 - envied: ^0.5.4+1 - firebase_core: ^2.30.1 - firebase_messaging: ^14.9.1 - fl_chart: ^0.67.0 + envied: ^1.0.0 + firebase_core: ^3.9.0 + firebase_messaging: ^15.1.6 + fl_chart: ^0.70.0 flutter: sdk: flutter - flutter_launcher_icons: ^0.13.1 + flutter_launcher_icons: ^0.14.2 # flutter_local_notifications: ^17.1.1 # flutter_paypal: ^0.2.0 flutter_secure_storage: ^9.0.0 # flutter_stripe: ^10.1.1 get: ^4.6.6 get_storage: ^2.1.1 - google_fonts: ^4.0.4 + google_fonts: ^6.2.1 # google_maps_flutter: ^2.6.1 google_sign_in: ^6.2.1 http: ^1.0.0 @@ -61,14 +61,17 @@ dependencies: url_launcher: ^6.2.6 # webview_flutter: ^4.7.0 googleapis_auth: ^1.6.0 - firebase_crashlytics: ^3.5.7 + firebase_crashlytics: ^4.2.0 flutter_image_compress: ^2.3.0 + jwt_decoder: ^2.0.1 + encrypt: ^5.0.3 + device_info_plus: ^11.5.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^ 3.0.1 - envied_generator: ^0.5.2 + flutter_lints: ^5.0.0 + envied_generator: ^1.0.0 build_runner: ^2.4.6 flutter_launcher_icons: