This commit is contained in:
Hamza-Ayed
2024-12-24 17:35:15 +03:00
parent 1e0e4a5b48
commit 1cbf0183d1
56 changed files with 3081 additions and 2560 deletions

2
.gitignore vendored
View File

@@ -5,9 +5,11 @@
*.swp *.swp
.DS_Store .DS_Store
.atom/ .atom/
.build/
.buildlog/ .buildlog/
.history .history
.svn/ .svn/
.swiftpm/
migrate_working_dir/ migrate_working_dir/
# IntelliJ related # IntelliJ related

View File

@@ -59,22 +59,13 @@ android {
applicationId = "com.mobileapp.store.ride" applicationId = "com.mobileapp.store.ride"
// You can update the following values to match your application needs. // You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
<<<<<<< HEAD
minSdkVersion 23
targetSdkVersion 34
versionCode 65
versionName '1.5.65'
multiDexEnabled =true
// manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml']
=======
minSdk = 23 minSdk = 23
targetSdk = flutter.targetSdkVersion targetSdk = flutter.targetSdkVersion
versionCode = 108 versionCode = 109
versionName = '1.6.108' versionName = '1.6.109'
multiDexEnabled =true multiDexEnabled =true
// manifestPlaceholders can be specified here if needed // manifestPlaceholders can be specified here if needed
>>>>>>> 8813b4d
} }
signingConfigs { signingConfigs {
@@ -89,9 +80,9 @@ android {
buildTypes { buildTypes {
release { release {
signingConfig signingConfigs.release signingConfig signingConfigs.release
// minifyEnabled true minifyEnabled true
// shrinkResources true shrinkResources true
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
} }
} }
@@ -102,11 +93,11 @@ flutter {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2' coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.4'
// Optional dependencies like Firebase can be uncommented if needed // Optional dependencies like Firebase can be uncommented if needed
// implementation platform('com.google.firebase:firebase-bom:32.1.1') // implementation platform('com.google.firebase:firebase-bom:32.1.1')
implementation "com.stripe:stripe-android:20.47.0" implementation "com.stripe:stripe-android:20.52.2"
implementation 'com.stripe:paymentsheet:20.47.0' implementation 'com.stripe:paymentsheet:20.52.2'
// If push provisioning is needed, make sure you have the correct version: // If push provisioning is needed, make sure you have the correct version:

View File

@@ -28,3 +28,5 @@
# Keep rules for Stripe # Keep rules for Stripe
-keep class com.stripe.android.** { *; } -keep class com.stripe.android.** { *; }
-keep class com.stripe.android.pushProvisioning.** { *; } -keep class com.stripe.android.pushProvisioning.** { *; }
-keep class com.yalantis.ucrop.** { *; }
-keep class com.yalantis.ucrop.util.** { *; }

View File

@@ -4,3 +4,5 @@ android.enableJetifier=true
android.defaults.buildfeatures.buildconfig=true android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false android.nonTransitiveRClass=false
android.nonFinalResIds=false android.nonFinalResIds=false
android.enableR8.fullMode=true

View File

@@ -1,58 +1,58 @@
PODS: PODS:
- AppAuth (1.7.5): - AppAuth (1.7.6):
- AppAuth/Core (= 1.7.5) - AppAuth/Core (= 1.7.6)
- AppAuth/ExternalUserAgent (= 1.7.5) - AppAuth/ExternalUserAgent (= 1.7.6)
- AppAuth/Core (1.7.5) - AppAuth/Core (1.7.6)
- AppAuth/ExternalUserAgent (1.7.5): - AppAuth/ExternalUserAgent (1.7.6):
- AppAuth/Core - AppAuth/Core
- audio_session (0.0.1): - audio_session (0.0.1):
- Flutter - Flutter
- device_info_plus (0.0.1): - device_info_plus (0.0.1):
- Flutter - Flutter
- Firebase/Auth (11.0.0): - Firebase/Auth (11.4.0):
- Firebase/CoreOnly - Firebase/CoreOnly
- FirebaseAuth (~> 11.0.0) - FirebaseAuth (~> 11.4.0)
- Firebase/CoreOnly (11.0.0): - Firebase/CoreOnly (11.4.0):
- FirebaseCore (= 11.0.0) - FirebaseCore (= 11.4.0)
- Firebase/Messaging (11.0.0): - Firebase/Messaging (11.4.0):
- Firebase/CoreOnly - Firebase/CoreOnly
- FirebaseMessaging (~> 11.0.0) - FirebaseMessaging (~> 11.4.0)
- firebase_auth (5.2.0): - firebase_auth (5.3.4):
- Firebase/Auth (= 11.0.0) - Firebase/Auth (= 11.4.0)
- firebase_core - firebase_core
- Flutter - Flutter
- firebase_core (3.4.0): - firebase_core (3.9.0):
- Firebase/CoreOnly (= 11.0.0) - Firebase/CoreOnly (= 11.4.0)
- Flutter - Flutter
- firebase_messaging (15.1.0): - firebase_messaging (15.1.6):
- Firebase/Messaging (= 11.0.0) - Firebase/Messaging (= 11.4.0)
- firebase_core - firebase_core
- Flutter - Flutter
- FirebaseAppCheckInterop (11.5.0) - FirebaseAppCheckInterop (11.6.0)
- FirebaseAuth (11.0.0): - FirebaseAuth (11.4.0):
- FirebaseAppCheckInterop (~> 11.0) - FirebaseAppCheckInterop (~> 11.0)
- FirebaseAuthInterop (~> 11.0) - FirebaseAuthInterop (~> 11.0)
- FirebaseCore (~> 11.0) - FirebaseCore (~> 11.4)
- FirebaseCoreExtension (~> 11.0) - FirebaseCoreExtension (~> 11.4)
- GoogleUtilities/AppDelegateSwizzler (~> 8.0) - GoogleUtilities/AppDelegateSwizzler (~> 8.0)
- GoogleUtilities/Environment (~> 8.0) - GoogleUtilities/Environment (~> 8.0)
- GTMSessionFetcher/Core (~> 3.4) - GTMSessionFetcher/Core (< 5.0, >= 3.4)
- RecaptchaInterop (~> 100.0) - RecaptchaInterop (~> 100.0)
- FirebaseAuthInterop (11.5.0) - FirebaseAuthInterop (11.6.0)
- FirebaseCore (11.0.0): - FirebaseCore (11.4.0):
- FirebaseCoreInternal (~> 11.0) - FirebaseCoreInternal (~> 11.0)
- GoogleUtilities/Environment (~> 8.0) - GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Logger (~> 8.0) - GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreExtension (11.4.1): - FirebaseCoreExtension (11.4.1):
- FirebaseCore (~> 11.0) - FirebaseCore (~> 11.0)
- FirebaseCoreInternal (11.5.0): - FirebaseCoreInternal (11.6.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)" - "GoogleUtilities/NSData+zlib (~> 8.0)"
- FirebaseInstallations (11.4.0): - FirebaseInstallations (11.4.0):
- FirebaseCore (~> 11.0) - FirebaseCore (~> 11.0)
- GoogleUtilities/Environment (~> 8.0) - GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0) - GoogleUtilities/UserDefaults (~> 8.0)
- PromisesObjC (~> 2.4) - PromisesObjC (~> 2.4)
- FirebaseMessaging (11.0.0): - FirebaseMessaging (11.4.0):
- FirebaseCore (~> 11.0) - FirebaseCore (~> 11.0)
- FirebaseInstallations (~> 11.0) - FirebaseInstallations (~> 11.0)
- GoogleDataTransport (~> 10.0) - GoogleDataTransport (~> 10.0)
@@ -156,50 +156,49 @@ PODS:
- RecaptchaInterop (100.0.0) - RecaptchaInterop (100.0.0)
- record_darwin (1.0.0): - record_darwin (1.0.0):
- Flutter - Flutter
- FlutterMacOS
- share (0.0.1): - share (0.0.1):
- Flutter - Flutter
- sign_in_with_apple (0.0.1): - sign_in_with_apple (0.0.1):
- Flutter - Flutter
- sqflite (0.0.3): - sqflite_darwin (0.0.4):
- Flutter - Flutter
- FlutterMacOS - FlutterMacOS
- Stripe (23.28.3): - Stripe (23.30.0):
- StripeApplePay (= 23.28.3) - StripeApplePay (= 23.30.0)
- StripeCore (= 23.28.3) - StripeCore (= 23.30.0)
- StripePayments (= 23.28.3) - StripePayments (= 23.30.0)
- StripePaymentsUI (= 23.28.3) - StripePaymentsUI (= 23.30.0)
- StripeUICore (= 23.28.3) - StripeUICore (= 23.30.0)
- stripe_ios (0.0.1): - stripe_ios (0.0.1):
- Flutter - Flutter
- Stripe (~> 23.28.0) - Stripe (~> 23.30.0)
- StripeApplePay (~> 23.28.0) - StripeApplePay (~> 23.30.0)
- StripeFinancialConnections (~> 23.28.0) - StripeFinancialConnections (~> 23.30.0)
- StripePayments (~> 23.28.0) - StripePayments (~> 23.30.0)
- StripePaymentSheet (~> 23.28.0) - StripePaymentSheet (~> 23.30.0)
- StripePaymentsUI (~> 23.28.0) - StripePaymentsUI (~> 23.30.0)
- StripeApplePay (23.28.3): - StripeApplePay (23.30.0):
- StripeCore (= 23.28.3) - StripeCore (= 23.30.0)
- StripeCore (23.28.3) - StripeCore (23.30.0)
- StripeFinancialConnections (23.28.3): - StripeFinancialConnections (23.30.0):
- StripeCore (= 23.28.3) - StripeCore (= 23.30.0)
- StripeUICore (= 23.28.3) - StripeUICore (= 23.30.0)
- StripePayments (23.28.3): - StripePayments (23.30.0):
- StripeCore (= 23.28.3) - StripeCore (= 23.30.0)
- StripePayments/Stripe3DS2 (= 23.28.3) - StripePayments/Stripe3DS2 (= 23.30.0)
- StripePayments/Stripe3DS2 (23.28.3): - StripePayments/Stripe3DS2 (23.30.0):
- StripeCore (= 23.28.3) - StripeCore (= 23.30.0)
- StripePaymentSheet (23.28.3): - StripePaymentSheet (23.30.0):
- StripeApplePay (= 23.28.3) - StripeApplePay (= 23.30.0)
- StripeCore (= 23.28.3) - StripeCore (= 23.30.0)
- StripePayments (= 23.28.3) - StripePayments (= 23.30.0)
- StripePaymentsUI (= 23.28.3) - StripePaymentsUI (= 23.30.0)
- StripePaymentsUI (23.28.3): - StripePaymentsUI (23.30.0):
- StripeCore (= 23.28.3) - StripeCore (= 23.30.0)
- StripePayments (= 23.28.3) - StripePayments (= 23.30.0)
- StripeUICore (= 23.28.3) - StripeUICore (= 23.30.0)
- StripeUICore (23.28.3): - StripeUICore (23.30.0):
- StripeCore (= 23.28.3) - StripeCore (= 23.30.0)
- TOCropViewController (2.7.4) - TOCropViewController (2.7.4)
- uni_links (0.0.1): - uni_links (0.0.1):
- Flutter - Flutter
@@ -241,7 +240,7 @@ DEPENDENCIES:
- record_darwin (from `.symlinks/plugins/record_darwin/ios`) - record_darwin (from `.symlinks/plugins/record_darwin/ios`)
- share (from `.symlinks/plugins/share/ios`) - share (from `.symlinks/plugins/share/ios`)
- sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`) - sign_in_with_apple (from `.symlinks/plugins/sign_in_with_apple/ios`)
- sqflite (from `.symlinks/plugins/sqflite/darwin`) - sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
- stripe_ios (from `.symlinks/plugins/stripe_ios/ios`) - stripe_ios (from `.symlinks/plugins/stripe_ios/ios`)
- uni_links (from `.symlinks/plugins/uni_links/ios`) - uni_links (from `.symlinks/plugins/uni_links/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
@@ -331,8 +330,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/share/ios" :path: ".symlinks/plugins/share/ios"
sign_in_with_apple: sign_in_with_apple:
:path: ".symlinks/plugins/sign_in_with_apple/ios" :path: ".symlinks/plugins/sign_in_with_apple/ios"
sqflite: sqflite_darwin:
:path: ".symlinks/plugins/sqflite/darwin" :path: ".symlinks/plugins/sqflite_darwin/darwin"
stripe_ios: stripe_ios:
:path: ".symlinks/plugins/stripe_ios/ios" :path: ".symlinks/plugins/stripe_ios/ios"
uni_links: uni_links:
@@ -349,27 +348,27 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter_wkwebview/darwin" :path: ".symlinks/plugins/webview_flutter_wkwebview/darwin"
SPEC CHECKSUMS: SPEC CHECKSUMS:
AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73
audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207 audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342
Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9 Firebase: cf1b19f21410b029b6786a54e9764a0cacad3c99
firebase_auth: 16ac5db3d064db837ecd845080d7e18e4be7c66d firebase_auth: c4bdd9d7b338ac004008cb5024a643584e0ec03f
firebase_core: ceec591a66629daaee82d3321551692c4a871493 firebase_core: b62a5080210edad3f2934314a8b2c6f5124e8e10
firebase_messaging: 15d8b557010f3bb7b98d0302e1c7c8fbcd244425 firebase_messaging: 98619a0572d82cfb3668e78859ba9f1110e268c9
FirebaseAppCheckInterop: d265d9f4484e7ec1c591086408840fdd383d1213 FirebaseAppCheckInterop: 347aa09a805219a31249b58fc956888e9fcb314b
FirebaseAuth: d5cf28be74d7e82257f6a3f717509eff70d3cf4a FirebaseAuth: c359af98bd703cbf4293eec107a40de08ede6ce6
FirebaseAuthInterop: 1219bee9b23e6ebe84c256a0d95adab53d11c331 FirebaseAuthInterop: a919d415797d23b7bfe195a04f322b86c65020ef
FirebaseCore: 3cf438f431f18c12cdf2aaf64434648b63f7e383 FirebaseCore: e0510f1523bc0eb21653cac00792e1e2bd6f1771
FirebaseCoreExtension: f1bc67a4702931a7caa097d8e4ac0a1b0d16720e FirebaseCoreExtension: f1bc67a4702931a7caa097d8e4ac0a1b0d16720e
FirebaseCoreInternal: f47dd28ae7782e6a4738aad3106071a8fe0af604 FirebaseCoreInternal: d98ab91e2d80a56d7b246856a8885443b302c0c2
FirebaseInstallations: 6ef4a1c7eb2a61ee1f74727d7f6ce2e72acf1414 FirebaseInstallations: 6ef4a1c7eb2a61ee1f74727d7f6ce2e72acf1414
FirebaseMessaging: d2d1d9c62c46dd2db49a952f7deb5b16ad2c9742 FirebaseMessaging: f8a160d99c2c2e5babbbcc90c4a3e15db036aee2
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_contacts: edb1c5ce76aa433e20e6cb14c615f4c0b66e0983 flutter_contacts: edb1c5ce76aa433e20e6cb14c615f4c0b66e0983
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086 flutter_local_notifications: df98d66e515e1ca797af436137b4459b160ad8c9
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12 flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d
geolocator_apple: 6cbaf322953988e009e5ecb481f07efece75c450 geolocator_apple: 9bcea1918ff7f0062d98345d238ae12718acfbc1
Google-Maps-iOS-Utils: 66d6de12be1ce6d3742a54661e7a79cb317a9321 Google-Maps-iOS-Utils: 66d6de12be1ce6d3742a54661e7a79cb317a9321
google_maps_flutter_ios: e31555a04d1986ab130f2b9f24b6cdc861acc6d3 google_maps_flutter_ios: e31555a04d1986ab130f2b9f24b6cdc861acc6d3
google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38 google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38
@@ -385,32 +384,32 @@ SPEC CHECKSUMS:
local_auth_darwin: 66e40372f1c29f383a314c738c7446e2f7fdadc3 local_auth_darwin: 66e40372f1c29f383a314c738c7446e2f7fdadc3
location: d5cf8598915965547c3f36761ae9cc4f4e87d22e location: d5cf8598915965547c3f36761ae9cc4f4e87d22e
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21 RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
record_darwin: df0a677188e5fed18472550298e675f19ddaffbe record_darwin: 3b1a8e7d5c0cbf45ad6165b4d83a6ca643d929c3
share: 0b2c3e82132f5888bccca3351c504d0003b3b410 share: 0b2c3e82132f5888bccca3351c504d0003b3b410
sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440 sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
Stripe: cdf416cf2efe286f532a6306de0fcaa0ecc8c71a Stripe: 9757efc154de1d9615cbea4836d590bc4034d3a4
stripe_ios: 91946e5c07e0a0dc0e1484ee6659e1f90a302cf3 stripe_ios: 4463f81157e91cbbf441e1b3fdf5edce90787491
StripeApplePay: efb62ffc08e6cd4f161d77ddb45de2451075c54e StripeApplePay: ca33933601302742623762157d587b79b942d073
StripeCore: 9731f05e327c3dcaf7d7abd116840ceaa9482bbe StripeCore: 2af250a2366ff2bbf64d4243c5f9bbf2a98b2aaf
StripeFinancialConnections: 46c0049aaab3a179193502bce4a8096eb7b73f55 StripeFinancialConnections: 3ab1ef6182ec44e71c29e9a2100b663f9713ac20
StripePayments: dd1867a620b0b8b5e294e9ff2f1f7b7770765f47 StripePayments: 658a16bd34d20c8185aa281866227b9e1743300e
StripePaymentSheet: d155dfde74e90784d054deffb4f561a1f6dd638f StripePaymentSheet: eac031f76d7fbb4f52df9b9c39be5be671ca4c07
StripePaymentsUI: c24f990b03a68a7f6fe704b15dd487e7bb6b603e StripePaymentsUI: 7d7cffb2ecfc0d6b5ac3a4488c02893a5ff6cc77
StripeUICore: f2d514e900c37436dc5427fdf2c29d68ab1c2935 StripeUICore: bb102d453b1e1a10a37f810bc0a9aa0675fb17fd
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654 TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241 vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3 video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1 wakelock_plus: 373cfe59b235a6dd5837d0fb88791d2f13a90d56
webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4 webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4
PODFILE CHECKSUM: d9271c147dd54ffd9ca5d77bf00ca21a1c9a5961 PODFILE CHECKSUM: d9271c147dd54ffd9ca5d77bf00ca21a1c9a5961
COCOAPODS: 1.15.2 COCOAPODS: 1.16.2

View File

@@ -1,43 +1,39 @@
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
import '../main.dart';
import 'box_name.dart';
import 'colors.dart'; import 'colors.dart';
class AppStyle { class AppStyle {
static TextStyle headTitle = const TextStyle( static TextStyle headTitle = TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 40, fontSize: 36,
color: AppColor.accentColor, color: AppColor.accentColor,
// fontFamily: box.read(BoxName.lang) == 'ar' fontFamily: box.read(BoxName.lang) == 'ar'
// // ?GoogleFonts.notoNaskhArabic().fontFamily // ?GoogleFonts.markaziText().fontFamily
// ? GoogleFonts.notoNaskhArabic().fontFamily ? GoogleFonts.markaziText().fontFamily
// : GoogleFonts.roboto().fontFamily, : GoogleFonts.inter().fontFamily);
); static TextStyle headTitle2 = TextStyle(
static TextStyle headTitle2 = const TextStyle( fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, fontSize: 24,
fontSize: 22, color: AppColor.writeColor,
color: AppColor.writeColor, fontFamily: box.read(BoxName.lang) == 'ar'
// fontFamily: box.read(BoxName.lang) == 'ar' ? GoogleFonts.markaziText().fontFamily
// ? GoogleFonts.notoNaskhArabic().fontFamily : GoogleFonts.inter().fontFamily);
// : GoogleFonts.roboto().fontFamily
);
static TextStyle title = TextStyle( static TextStyle title = TextStyle(
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: box.read(BoxName.lang) == 'ar' ? 14 : 16, fontSize: 16,
color: AppColor.writeColor, color: AppColor.writeColor,
// fontFamily: box.read(BoxName.lang) == 'ar' fontFamily: box.read(BoxName.lang) == 'ar'
// ? GoogleFonts.notoNaskhArabic().fontFamily ? GoogleFonts.markaziText().fontFamily
// : GoogleFonts.roboto().fontFamily : GoogleFonts.inter().fontFamily);
); static TextStyle subtitle = TextStyle(
static TextStyle subtitle = const TextStyle( fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, fontSize: 12,
fontSize: 13, color: AppColor.writeColor,
color: AppColor.writeColor, fontFamily: box.read(BoxName.lang) == 'ar'
// fontFamily: box.read(BoxName.lang) == 'ar' ? GoogleFonts.markaziText().fontFamily
// ? GoogleFonts.notoNaskhArabic().fontFamily : GoogleFonts.inter().fontFamily);
// : GoogleFonts.roboto().fontFamily
);
static TextStyle number = const TextStyle( static TextStyle number = const TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
@@ -47,9 +43,7 @@ class AppStyle {
static BoxDecoration boxDecoration = const BoxDecoration( static BoxDecoration boxDecoration = const BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color.fromARGB(255, 218, 218, 255), color: AppColor.accentColor, blurRadius: 5, offset: Offset(2, 4)),
blurRadius: 5,
offset: Offset(2, 4)),
BoxShadow( BoxShadow(
color: AppColor.accentColor, blurRadius: 5, offset: Offset(-2, -2)) color: AppColor.accentColor, blurRadius: 5, offset: Offset(-2, -2))
], ],

View File

@@ -6,7 +6,6 @@ import 'package:SEFER/controller/firebase/firbase_messge.dart';
import 'package:SEFER/controller/functions/add_error.dart'; import 'package:SEFER/controller/functions/add_error.dart';
import 'package:SEFER/views/auth/login_page.dart'; import 'package:SEFER/views/auth/login_page.dart';
import 'package:SEFER/views/auth/sms_verfy_page.dart'; import 'package:SEFER/views/auth/sms_verfy_page.dart';
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:SEFER/constant/box_name.dart'; import 'package:SEFER/constant/box_name.dart';

View File

@@ -7,7 +7,6 @@ import 'package:SEFER/controller/auth/login_controller.dart';
import 'package:SEFER/controller/functions/add_error.dart'; import 'package:SEFER/controller/functions/add_error.dart';
import 'package:SEFER/controller/local/phone_intel/phone_number.dart'; import 'package:SEFER/controller/local/phone_intel/phone_number.dart';
import 'package:SEFER/views/home/map_page_passenger.dart'; import 'package:SEFER/views/home/map_page_passenger.dart';
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:SEFER/constant/links.dart'; import 'package:SEFER/constant/links.dart';
@@ -20,6 +19,7 @@ import '../../constant/box_name.dart';
import '../../main.dart'; import '../../main.dart';
import '../../print.dart'; import '../../print.dart';
import '../../views/auth/verify_email_page.dart'; import '../../views/auth/verify_email_page.dart';
import '../../views/widgets/mydialoug.dart';
import '../functions/sms_controller.dart'; import '../functions/sms_controller.dart';
class RegisterController extends GetxController { class RegisterController extends GetxController {

View File

@@ -1,6 +1,5 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@@ -136,8 +135,8 @@ class FirebaseMessagesController extends GetxController {
var myList = jsonDecode(passengerList) as List<dynamic>; var myList = jsonDecode(passengerList) as List<dynamic>;
driverID = myList[0].toString(); driverID = myList[0].toString();
Get.find<MapPassengerController>().driverToken = myList[2].toString(); Get.find<MapPassengerController>().driverToken = myList[2].toString();
Get.find<MapPassengerController>().statusRide == 'Apply'; Get.find<MapPassengerController>().statusRide = 'Apply';
Get.find<MapPassengerController>().isSearchingWindow == false; Get.find<MapPassengerController>().isSearchingWindow = false;
Get.find<MapPassengerController>().update(); Get.find<MapPassengerController>().update();
Get.find<MapPassengerController>().rideAppliedFromDriver(true); Get.find<MapPassengerController>().rideAppliedFromDriver(true);

View File

@@ -27,8 +27,8 @@ class NotificationController extends GetxController {
requestAlertPermission: true, requestAlertPermission: true,
requestBadgePermission: true, requestBadgePermission: true,
requestSoundPermission: true, requestSoundPermission: true,
onDidReceiveLocalNotification: // onDidReceiveLocalNotification:
(int id, String? title, String? body, String? payload) async {}, // (int id, String? title, String? body, String? payload) async {},
); );
InitializationSettings initializationSettings = InitializationSettings initializationSettings =
InitializationSettings(android: android, iOS: ios); InitializationSettings(android: android, iOS: ios);

View File

@@ -1,13 +1,12 @@
import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:SEFER/constant/links.dart'; import 'dart:ui';
import 'package:SEFER/controller/functions/crud.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../../constant/box_name.dart'; import '../../constant/box_name.dart';
import '../../constant/info.dart'; import '../../constant/colors.dart';
import '../../main.dart'; import '../../main.dart';
Future<void> checkForUpdate(BuildContext context) async { Future<void> checkForUpdate(BuildContext context) async {
@@ -42,38 +41,120 @@ checkForBounusInvitation() {
void showUpdateDialog(BuildContext context) { void showUpdateDialog(BuildContext context) {
final String storeUrl = Platform.isAndroid final String storeUrl = Platform.isAndroid
? 'https://play.google.com/store/apps/details?id=com.mobileapp.store.ride' ? 'https://play.google.com/store/apps/details?id=com.sefer_driver'
: 'https://apps.apple.com/ae/app/sefer/id6458734951'; : 'https://apps.apple.com/ae/app/sefer-driver/id6502189302';
showCupertinoDialog(
showGeneralDialog(
context: context, context: context,
barrierDismissible: false, barrierDismissible: false,
builder: (BuildContext context) { barrierColor: Colors.black.withOpacity(0.5),
return CupertinoAlertDialog( pageBuilder: (_, __, ___) {
title: Text('Update Available'.tr), return BackdropFilter(
content: Text( filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
'A new version of the app is available. Please update to the latest version.' child: Center(
.tr, child: AlertDialog(
// Using AlertDialog for a more Material Design look
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(16)), // More rounded corners
elevation: 4, // Add a bit more elevation
contentPadding: EdgeInsets.zero, // Remove default content padding
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding: const EdgeInsets.only(top: 20.0),
child: Image.asset(
'assets/images/logo.png',
height: 72, // Slightly larger logo
width: 72,
),
),
const SizedBox(height: 16),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 24.0),
child: Text(
'Update Available'.tr,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.titleLarge?.copyWith(
// Use theme's title style
fontWeight: FontWeight.bold,
),
),
),
Padding(
padding: const EdgeInsets.all(24.0),
child: Text(
'A new version of the app is available. Please update to the latest version.'
.tr, // More encouraging message
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
// Use theme's body style
color: Colors.black87,
),
),
),
const Divider(height: 0),
Row(
children: [
Expanded(
child: TextButton(
// Using TextButton for "Cancel"
onPressed: () => Navigator.pop(context),
style: TextButton.styleFrom(
foregroundColor: Colors.grey,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(16),
),
),
),
child: Text('Cancel'.tr),
),
),
const SizedBox(
height: 48,
child: VerticalDivider(width: 0), // Using VerticalDivider
),
Expanded(
child: ElevatedButton(
// Using ElevatedButton for "Update"
onPressed: () async {
if (await canLaunchUrl(Uri.parse(storeUrl))) {
await launchUrl(Uri.parse(storeUrl));
}
if (context.mounted) Navigator.pop(context);
},
style: ElevatedButton.styleFrom(
backgroundColor: AppColor
.primaryColor, // Use theme's primary color
foregroundColor: Theme.of(context)
.colorScheme
.onPrimary, // Use theme's onPrimary color
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(16),
),
),
),
child: Text('Update'.tr),
),
),
],
),
],
),
),
), ),
actions: <Widget>[ );
CupertinoDialogAction( },
child: Text('Update'.tr), transitionBuilder: (_, animation, __, child) {
onPressed: () async { return ScaleTransition(
if (await canLaunchUrl(Uri.parse(storeUrl))) { scale: CurvedAnimation(
await launchUrl(Uri.parse(storeUrl)); parent: animation,
} else { curve: Curves.easeOutCubic, // More natural curve
print('Could not launch $storeUrl'); ),
} child: child,
Navigator.of(context).pop();
},
),
CupertinoDialogAction(
child: Text('Cancel'.tr),
onPressed: () async {
Navigator.of(context).pop();
},
),
],
); );
}, },
); );

View File

@@ -5,14 +5,12 @@ import 'dart:math' as math;
import 'dart:ui'; import 'dart:ui';
import 'package:SEFER/constant/univeries_polygon.dart'; import 'package:SEFER/constant/univeries_polygon.dart';
import 'package:SEFER/controller/firebase/local_notification.dart'; import 'package:SEFER/controller/firebase/local_notification.dart';
import 'package:SEFER/views/widgets/mysnakbar.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter_confetti/flutter_confetti.dart'; import 'package:flutter_confetti/flutter_confetti.dart';
import 'package:vector_math/vector_math.dart' show radians, degrees; import 'package:vector_math/vector_math.dart' show radians, degrees;
import 'package:SEFER/controller/functions/tts.dart'; import 'package:SEFER/controller/functions/tts.dart';
import 'package:SEFER/views/home/map_page_passenger.dart'; import 'package:SEFER/views/home/map_page_passenger.dart';
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:SEFER/views/widgets/my_textField.dart'; import 'package:SEFER/views/widgets/my_textField.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
@@ -34,9 +32,12 @@ import '../../main.dart';
import '../../models/model/locations.dart'; import '../../models/model/locations.dart';
import '../../models/model/painter_copoun.dart'; import '../../models/model/painter_copoun.dart';
import '../../print.dart'; import '../../print.dart';
import '../../views/home/map_widget.dart/cancel_raide_page.dart';
import '../../views/home/map_widget.dart/car_details_widget_to_go.dart'; import '../../views/home/map_widget.dart/car_details_widget_to_go.dart';
import '../../views/home/map_widget.dart/select_driver_mishwari.dart'; import '../../views/home/map_widget.dart/select_driver_mishwari.dart';
import '../../views/widgets/elevated_btn.dart'; import '../../views/widgets/elevated_btn.dart';
import '../../views/widgets/error_snakbar.dart';
import '../../views/widgets/mydialoug.dart';
import '../firebase/firbase_messge.dart'; import '../firebase/firbase_messge.dart';
import '../functions/audio_record1.dart'; import '../functions/audio_record1.dart';
import '../functions/crud.dart'; import '../functions/crud.dart';
@@ -565,8 +566,7 @@ class MapPassengerController extends GetxController {
} }
void changeCancelRidePageShow() { void changeCancelRidePageShow() {
// rideConfirm == true showCancelRideBottomSheet();
// ?
isCancelRidePageShown = !isCancelRidePageShown; isCancelRidePageShown = !isCancelRidePageShown;
// : cancelRide(); // : cancelRide();
update(); update();
@@ -1791,16 +1791,17 @@ class MapPassengerController extends GetxController {
return; return;
} }
driversStatusForSearchWindow = 'Your order is being prepared'.tr; driversStatusForSearchWindow = 'Your order is being prepared'.tr;
Log.print('driversStatusForSearchWindow: ${driversStatusForSearchWindow}'); Log.print('driversStatusForSearchWindow: $driversStatusForSearchWindow');
update(); update();
await postRideDetailsToServer(); await postRideDetailsToServer();
driversStatusForSearchWindow = 'Your order sent to drivers'.tr; driversStatusForSearchWindow = 'Your order sent to drivers'.tr;
delayAndFetchRideStatusForAllDriverAvailable(rideId);
await notifyAvailableDrivers(); await notifyAvailableDrivers();
driversStatusForSearchWindow = 'The drivers are reviewing your request'.tr; driversStatusForSearchWindow = 'The drivers are reviewing your request'.tr;
Log.print('driversStatusForSearchWindow: ${driversStatusForSearchWindow}'); Log.print('driversStatusForSearchWindow: $driversStatusForSearchWindow');
update(); update();
delayAndFetchRideStatusForAllDriverAvailable(rideId);
// update(); // update();
} }
@@ -1829,9 +1830,9 @@ class MapPassengerController extends GetxController {
} }
// await postRideDetailsToServer(); // await postRideDetailsToServer();
await notifyAvailableDrivers();
delayAndFetchRideStatusForAllDriverAvailable(rideId); delayAndFetchRideStatusForAllDriverAvailable(rideId);
update(); // update();
await notifyAvailableDrivers();
} }
bool isDriversDataValid() { bool isDriversDataValid() {
@@ -2023,7 +2024,7 @@ class MapPassengerController extends GetxController {
tick = 0; tick = 0;
await addRideToNotificationDriverAvailable(); await addRideToNotificationDriverAvailable();
Timer.periodic(const Duration(seconds: 1), (timer) async { Timer.periodic(const Duration(seconds: 1), (timer) async {
if (attemptCounter >= maxAttempts || isApplied) { if (attemptCounter >= maxAttempts || isApplied == true) {
timer.cancel(); timer.cancel();
_rideStatusStreamController.close(); // Close the stream when done _rideStatusStreamController.close(); // Close the stream when done
return; return;
@@ -2034,9 +2035,9 @@ class MapPassengerController extends GetxController {
try { try {
var res = await getRideStatus(rideId); var res = await getRideStatus(rideId);
Log.print('res:2022 ${res}'); Log.print('res:2022 $res');
String rideStatusDelayed = res.toString(); String rideStatusDelayed = res.toString();
Log.print('rideStatusDelayed: ${rideStatusDelayed}'); Log.print('rideStatusDelayed: $rideStatusDelayed');
_rideStatusStreamController _rideStatusStreamController
.add(rideStatusDelayed); // Emit the ride status .add(rideStatusDelayed); // Emit the ride status
@@ -2051,6 +2052,7 @@ class MapPassengerController extends GetxController {
// //
} else if (rideStatusDelayed == 'Apply' || } else if (rideStatusDelayed == 'Apply' ||
rideStatusDelayed == 'Applied') { rideStatusDelayed == 'Applied') {
isApplied = true;
rideAppliedFromDriver(isApplied); rideAppliedFromDriver(isApplied);
timer.cancel(); timer.cancel();
// Close stream after applying // Close stream after applying
@@ -2525,7 +2527,7 @@ class MapPassengerController extends GetxController {
noCarString = false; noCarString = false;
dataCarsLocationByPassenger = jsonDecode(res); dataCarsLocationByPassenger = jsonDecode(res);
Log.print( Log.print(
'dataCarsLocationByPassenger:getCarsLocationByPassengerAndReloadMarker ${dataCarsLocationByPassenger}'); 'dataCarsLocationByPassenger:getCarsLocationByPassengerAndReloadMarker $dataCarsLocationByPassenger');
// Check if 'message' is present and not null // Check if 'message' is present and not null
if (dataCarsLocationByPassenger != null && if (dataCarsLocationByPassenger != null &&
@@ -3084,7 +3086,7 @@ class MapPassengerController extends GetxController {
changeCancelRidePageShow(); changeCancelRidePageShow();
if (rideId != 'yet') { if (rideId != 'yet') {
Log.print('cancelRide: 1'); Log.print('cancelRide: 1');
FirebaseMessagesController().sendNotificationToDriverMAP( await FirebaseMessagesController().sendNotificationToDriverMAP(
'Cancel Trip'.tr, 'Cancel Trip'.tr,
'Trip Cancelled'.tr, 'Trip Cancelled'.tr,
driverToken.toString(), driverToken.toString(),
@@ -3698,6 +3700,11 @@ class MapPassengerController extends GetxController {
controller.animateCamera( controller.animateCamera(
CameraUpdate.newLatLng(passengerLocation), CameraUpdate.newLatLng(passengerLocation),
); );
// Future.delayed(const Duration(milliseconds: 500), () {
// markers.forEach((marker) {
// controller.showMarkerInfoWindow(marker.markerId);
// });
// });
update(); update();
} }
@@ -4011,7 +4018,7 @@ class MapPassengerController extends GetxController {
late String startNameAddress = ''; late String startNameAddress = '';
late String endNameAddress = ''; late String endNameAddress = '';
getMap(String origin, destination) async { getDirectionMap(String origin, destination) async {
isLoading = true; isLoading = true;
update(); update();
remainingTime = 25; //to make cancel every call remainingTime = 25; //to make cancel every call
@@ -4043,22 +4050,7 @@ class MapPassengerController extends GetxController {
isLoading = false; isLoading = false;
newStartPointLocation = LatLng( newStartPointLocation = LatLng(
data[0]["start_location"]['lat'], data[0]["start_location"]['lng']); data[0]["start_location"]['lat'], data[0]["start_location"]['lng']);
markers.add(
Marker(
markerId: const MarkerId('start'),
position: newStartPointLocation,
icon: startIcon,
),
);
markers.add(
Marker(
markerId: const MarkerId('end'),
position: LatLng(
data[0]["end_location"]['lat'], data[0]["end_location"]['lng']),
icon: endIcon,
),
);
update();
durationToRide = data[0]['duration']['value']; durationToRide = data[0]['duration']['value'];
final points = final points =
decodePolyline(response["routes"][0]["overview_polyline"]["points"]); decodePolyline(response["routes"][0]["overview_polyline"]["points"]);
@@ -4081,31 +4073,176 @@ class MapPassengerController extends GetxController {
LatLngBounds(northeast: northeast, southwest: southwest); LatLngBounds(northeast: northeast, southwest: southwest);
// Fit the camera to the bounds // Fit the camera to the bounds
var cameraUpdate = CameraUpdate.newLatLngBounds(boundsData, 160); var cameraUpdate = CameraUpdate.newLatLngBounds(boundsData, 100);
mapController!.animateCamera(cameraUpdate); mapController!.animateCamera(cameraUpdate);
// getDistanceFromText(data[0]['distance']['text']); // getDistanceFromText(data[0]['distance']['text']);
double distanceOfTrip = (data[0]['distance']['value']) / 1000; double distanceOfTrip = (data[0]['distance']['value']) / 1000;
distance = distanceOfTrip; distance = distanceOfTrip;
durationToAdd = Duration(seconds: durationToRide);
hours = durationToAdd.inHours;
minutes = (durationToAdd.inMinutes % 60).round();
// updateCameraForDistanceAfterGetMap(); // updateCameraForDistanceAfterGetMap();
markers.clear();
update();
markers.add(
Marker(
markerId: const MarkerId('start'),
position: newStartPointLocation,
icon: startIcon,
infoWindow: InfoWindow(
title: startNameAddress,
snippet: '',
),
),
);
// Add end marker
markers.add(
Marker(
markerId: const MarkerId('end'),
position: LatLng(
data[0]["end_location"]['lat'], data[0]["end_location"]['lng']),
icon: endIcon,
infoWindow: InfoWindow(
title: endNameAddress,
snippet:
'$distance ${'KM'.tr}${hours > 0 ? '${'Your Ride Duration is '.tr}$hours ${'H and'.tr} $minutes ${'m'.tr}' : '${'Your Ride Duration is '.tr} $minutes ${'m'.tr}'}'),
),
);
// // Show info windows automatically
// Future.delayed(const Duration(milliseconds: 500), () {
// mapController?.showMarkerInfoWindow(const MarkerId('start'));
// });
Future.delayed(const Duration(milliseconds: 500), () {
mapController?.showMarkerInfoWindow(const MarkerId('end'));
});
update();
if (polyLines.isNotEmpty) { if (polyLines.isNotEmpty) {
clearPolyline(); clearPolyline();
} else { } else {
var polyline = Polyline( _animatePolyline(polylineCoordinates);
polylineId: PolylineId(response["routes"][0]["summary"]),
points: polylineCoordinates,
width: 10,
color: Colors.blue,
);
polyLines.add(polyline);
rideConfirm = false; rideConfirm = false;
isMarkersShown = true; isMarkersShown = true;
update(); update();
} }
} }
Future<void> _animatePolyline(List<LatLng> coordinates) async {
// Initial animation
polyLines.clear();
List<LatLng> animatedPoints = [];
// Draw initial polyline
for (int i = 0; i < coordinates.length; i++) {
animatedPoints.add(coordinates[i]);
polyLines.clear();
polyLines.add(
Polyline(
polylineId: const PolylineId('animated_route'),
points: List<LatLng>.from(animatedPoints),
width: 4,
color: AppColor.primaryColor,
endCap: Cap.roundCap,
startCap: Cap.roundCap,
geodesic: true,
),
);
update();
await Future.delayed(const Duration(milliseconds: 1));
}
// Color change animations
for (int cycle = 0; cycle < 6; cycle++) {
// Change to green
polyLines.clear();
polyLines.add(
Polyline(
polylineId: const PolylineId('animated_route'),
points: coordinates,
width: 4,
color: AppColor.bronze,
endCap: Cap.roundCap,
startCap: Cap.roundCap,
geodesic: true,
),
);
update();
await Future.delayed(const Duration(milliseconds: 500));
// Change back to primary color
polyLines.clear();
polyLines.add(
Polyline(
polylineId: const PolylineId('animated_route'),
points: coordinates,
width: 4,
color: AppColor.writeColor,
endCap: Cap.roundCap,
startCap: Cap.roundCap,
geodesic: true,
),
);
update();
await Future.delayed(const Duration(milliseconds: 500));
}
}
// Add this method to your controller class
// Future<void> _animatePolyline(List<LatLng> coordinates) async {
// // Clear existing polylines
// polyLines.clear();
// // Create segments for animation
// List<LatLng> animatedPoints = [];
// // Calculate step size for smoother animation
// int stepSize = (coordinates.length / 20).round();
// stepSize = stepSize < 1 ? 1 : stepSize;
// for (int i = 0; i < coordinates.length; i += stepSize) {
// // Add points gradually
// animatedPoints.add(coordinates[i]);
// if (animatedPoints.length > 1) {
// // Remove previous polyline
// if (polyLines.isNotEmpty) {
// polyLines.clear();
// }
// // Add new polyline segment
// polyLines.add(
// Polyline(
// polylineId: const PolylineId('animated_route'),
// points: List<LatLng>.from(animatedPoints),
// width: 4,
// color: Colors.blue,
// ),
// );
// // Update camera position to follow animation
// if (mapController != null) {
// final bounds = LatLngBounds(
// southwest: animatedPoints.reduce((value, element) => LatLng(
// min(value.latitude, element.latitude),
// min(value.longitude, element.longitude))),
// northeast: animatedPoints.reduce((value, element) => LatLng(
// max(value.latitude, element.latitude),
// max(value.longitude, element.longitude))),
// );
// mapController!.animateCamera(
// CameraUpdate.newLatLngBounds(bounds, 100),
// );
// }
// }
// update();
// await Future.delayed(const Duration(milliseconds: 50));
// }
// }
String shortenAddress(String fullAddress) { String shortenAddress(String fullAddress) {
// Split the address into parts // Split the address into parts
List<String> parts = fullAddress.split('،'); List<String> parts = fullAddress.split('،');
@@ -4871,7 +5008,7 @@ class MapPassengerController extends GetxController {
try { try {
var d = jsonDecode(res); var d = jsonDecode(res);
driversForMishwari = d['message']; driversForMishwari = d['message'];
Log.print('driversForMishwari: ${driversForMishwari}'); Log.print('driversForMishwari: $driversForMishwari');
update(); update();
} catch (e) { } catch (e) {
// Handle invalid JSON format // Handle invalid JSON format

View File

@@ -1,7 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
@@ -17,6 +16,7 @@ import 'package:mime/mime.dart';
import '../../../constant/api_key.dart'; import '../../../constant/api_key.dart';
import '../../../print.dart'; import '../../../print.dart';
import '../../../views/widgets/mydialoug.dart';
class ComplaintController extends GetxController { class ComplaintController extends GetxController {
bool isLoading = false; bool isLoading = false;

View File

@@ -5,16 +5,15 @@ import 'package:SEFER/constant/colors.dart';
import 'package:SEFER/constant/links.dart'; import 'package:SEFER/constant/links.dart';
import 'package:SEFER/controller/functions/crud.dart'; import 'package:SEFER/controller/functions/crud.dart';
import 'package:SEFER/controller/payment/payment_controller.dart'; import 'package:SEFER/controller/payment/payment_controller.dart';
import 'package:SEFER/views/widgets/mysnakbar.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_contacts/contact.dart';
import 'package:flutter_contacts/flutter_contacts.dart'; import 'package:flutter_contacts/flutter_contacts.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:share/share.dart'; import 'package:share/share.dart';
import '../../../main.dart'; import '../../../main.dart';
import '../../../print.dart'; import '../../../print.dart';
import '../../../views/widgets/my_dialog.dart'; import '../../../views/widgets/error_snakbar.dart';
import '../../../views/widgets/mydialoug.dart';
import '../../functions/launch.dart'; import '../../functions/launch.dart';
import '../../notification/notification_captain_controller.dart'; import '../../notification/notification_captain_controller.dart';

View File

@@ -13,112 +13,84 @@ import '../../onbording_page.dart';
import '../auth/login_controller.dart'; import '../auth/login_controller.dart';
class SplashScreenController extends GetxController class SplashScreenController extends GetxController
with SingleGetTickerProviderMixin { with GetTickerProviderStateMixin {
late AnimationController animationController; late AnimationController _animationController;
late Animation<double> zoomInAnimation; late Animation<double> animation;
late Animation<double> zoomOutAnimation; final progress = 0.0.obs;
Timer? _progressTimer;
String packageInfo = ''; String packageInfo = '';
late String version = '1.5.48';
Future<void> checkForUpdate() async { Future<void> _getPackageInfo() async {
final packageInfo = await PackageInfo.fromPlatform(); final info = await PackageInfo.fromPlatform();
final currentVersion = packageInfo.buildNumber; packageInfo = info.version;
final version1 = packageInfo.version; box.write(BoxName.packagInfo, packageInfo);
print('currentVersion is : $currentVersion');
// Fetch the latest version from your server
version = version1.toString();
print('version: ${version}');
update(); update();
} }
StreamSubscription? _sub; @override
// Future<void> initUniLinks() async { void onInit() {
// // Handle initial URI if the app was launched from a link super.onInit();
// try { _getPackageInfo();
// final initialUri = await getInitialUri(); _animationController = AnimationController(
// if (initialUri != null) { vsync: this,
// handleLink(initialUri); duration: const Duration(milliseconds: 1500), // Reduced duration
// } )..forward();
// } on PlatformException {
// // Handle exception by warning the user their action did not succeed
// print("Failed to get initial uri");
// }
// // Listen to new links while the app is running animation =
// _sub = uriLinkStream.listen((Uri? uri) { CurvedAnimation(parent: _animationController, curve: Curves.easeOut);
// if (uri != null) {
// handleLink(uri);
// }
// }, onError: (Object err) {
// print('Error occurred: $err');
// });
// }
void handleLink(Uri uri) { startTimer();
if (uri.host == 'sefer.live' && uri.path == '/tripmonitor') { _startProgressTimer();
final rideId = uri.queryParameters['rideId'];
final driverId = uri.queryParameters['driverId'];
if (rideId != null && driverId != null) {
Get.toNamed('/tripmonitor', parameters: {
'rideId': rideId,
'driverId': driverId,
});
} else {
// Handle the case where rideId or driverId is null
print('Invalid parameters in the deep link');
// You might want to show an error message to the user or handle this case differently
}
}
} }
@override void _startProgressTimer() {
void onInit() async { const totalTime = 3000; // 5 seconds in milliseconds
super.onInit(); const interval = 50; // Update every 50ms
checkForUpdate(); int elapsed = 0;
// initUniLinks();
animationController = AnimationController(
vsync: this,
duration: const Duration(seconds: 4),
);
zoomInAnimation = Tween<double>(begin: 1.0, end: 1.5).animate( _progressTimer =
CurvedAnimation( Timer.periodic(const Duration(milliseconds: interval), (timer) async {
parent: animationController, elapsed += interval;
curve: Curves.easeInOut, progress.value = (elapsed / totalTime).clamp(0.0, 1.0);
),
);
zoomOutAnimation = Tween<double>(begin: 1.5, end: 1.0).animate( if (elapsed >= totalTime) {
CurvedAnimation( timer.cancel();
parent: animationController, box.read(BoxName.onBoarding) == null
curve: Curves.easeInOut, ? Get.off(() => OnBoardingPage())
), : box.read(BoxName.email) != null &&
); box.read(BoxName.phone) != null &&
box.read(BoxName.isVerified) == '1'
animationController.repeat(reverse: true); // ? Get.off(() => const MapPagePassenger())
startTimer(); ? await Get.put(LoginController()).loginUsingCredentials(
box.read(BoxName.passengerID).toString(),
box.read(BoxName.email).toString(),
)
: Get.off(() => LoginPage());
}
});
} }
void startTimer() async { void startTimer() async {
Timer(const Duration(seconds: 5), () async { Timer(const Duration(seconds: 5), () async {
box.read(BoxName.onBoarding) == null // box.read(BoxName.onBoarding) == null
? Get.off(() => OnBoardingPage()) // ? Get.off(() => OnBoardingPage())
: box.read(BoxName.email) != null && // : box.read(BoxName.email) != null &&
box.read(BoxName.phone) != null && // box.read(BoxName.phone) != null &&
box.read(BoxName.isVerified) == '1' // box.read(BoxName.isVerified) == '1'
// ? Get.off(() => const MapPagePassenger()) // // ? Get.off(() => const MapPagePassenger())
? await Get.put(LoginController()).loginUsingCredentials( // ? await Get.put(LoginController()).loginUsingCredentials(
box.read(BoxName.passengerID).toString(), // box.read(BoxName.passengerID).toString(),
box.read(BoxName.email).toString(), // box.read(BoxName.email).toString(),
) // )
: Get.off(() => LoginPage()); // : Get.off(() => LoginPage());
}); });
} }
@override @override
void onClose() { void onClose() {
animationController.dispose(); _progressTimer?.cancel();
_animationController.dispose();
super.onClose(); super.onClose();
} }
} }

View File

@@ -10,7 +10,6 @@ import 'package:SEFER/main.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart'; import 'package:SEFER/views/widgets/elevated_btn.dart';
import 'package:SEFER/views/widgets/my_scafold.dart'; import 'package:SEFER/views/widgets/my_scafold.dart';
import 'package:SEFER/views/widgets/mycircular.dart'; import 'package:SEFER/views/widgets/mycircular.dart';
import 'package:SEFER/views/widgets/mysnakbar.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_font_icons/flutter_font_icons.dart'; import 'package:flutter_font_icons/flutter_font_icons.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';

View File

@@ -8,73 +8,82 @@ import '../themes/themes.dart';
class LocaleController extends GetxController { class LocaleController extends GetxController {
Locale? language; Locale? language;
String countryCode = ''; String countryCode = '';
void restartApp() {
runApp(const MyApp());
}
ThemeData appTheme = themeEnglish; ThemeData appTheme = lightThemeEnglish;
changeLang(String langcode) { void changeLang(String langcode) {
Locale locale; Locale locale;
switch (langcode) { switch (langcode) {
case "ar": case "ar":
locale = const Locale("ar"); locale = const Locale("ar");
appTheme = themeArabic; appTheme = lightThemeArabic;
box.write(BoxName.lang, 'ar');
break; break;
case "en": case "en":
locale = const Locale("en"); locale = const Locale("en");
appTheme = themeEnglish; appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'en');
break; break;
case "tr": case "tr":
locale = const Locale("tr"); locale = const Locale("tr");
appTheme = themeEnglish; appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'tr');
break; break;
case "fr": case "fr":
locale = const Locale("fr"); locale = const Locale("fr");
appTheme = themeEnglish; appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'fr');
break; break;
case "it": case "it":
locale = const Locale("it"); locale = const Locale("it");
appTheme = themeEnglish; appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'it');
break; break;
case "de": case "de":
locale = const Locale("de"); locale = const Locale("de");
appTheme = themeEnglish; appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'de');
break; break;
case "el": case "el":
locale = const Locale("el"); locale = const Locale("el");
appTheme = themeEnglish; appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'el');
break; break;
case "es": case "es":
locale = const Locale("es"); locale = const Locale("es");
appTheme = themeEnglish; appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'es');
break; break;
case "fa": case "fa":
locale = const Locale("fa"); locale = const Locale("fa");
appTheme = themeArabic; appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'fa');
break; break;
case "zh": case "zh":
locale = const Locale("zh"); locale = const Locale("zh");
appTheme = themeEnglish; appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'zh');
break; break;
case "ru": case "ru":
locale = const Locale("ru"); locale = const Locale("ru");
appTheme = themeEnglish; appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'ru');
break; break;
case "hi": case "hi":
locale = const Locale("hi"); locale = const Locale("hi");
appTheme = themeEnglish; appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'hi');
break; break;
default: default:
locale = Locale(Get.deviceLocale!.languageCode); locale = Locale(Get.deviceLocale!.languageCode);
appTheme = themeEnglish; box.write(BoxName.lang, Get.deviceLocale!.languageCode);
appTheme = lightThemeEnglish;
break; break;
} }
box.write(BoxName.lang, langcode); box.write(BoxName.lang, langcode);
Get.changeTheme(appTheme); Get.changeTheme(appTheme);
Get.updateLocale(locale); Get.updateLocale(locale);
restartApp();
update(); update();
} }
@@ -88,7 +97,94 @@ class LocaleController extends GetxController {
} }
changeLang(storedLang); changeLang(storedLang);
super.onInit(); super.onInit();
} }
} }
// class LocaleController extends GetxController {
// Locale? language;
// String countryCode = '';
// void restartApp() {
// runApp(const MyApp());
// }
// ThemeData appTheme = themeEnglish;
// changeLang(String langcode) {
// Locale locale;
// switch (langcode) {
// case "ar":
// locale = const Locale("ar");
// appTheme = themeArabic;
// break;
// case "en":
// locale = const Locale("en");
// appTheme = themeEnglish;
// break;
// case "tr":
// locale = const Locale("tr");
// appTheme = themeEnglish;
// break;
// case "fr":
// locale = const Locale("fr");
// appTheme = themeEnglish;
// break;
// case "it":
// locale = const Locale("it");
// appTheme = themeEnglish;
// break;
// case "de":
// locale = const Locale("de");
// appTheme = themeEnglish;
// break;
// case "el":
// locale = const Locale("el");
// appTheme = themeEnglish;
// break;
// case "es":
// locale = const Locale("es");
// appTheme = themeEnglish;
// break;
// case "fa":
// locale = const Locale("fa");
// appTheme = themeArabic;
// break;
// case "zh":
// locale = const Locale("zh");
// appTheme = themeEnglish;
// break;
// case "ru":
// locale = const Locale("ru");
// appTheme = themeEnglish;
// break;
// case "hi":
// locale = const Locale("hi");
// appTheme = themeEnglish;
// break;
// default:
// locale = Locale(Get.deviceLocale!.languageCode);
// appTheme = themeEnglish;
// break;
// }
// box.write(BoxName.lang, langcode);
// Get.changeTheme(appTheme);
// Get.updateLocale(locale);
// restartApp();
// update();
// }
// @override
// void onInit() {
// String? storedLang = box.read(BoxName.lang);
// if (storedLang == null) {
// // Use device language if no language is stored
// storedLang = Get.deviceLocale!.languageCode;
// box.write(BoxName.lang, storedLang);
// }
// changeLang(storedLang);
// super.onInit();
// }
// }

View File

@@ -4,11 +4,15 @@ class MyTranslation extends Translations {
@override @override
Map<String, Map<String, String>> get keys => { Map<String, Map<String, String>> get keys => {
"ar": { "ar": {
"You should restart app to change language":
"يجب إعادة تشغيل التطبيق لتغيير اللغة",
"Home Page": "الصفحة الرئيسية", "Home Page": "الصفحة الرئيسية",
"To change Language the App": "لتغيير لغة التطبيق", "To change Language the App": "لتغيير لغة التطبيق",
"Learn more about our app and mission": "Learn more about our app and mission":
"تعرف على المزيد حول تطبيقنا ورسالتنا", "تعرف على المزيد حول تطبيقنا ورسالتنا",
"Promos For Today": "عروض اليوم", "Promos For Today": "عروض اليوم",
'Choose your ride': "اختر رحلتك",
"Your Journey Begins Here": "رحلتك تبدأ هنا",
'Bonus gift': 'بونص', "Pay": "ادفع", 'Bonus gift': 'بونص', "Pay": "ادفع",
"Get": "احصل على", "Get": "احصل على",
"Send to Driver Again": "إرسال إلى السائق مرة أخرى", "Send to Driver Again": "إرسال إلى السائق مرة أخرى",
@@ -436,17 +440,74 @@ iOS [https://getapp.cc/app/6458734951]
"To : ": "إِلَى: ", "To : ": "إِلَى: ",
"Add Promo": "إضَافَة بَرُومُو", "Add Promo": "إضَافَة بَرُومُو",
"Confirm Selection": "تَأْكِيد الاخْتِيَار", "Confirm Selection": "تَأْكِيد الاخْتِيَار",
"distance is": "المَسَافَة", "distance is": "المَسَافَة", "About Us": "عنّا",
"duration is": "المُدَّة", "SEFER LLC": "شركة SEFER",
"I don't need a ride anymore": "Egypt's pioneering ride-sharing service, proudly developed by Arabian and local owners. We prioritize being near you both our valued passengers and our dedicated captains.":
"لَسْتُ بِحَاجَة إِلَى رِحْلَة بَعْد الآن", "أول خدمة مشاركة ركوب في مصر، تم تطويرها بفخر من قبل مالكين عرب ومحليين. نحن نركز على أن نكون قريبين منك - سواء كنت راكبًا قيمًا أو قائدًا مخلصًا.",
"I was just trying the application": "Why Choose SEFER?": "لماذا تختار SEFER؟",
"كُنْتُ فَقَط أُجَرِّب التَّطْبِيق", "Closest to You": "الأقرب إليك",
"No driver accepted my request": "لَمْ يَقْبَل أَيُّ سَائِق طَلَبِي", "We connect you with the nearest drivers for faster pickups and quicker journeys.":
"نربطك بأقرب السائقين لضمان وصول سريع ورحلات أسرع.",
"Uncompromising Security": "أعلى مستويات الأمان",
"Lady Captains Available": "قائدات سيارات متاحات",
"Recorded Trips (Voice & AI Analysis)":
"الرحلات المسجلة (تحليل صوتي بالذكاء الاصطناعي)",
"Fastest Complaint Response": "أسرع استجابة للشكاوى",
"Our dedicated customer service team ensures swift resolution of any issues.":
"فريق خدمة العملاء لدينا يضمن حل أي مشكلة بسرعة.",
"Affordable for Everyone": "في متناول الجميع",
"Frequently Asked Questions": "الأسئلة الشائعة",
"Getting Started": "البدء",
"How do I request a ride?": "كيف يمكنني طلب رحلة؟",
"Simply open the Sefer app, enter your destination, and tap \"Request Ride\". The app will connect you with a nearby driver.":
"افتح تطبيق Sefer، وأدخل وجهتك، واضغط على \"طلب رحلة\". سيقوم التطبيق بتوصيلك بأقرب سائق.",
"Vehicle Options": "خيارات المركبات",
"What types of vehicles are available?":
"ما هي أنواع المركبات المتاحة؟",
"Sefer offers a variety of options including Economy, Comfort, and Luxury to suit your needs and budget.":
"يوفر Sefer مجموعة متنوعة من الخيارات بما في ذلك الاقتصادية، المريحة، والفاخرة لتلبية احتياجاتك وميزانيتك.",
"Payments": "المدفوعات",
"How can I pay for my ride?": "كيف يمكنني دفع تكلفة رحلتي؟",
"You can pay for your ride using cash or credit/debit card. You can select your preferred payment method before confirming your ride.":
"يمكنك دفع تكلفة رحلتك نقدًا أو باستخدام بطاقة ائتمان/خصم. يمكنك اختيار طريقة الدفع المفضلة قبل تأكيد الرحلة.",
"Ride Management": "إدارة الرحلات",
"Can I cancel my ride?": "هل يمكنني إلغاء رحلتي؟",
"Yes, you can cancel your ride, but please note that cancellation fees may apply depending on how far in advance you cancel.":
"نعم، يمكنك إلغاء رحلتك، ولكن يرجى ملاحظة أن رسوم الإلغاء قد تنطبق اعتمادًا على توقيت الإلغاء.",
"For Drivers": "للسائقين",
"Driver Registration & Requirements": "التسجيل ومتطلبات السائقين",
"Driver Registration": "تسجيل السائق",
"To register as a driver or learn about the requirements, please visit our website or contact Sefer support directly.":
"لتسجيل نفسك كسائق أو لمعرفة المتطلبات، يرجى زيارة موقعنا الإلكتروني أو الاتصال بدعم Sefer مباشرة.",
"Visit Website/Contact Support": "زيارة الموقع/الاتصال بالدعم",
"Close": "إغلاق",
"Communication": "التواصل",
"How do I communicate with the other party (passenger/driver)?":
"كيف يمكنني التواصل مع الطرف الآخر (الراكب/السائق)؟",
"You can communicate with your driver or passenger through the in-app chat feature once a ride is confirmed.":
"يمكنك التواصل مع السائق أو الراكب من خلال ميزة الدردشة داخل التطبيق بمجرد تأكيد الرحلة.",
"Safety & Security": "الأمان والحماية",
"What safety measures does Sefer offer?":
"ما هي تدابير الأمان التي يوفرها Sefer؟",
"Sefer offers various safety features including driver verification, in-app trip tracking, emergency contact options, and the ability to share your trip status with trusted contacts.":
"يوفر Sefer ميزات أمان مختلفة بما في ذلك التحقق من السائق، تتبع الرحلة داخل التطبيق، خيارات الاتصال في حالات الطوارئ، والقدرة على مشاركة حالة رحلتك مع جهات اتصال موثوقة.",
"Enjoy competitive prices across all trip options, making travel accessible.":
"استمتع بأسعار تنافسية لجميع خيارات الرحلات، مما يجعل السفر متاحًا.",
"Variety of Trip Choices": "خيارات رحلات متنوعة",
"Choose the trip option that perfectly suits your needs and preferences.":
"اختر خيار الرحلة الذي يناسب احتياجاتك وتفضيلاتك.",
"Your Choice, Our Priority": "اختيارك هو أولويتنا",
"Because we are near, you have the flexibility to choose the ride that works best for you.":
"لأننا قريبون، لديك المرونة لاختيار الرحلة التي تناسبك.",
"duration is": "المُدَّة", "Setting": "الإعدادات",
"Find answers to common questions": "اعثر على إجابات للأسئلة الشائعة",
"I don't need a ride anymore": "لا أحتاج إلى رحلة بعد الآن",
"I was just trying the application": "كنت أجرب التطبيق فقط",
"No driver accepted my request": "لم يقبل أي سائق طلبي",
"I added the wrong pick-up/drop-off location": "I added the wrong pick-up/drop-off location":
"أَضَفْتُ مَوْقِع الالْتِقَاط/التَّسْلِيم الخَاطِئ", "أضفت موقع استلام/توصيل خاطئ",
"I don't have a reason": "لَيْسَ لَدَيَّ سَبَب", "I don't have a reason": "ليس لدي سبب",
"Other": "آخَر", "Other": "أخرى",
"Can we know why you want to cancel Ride ?": "Can we know why you want to cancel Ride ?":
"هَل يُمْكِنُنَا مَعْرِفَة سَبَب رَغْبَتِكَ فِي إلْغَاء الرِّحْلَة؟", "هَل يُمْكِنُنَا مَعْرِفَة سَبَب رَغْبَتِكَ فِي إلْغَاء الرِّحْلَة؟",
"Cancel Ride": "إلْغَاء الرِّحْلَة", "Cancel Ride": "إلْغَاء الرِّحْلَة",

View File

@@ -1,12 +1,12 @@
import 'dart:convert'; import 'dart:convert';
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:SEFER/controller/firebase/firbase_messge.dart'; import 'package:SEFER/controller/firebase/firbase_messge.dart';
import '../../constant/box_name.dart'; import '../../constant/box_name.dart';
import '../../constant/links.dart'; import '../../constant/links.dart';
import '../../main.dart'; import '../../main.dart';
import '../../views/widgets/mydialoug.dart';
import '../functions/crud.dart'; import '../functions/crud.dart';
class PassengerNotificationController extends GetxController { class PassengerNotificationController extends GetxController {

View File

@@ -1,31 +1,42 @@
import 'dart:convert'; import 'dart:convert';
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:SEFER/constant/box_name.dart'; import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/constant/links.dart'; import 'package:SEFER/constant/links.dart';
import 'package:SEFER/controller/functions/crud.dart'; import 'package:SEFER/controller/functions/crud.dart';
import 'package:SEFER/main.dart'; import 'package:SEFER/main.dart';
import '../../views/widgets/mydialoug.dart';
class PassengerWalletHistoryController extends GetxController { class PassengerWalletHistoryController extends GetxController {
bool isLoading = false; bool isLoading = false;
List archive = []; List archive = [];
getArchivePayment() async { Future<void> getArchivePayment() async {
isLoading = true; try {
update(); isLoading = true;
var res = await CRUD().get(
link: AppLink.getPassengerWalletArchive,
payload: {'passenger_id': box.read(BoxName.passengerID)});
if (res != 'failure') {
archive = jsonDecode(res)['message'];
isLoading = false;
update(); update();
} else {
MyDialog().getDialog('No wallet record found'.tr, '', () { var res = await CRUD().get(
Get.back(); link: AppLink.getPassengerWalletArchive,
payload: {'passenger_id': box.read(BoxName.passengerID)},
);
if (res != 'failure') {
archive = jsonDecode(res)['message'];
} else {
MyDialog().getDialog('No wallet record found'.tr, '', () {
Get.back();
Get.back();
});
}
} catch (e) {
MyDialog().getDialog('An error occurred'.tr, e.toString(), () {
Get.back(); Get.back();
}); });
} finally {
isLoading = false;
update();
} }
} }

View File

@@ -3,19 +3,21 @@ import 'package:SEFER/constant/style.dart';
import '../../constant/colors.dart'; import '../../constant/colors.dart';
ThemeData themeEnglish = ThemeData( ThemeData lightThemeEnglish = ThemeData(
fontFamily: "PlayfairDisplay", brightness: Brightness.light,
fontFamily: "SFPro",
textTheme: TextTheme( textTheme: TextTheme(
displaySmall: AppStyle.title, displaySmall: AppStyle.title,
displayLarge: AppStyle.title, displayLarge: AppStyle.headTitle,
displayMedium: AppStyle.title, displayMedium: AppStyle.headTitle2,
bodyLarge: AppStyle.title, bodyLarge: AppStyle.title,
bodyMedium: AppStyle.title), bodyMedium: AppStyle.subtitle,
),
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
dialogTheme: DialogTheme( dialogTheme: DialogTheme(
backgroundColor: AppColor.secondaryColor, backgroundColor: AppColor.secondaryColor,
contentTextStyle: AppStyle.title, contentTextStyle: AppStyle.title,
titleTextStyle: AppStyle.title, titleTextStyle: AppStyle.headTitle2,
), ),
appBarTheme: AppBarTheme( appBarTheme: AppBarTheme(
elevation: 0, elevation: 0,
@@ -25,35 +27,122 @@ ThemeData themeEnglish = ThemeData(
color: AppColor.primaryColor, color: AppColor.primaryColor,
), ),
toolbarTextStyle: TextTheme( toolbarTextStyle: TextTheme(
titleSmall: AppStyle.subtitle, titleSmall: AppStyle.subtitle,
headlineSmall: AppStyle.title, headlineSmall: AppStyle.title,
titleLarge: AppStyle.headTitle2) titleLarge: AppStyle.headTitle2,
.bodyMedium, ).bodyMedium,
titleTextStyle: TextTheme( titleTextStyle: TextTheme(
titleSmall: AppStyle.subtitle, titleSmall: AppStyle.subtitle,
headlineSmall: AppStyle.title, headlineSmall: AppStyle.title,
titleLarge: AppStyle.headTitle2) titleLarge: AppStyle.headTitle2,
.titleLarge, ).titleLarge,
), ),
); );
ThemeData themeArabic = ThemeData( ThemeData darkThemeEnglish = ThemeData(
fontFamily: "Cairo", brightness: Brightness.dark,
textTheme: const TextTheme( fontFamily: "SFPro",
displayLarge: TextStyle( textTheme: TextTheme(
fontWeight: FontWeight.bold, displaySmall: AppStyle.title,
fontSize: 22, displayLarge: AppStyle.headTitle,
color: AppColor.primaryColor), displayMedium: AppStyle.headTitle2,
displayMedium: TextStyle( bodyLarge: AppStyle.title,
fontWeight: FontWeight.bold, bodyMedium: AppStyle.subtitle,
fontSize: 26, ),
color: AppColor.primaryColor),
bodyLarge: TextStyle(
height: 2,
color: AppColor.accentColor,
fontWeight: FontWeight.bold,
fontSize: 14),
bodyMedium:
TextStyle(height: 2, color: AppColor.accentColor, fontSize: 14)),
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
dialogTheme: DialogTheme(
backgroundColor: AppColor.secondaryColor,
contentTextStyle: AppStyle.title,
titleTextStyle: AppStyle.headTitle2,
),
appBarTheme: AppBarTheme(
elevation: 0,
color: AppColor.secondaryColor,
centerTitle: true,
iconTheme: const IconThemeData(
color: AppColor.primaryColor,
),
toolbarTextStyle: TextTheme(
titleSmall: AppStyle.subtitle,
headlineSmall: AppStyle.title,
titleLarge: AppStyle.headTitle2,
).bodyMedium,
titleTextStyle: TextTheme(
titleSmall: AppStyle.subtitle,
headlineSmall: AppStyle.title,
titleLarge: AppStyle.headTitle2,
).titleLarge,
),
);
ThemeData lightThemeArabic = ThemeData(
brightness: Brightness.light,
fontFamily: 'SFArabic',
textTheme: TextTheme(
displaySmall: AppStyle.title,
displayLarge: AppStyle.headTitle,
displayMedium: AppStyle.headTitle2,
bodyLarge: AppStyle.title,
bodyMedium: AppStyle.subtitle,
),
primarySwatch: Colors.blue,
dialogTheme: DialogTheme(
backgroundColor: AppColor.secondaryColor,
contentTextStyle: AppStyle.title,
titleTextStyle: AppStyle.headTitle2,
),
appBarTheme: AppBarTheme(
elevation: 0,
color: AppColor.secondaryColor,
centerTitle: true,
iconTheme: const IconThemeData(
color: AppColor.primaryColor,
),
toolbarTextStyle: TextTheme(
titleSmall: AppStyle.subtitle,
headlineSmall: AppStyle.title,
titleLarge: AppStyle.headTitle2,
).bodyMedium,
titleTextStyle: TextTheme(
titleSmall: AppStyle.subtitle,
headlineSmall: AppStyle.title,
titleLarge: AppStyle.headTitle2,
).titleLarge,
),
);
ThemeData darkThemeArabic = ThemeData(
brightness: Brightness.dark,
fontFamily: 'SFArabic',
textTheme: TextTheme(
displaySmall: AppStyle.title,
displayLarge: AppStyle.headTitle,
displayMedium: AppStyle.headTitle2,
bodyLarge: AppStyle.title,
bodyMedium: AppStyle.subtitle,
),
primarySwatch: Colors.blue,
dialogTheme: DialogTheme(
backgroundColor: AppColor.secondaryColor,
contentTextStyle: AppStyle.title,
titleTextStyle: AppStyle.headTitle2,
),
appBarTheme: AppBarTheme(
elevation: 0,
color: AppColor.secondaryColor,
centerTitle: true,
iconTheme: const IconThemeData(
color: AppColor.primaryColor,
),
toolbarTextStyle: TextTheme(
titleSmall: AppStyle.subtitle,
headlineSmall: AppStyle.title,
titleLarge: AppStyle.headTitle2,
).bodyMedium,
titleTextStyle: TextTheme(
titleSmall: AppStyle.subtitle,
headlineSmall: AppStyle.title,
titleLarge: AppStyle.headTitle2,
).titleLarge,
),
); );

View File

@@ -41,7 +41,7 @@ class DbSql {
createdAt TEXT createdAt TEXT
) )
'''); ''');
await db.execute('DROP TABLE IF EXISTS ${TableName.recentLocations}'); // await db.execute('DROP TABLE IF EXISTS ${TableName.recentLocations}');
await db.execute(''' await db.execute('''
CREATE TABLE ${TableName.recentLocations}( CREATE TABLE ${TableName.recentLocations}(
id INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER PRIMARY KEY AUTOINCREMENT,

View File

@@ -18,65 +18,195 @@ class SplashScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: body: Container(
AppColor.secondaryColor, // Set your desired background color decoration: const BoxDecoration(
body: Center( gradient: LinearGradient(
child: Column( begin: Alignment.topCenter,
mainAxisAlignment: MainAxisAlignment.center, end: Alignment.bottomCenter,
children: [ colors: [
GetBuilder<SplashScreenController>( AppColor.primaryColor,
builder: (_) { // AppColor.primaryColor,
return AnimatedBuilder( AppColor.secondaryColor,
animation: splashScreenController.animationController, AppColor.secondaryColor,
builder: (BuildContext context, Widget? child) { ],
return Transform.scale( ),
scale: ),
splashScreenController.animationController.value < 0.2 child: Center(
? splashScreenController.zoomInAnimation.value child: Column(
: splashScreenController.zoomOutAnimation.value, mainAxisAlignment: MainAxisAlignment.center,
child: Image.asset( children: [
'assets/images/logo.gif', GetBuilder<SplashScreenController>(
width: Get.width * .5, builder: (_) {
return ScaleTransition(
scale: splashScreenController.animation,
child: FadeTransition(
opacity: splashScreenController.animation,
child: Column(
children: [
DefaultTextStyle(
style: AppStyle.headTitle.copyWith(
color: AppColor.primaryColor,
fontSize: 48,
fontWeight: FontWeight.bold,
),
child: AnimatedTextKit(
animatedTexts: [
WavyAnimatedText(
AppInformation.appName,
speed: const Duration(milliseconds: 200),
),
],
isRepeatingAnimation: false,
onFinished: () {
// Trigger any additional animations here
},
),
),
const SizedBox(height: 20),
DefaultTextStyle(
style: AppStyle.title.copyWith(
color: AppColor.writeColor.withOpacity(0.8),
fontSize: 18,
),
child: AnimatedTextKit(
animatedTexts: [
TyperAnimatedText(
'Your Journey Begins Here'.tr,
speed: const Duration(milliseconds: 100),
),
],
isRepeatingAnimation: false,
),
),
],
), ),
); ),
}, );
); },
},
),
AnimatedTextKit(animatedTexts: [
TypewriterAnimatedText(
'Welcome to ${AppInformation.appName}',
textStyle:
AppStyle.headTitle2.copyWith(color: AppColor.writeColor),
speed: const Duration(milliseconds: 200),
), ),
], isRepeatingAnimation: true), Padding(
const SizedBox( padding:
height: 20, const EdgeInsets.symmetric(horizontal: 40, vertical: 20),
), child: Column(
AnimatedTextKit(animatedTexts: [ children: [
TypewriterAnimatedText( Obx(() => LinearProgressIndicator(
'Powered By ${AppInformation.appName} LLC', value: splashScreenController.progress.value,
textStyle: backgroundColor: AppColor.writeColor.withOpacity(0.2),
AppStyle.title.copyWith(color: AppColor.primaryColor), valueColor: AlwaysStoppedAnimation<Color>(
speed: const Duration(milliseconds: 200), AppColor.primaryColor),
minHeight: 3,
)),
const SizedBox(height: 16),
Text(
'Version: ${box.read(BoxName.packagInfo) ?? '1.0.0'}',
style: AppStyle.subtitle.copyWith(
color: AppColor.writeColor.withOpacity(0.6),
),
),
const SizedBox(height: 20),
],
),
), ),
], isRepeatingAnimation: false), ],
const SizedBox( ),
height: 100,
),
],
), ),
), ),
bottomNavigationBar: Row( bottomNavigationBar: Padding(
mainAxisAlignment: MainAxisAlignment.center, padding: const EdgeInsets.only(bottom: 16.0),
children: [ child: Text(
Text( 'Version: ${box.read(BoxName.packagInfo) ?? '1.0.0'}',
box.read(BoxName.packagInfo) ?? '1.4.61', style: AppStyle.subtitle.copyWith(
style: AppStyle.subtitle, color: AppColor.writeColor.withOpacity(0.6),
), ),
], textAlign: TextAlign.center,
),
), ),
); );
} }
} }
// class SplashScreen extends StatelessWidget {
// final SplashScreenController splashScreenController =
// Get.put(SplashScreenController());
// SplashScreen({super.key});
// @override
// Widget build(BuildContext context) {
// return Scaffold(
// // Using a Container with BoxDecoration for gradient background
// body: Container(
// decoration: const BoxDecoration(
// gradient: LinearGradient(
// begin: Alignment.topCenter,
// end: Alignment.bottomCenter,
// colors: [
// AppColor.primaryColor,
// AppColor.secondaryColor,
// ],
// ),
// ),
// child: Center(
// child: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// GetBuilder<SplashScreenController>(
// builder: (_) {
// return ScaleTransition(
// scale: splashScreenController.animation,
// child: FadeTransition(
// opacity: splashScreenController.animation,
// child: Image.asset(
// 'assets/images/logo.gif',
// width: Get.width * 0.4, // Slightly smaller logo
// ),
// ),
// );
// },
// ),
// const SizedBox(height: 20),
// DefaultTextStyle(
// style: AppStyle.headTitle2.copyWith(color: AppColor.writeColor),
// textAlign: TextAlign.center,
// child: AnimatedTextKit(
// animatedTexts: [
// FadeAnimatedText(AppInformation.appName,
// duration: const Duration(milliseconds: 1000)),
// ],
// isRepeatingAnimation: false, // Only animate once
// pause: const Duration(milliseconds: 500),
// ),
// ),
// const SizedBox(height: 8),
// DefaultTextStyle(
// style: AppStyle.title
// .copyWith(color: AppColor.writeColor.withOpacity(0.8)),
// textAlign: TextAlign.center,
// child: AnimatedTextKit(
// animatedTexts: [
// FadeAnimatedText('Powered By ${AppInformation.appName}',
// duration: const Duration(milliseconds: 1000)),
// ],
// isRepeatingAnimation: false, // Only animate once
// pause: const Duration(milliseconds: 500),
// ),
// ),
// ],
// ),
// ),
// ),
// bottomNavigationBar: Padding(
// padding: const EdgeInsets.only(bottom: 16.0),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Text(
// 'Version: ${box.read(BoxName.packagInfo) ?? '1.0.0'}', // More descriptive label
// style: AppStyle.subtitle
// .copyWith(color: AppColor.writeColor.withOpacity(0.6)),
// ),
// ],
// ),
// ),
// );
// }
// }

View File

@@ -1,7 +1,6 @@
import 'package:SEFER/constant/style.dart'; import 'package:SEFER/constant/style.dart';
import 'package:SEFER/controller/auth/register_controller.dart'; import 'package:SEFER/controller/auth/register_controller.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart'; import 'package:SEFER/views/widgets/elevated_btn.dart';
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:SEFER/views/widgets/my_scafold.dart'; import 'package:SEFER/views/widgets/my_scafold.dart';
import 'package:SEFER/views/widgets/my_textField.dart'; import 'package:SEFER/views/widgets/my_textField.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

View File

@@ -1,8 +1,7 @@
import 'package:SEFER/constant/box_name.dart'; import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/main.dart'; import 'package:SEFER/main.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
class AboutPage extends StatelessWidget { class AboutPage extends StatelessWidget {
const AboutPage({super.key}); const AboutPage({super.key});
@@ -15,136 +14,219 @@ class AboutPage extends StatelessWidget {
), ),
child: SafeArea( child: SafeArea(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Padding(
crossAxisAlignment: CrossAxisAlignment.center, padding: const EdgeInsets.all(20.0),
children: [ child: Column(
// Company Logo crossAxisAlignment: CrossAxisAlignment.stretch,
Center( children: [
child: Padding( // Company Logo
padding: const EdgeInsets.all(16.0), Center(
child: Image.asset( child: Image.asset(
'assets/images/logo.png', // Replace with your logo image asset path 'assets/images/logo.gif', // Replace with your logo image asset path
height: 100.0, height: 80.0,
width: 100.0,
), ),
), ),
), const SizedBox(height: 20),
// Company Name and Location // Company Name and Introduction
Padding( Text(
padding: const EdgeInsets.all(16.0), 'SEFER LLC',
child: Text( style: CupertinoTheme.of(context).textTheme.navTitleTextStyle,
'SEFER LLC\n${box.read(BoxName.countryCode).toString().tr}',
style:
CupertinoTheme.of(context).textTheme.textStyle.copyWith(
fontSize: 22.0,
fontWeight: FontWeight.bold,
),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), const SizedBox(height: 8),
Text(
// About Us Description 'Egypt\'s pioneering ride-sharing service, proudly developed by Arabian and local owners. We prioritize being near you both our valued passengers and our dedicated captains.'
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Text(
'SEFER is a ride-sharing app designed with your safety and affordability in mind. We connect you with reliable drivers in your area, ensuring a convenient and stress-free travel experience.\n\nHere are some of the key features that set us apart:'
.tr, .tr,
style: style: CupertinoTheme.of(context).textTheme.textStyle,
CupertinoTheme.of(context).textTheme.textStyle.copyWith(
fontSize: 16.0,
),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), const SizedBox(height: 30),
const SizedBox(height: 20), // Key Features Section
Text(
'Why Choose SEFER?'.tr,
style: CupertinoTheme.of(context).textTheme.navTitleTextStyle,
textAlign: TextAlign.center,
),
const SizedBox(height: 15),
// Security Features // Nearest Availability
Padding( Row(
padding: const EdgeInsets.symmetric(horizontal: 24.0), children: [
child: Column( const Icon(CupertinoIcons.location_solid,
color: CupertinoColors.activeBlue),
const SizedBox(width: 10),
Expanded(
child: Text(
'Closest to You'.tr,
style: CupertinoTheme.of(context).textTheme.textStyle,
),
),
],
),
const SizedBox(height: 10),
Text(
'We connect you with the nearest drivers for faster pickups and quicker journeys.'
.tr,
style: CupertinoTheme.of(context)
.textTheme
.textStyle
.copyWith(color: CupertinoColors.secondaryLabel),
),
const SizedBox(height: 20),
// High-Level Security
Row(
children: [
const Icon(CupertinoIcons.shield_fill,
color: CupertinoColors.activeGreen),
const SizedBox(width: 10),
Expanded(
child: Text(
'Uncompromising Security'.tr,
style: CupertinoTheme.of(context).textTheme.textStyle,
),
),
],
),
const SizedBox(height: 10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Row(
children: [ children: [
const Icon(CupertinoIcons.lock_fill, const Icon(CupertinoIcons.person_2_fill,
color: CupertinoColors.activeBlue), size: 18, color: CupertinoColors.activeGreen),
const SizedBox(width: 8.0), const SizedBox(width: 5),
Expanded( Text(
child: Text( 'Lady Captains Available'.tr,
'Most Secure Methods'.tr, style: CupertinoTheme.of(context)
style: CupertinoTheme.of(context) .textTheme
.textTheme .textStyle
.textStyle .copyWith(fontSize: 15),
.copyWith(
fontSize: 16.0,
fontWeight: FontWeight.w500,
),
),
), ),
], ],
), ),
const SizedBox(height: 8.0), const SizedBox(height: 5),
Row( Row(
children: [ children: [
const Icon(CupertinoIcons.phone_fill, const Icon(CupertinoIcons.recordingtape,
color: CupertinoColors.activeBlue), size: 18, color: CupertinoColors.activeGreen),
const SizedBox(width: 8.0), const SizedBox(width: 5),
Expanded( Text(
child: Text( 'Recorded Trips (Voice & AI Analysis)'.tr,
'In-App VOIP Calls'.tr, style: CupertinoTheme.of(context)
style: CupertinoTheme.of(context) .textTheme
.textTheme .textStyle
.textStyle .copyWith(fontSize: 15),
.copyWith(
fontSize: 16.0,
fontWeight: FontWeight.w500,
),
),
),
],
),
const SizedBox(height: 8.0),
Row(
children: [
const Icon(CupertinoIcons.videocam_fill,
color: CupertinoColors.activeBlue),
const SizedBox(width: 8.0),
Expanded(
child: Text(
'Recorded Trips for Safety'.tr,
style: CupertinoTheme.of(context)
.textTheme
.textStyle
.copyWith(
fontSize: 16.0,
fontWeight: FontWeight.w500,
),
),
), ),
], ],
), ),
], ],
), ),
), const SizedBox(height: 20),
// Affordability Highlight // Fast Support
Padding( Row(
padding: const EdgeInsets.symmetric(horizontal: 16.0), children: [
child: Text( const Icon(CupertinoIcons.bolt_horizontal_fill,
'\nWe also prioritize affordability, offering competitive pricing to make your rides accessible.' color: CupertinoColors.systemOrange),
.tr, const SizedBox(width: 10),
style: Expanded(
CupertinoTheme.of(context).textTheme.textStyle.copyWith( child: Text(
fontSize: 16.0, 'Fastest Complaint Response'.tr,
fontWeight: FontWeight.w500, style: CupertinoTheme.of(context).textTheme.textStyle,
), ),
textAlign: TextAlign.center, ),
],
), ),
), const SizedBox(height: 10),
Text(
'Our dedicated customer service team ensures swift resolution of any issues.'
.tr,
style: CupertinoTheme.of(context)
.textTheme
.textStyle
.copyWith(color: CupertinoColors.secondaryLabel),
),
const SizedBox(height: 20),
const SizedBox(height: 20), // Affordable Pricing
], Row(
children: [
const Icon(CupertinoIcons.money_dollar_circle_fill,
color: CupertinoColors.activeBlue),
const SizedBox(width: 10),
Expanded(
child: Text(
'Affordable for Everyone'.tr,
style: CupertinoTheme.of(context).textTheme.textStyle,
),
),
],
),
const SizedBox(height: 10),
Text(
'Enjoy competitive prices across all trip options, making travel accessible.'
.tr,
style: CupertinoTheme.of(context)
.textTheme
.textStyle
.copyWith(color: CupertinoColors.secondaryLabel),
),
const SizedBox(height: 20),
// Trip Options
Row(
children: [
const Icon(CupertinoIcons.car_detailed,
color: CupertinoColors.systemPurple),
const SizedBox(width: 10),
Expanded(
child: Text(
'Variety of Trip Choices'.tr,
style: CupertinoTheme.of(context).textTheme.textStyle,
),
),
],
),
const SizedBox(height: 10),
Text(
'Choose the trip option that perfectly suits your needs and preferences.'
.tr,
style: CupertinoTheme.of(context)
.textTheme
.textStyle
.copyWith(color: CupertinoColors.secondaryLabel),
),
const SizedBox(height: 20),
// Passenger Choice
Row(
children: [
Icon(CupertinoIcons.hand_draw_fill,
color: CupertinoColors.systemGreen),
const SizedBox(width: 10),
Expanded(
child: Text(
'Your Choice, Our Priority'.tr,
style: CupertinoTheme.of(context).textTheme.textStyle,
),
),
],
),
const SizedBox(height: 10),
Text(
'Because we are near, you have the flexibility to choose the ride that works best for you.'
.tr,
style: CupertinoTheme.of(context)
.textTheme
.textStyle
.copyWith(color: CupertinoColors.secondaryLabel),
),
],
),
), ),
), ),
), ),

View File

@@ -1,146 +1,228 @@
import 'package:SEFER/controller/home/map_passenger_controller.dart'; import 'package:SEFER/views/home/HomePage/contact_us.dart';
import 'package:SEFER/views/widgets/my_scafold.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import '../../../constant/style.dart';
class FrequentlyQuestionsPage extends StatelessWidget { class FrequentlyQuestionsPage extends StatelessWidget {
const FrequentlyQuestionsPage({super.key}); const FrequentlyQuestionsPage({super.key});
void _showAnswerDialog(BuildContext context, String question, String answer) {
showCupertinoDialog(
context: context,
builder: (BuildContext context) => CupertinoAlertDialog(
title: Text(question,
style: const TextStyle(
fontWeight: FontWeight.bold, color: Colors.indigo)),
content: Text(answer),
actions: <CupertinoDialogAction>[
CupertinoDialogAction(
isDefaultAction: true,
onPressed: () {
Navigator.of(context).pop();
},
child: const Text('Close'),
),
],
),
);
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
String selectedPayment = 'cash'; // Replace with your initial selection return CupertinoPageScaffold(
bool canCancelRide = false; navigationBar: CupertinoNavigationBar(
return MyScafolld( backgroundColor: Colors.indigo,
title: 'Frequently Questions'.tr, middle: Text(
body: [ 'Frequently Asked Questions'.tr,
Padding( style: const TextStyle(color: Colors.white),
padding: const EdgeInsets.all(8.0), ),
child: ListView( ),
children: [ child: SafeArea(
// Question 1: How do I request a ride? child: ListView(
ExpansionTile( children: <Widget>[
title: Text( CupertinoListSection.insetGrouped(
header: Text(
'Getting Started'.tr,
style: const TextStyle(fontWeight: FontWeight.bold),
),
children: <CupertinoListTile>[
CupertinoListTile(
leading: const Icon(
CupertinoIcons.car_detailed,
color: Colors.indigo,
),
title: Text('How do I request a ride?'.tr),
trailing: const CupertinoListTileChevron(),
onTap: () => _showAnswerDialog(
context,
'How do I request a ride?'.tr, 'How do I request a ride?'.tr,
style: AppStyle.title, 'Simply open the Sefer app, enter your destination, and tap "Request Ride". The app will connect you with a nearby driver.'
),
children: [
Text(
'Step-by-step instructions on how to request a ride through the Sefer app.'
.tr,
style: AppStyle.title,
),
],
),
// Question 2: What types of vehicles are available?
ExpansionTile(
title: Text(
'What types of vehicles are available?'.tr,
style: AppStyle.title,
),
children: [
Text(
'Sefer offers a variety of vehicle options to suit your needs, including economy, comfort, and luxury. Choose the option that best fits your budget and passenger count.'
.tr,
style: AppStyle.title,
),
],
),
// Question 3: How can I pay for my ride?
ExpansionTile(
title: Text(
'How can I pay for my ride?'.tr,
style: AppStyle.title,
),
children: [
Text(
'Sefer offers multiple payment methods for your convenience. Choose between cash payment or credit/debit card payment during ride confirmation.'
.tr,
style: AppStyle.title,
),
],
),
// Question 4: Can I cancel my ride? (if applicable)
ExpansionTile(
title: Text(
'Can I cancel my ride?'.tr,
style: AppStyle.title,
),
children: [
Text(
'Yes, you can cancel your ride under certain conditions (e.g., before driver is assigned). See the Sefer cancellation policy for details.'
.tr,
style: AppStyle.title,
),
],
),
// Question 5 & 6: Driver-specific questions
ExpansionTile(
title: Text(
'Driver Registration & Requirements'.tr,
style: AppStyle.title,
),
children: [
Text(
'${'How can I register as a driver?'.tr}\n${'What are the requirements to become a driver?'.tr}',
style: AppStyle.title,
),
InkWell(
onTap: () {
Get.find<MapPassengerController>()
.getDialog('title', 'midTitle', () {
; //todo add in this dialog papers for driver
});
},
child: Text(
'Visit our website or contact Sefer support for information on driver registration and requirements.'
.tr,
style: AppStyle.title,
),
),
],
),
// Question 7: How do I communicate with the other party?
ExpansionTile(
title: Text(
'How do I communicate with the other party (passenger/driver)?'
.tr, .tr,
style: AppStyle.title,
), ),
children: [
Text(
'Sefer provides in-app chat functionality to allow you to communicate with your driver or passenger during your ride.'
.tr,
style: AppStyle.title,
),
],
),
// Question 8: What safety measures does Sefer offer?
ExpansionTile(
title: Text(
'What safety measures does Sefer offer?'.tr,
style: AppStyle.title,
),
children: [
Text(
'Sefer prioritizes your safety. We offer features like driver verification, in-app trip tracking, and emergency contact options.'
.tr,
style: AppStyle.title,
),
],
), ),
], ],
), ),
) CupertinoListSection.insetGrouped(
], header: Text(
isleading: true); 'Vehicle Options'.tr,
style: const TextStyle(fontWeight: FontWeight.bold),
),
children: <CupertinoListTile>[
CupertinoListTile(
leading: const Icon(
CupertinoIcons.car_fill,
color: Colors.blue,
),
title: Text('What types of vehicles are available?'.tr),
trailing: const CupertinoListTileChevron(),
onTap: () => _showAnswerDialog(
context,
'What types of vehicles are available?'.tr,
'Sefer offers a variety of options including Economy, Comfort, and Luxury to suit your needs and budget.'
.tr,
),
),
],
),
CupertinoListSection.insetGrouped(
header: Text(
'Payments'.tr,
style: const TextStyle(fontWeight: FontWeight.bold),
),
children: <CupertinoListTile>[
CupertinoListTile(
leading: const Icon(
CupertinoIcons.creditcard,
color: Colors.green,
),
title: Text('How can I pay for my ride?'.tr),
trailing: const CupertinoListTileChevron(),
onTap: () => _showAnswerDialog(
context,
'How can I pay for my ride?'.tr,
'You can pay for your ride using cash or credit/debit card. You can select your preferred payment method before confirming your ride.'
.tr,
),
),
],
),
CupertinoListSection.insetGrouped(
header: Text(
'Ride Management'.tr,
style: const TextStyle(fontWeight: FontWeight.bold),
),
children: <CupertinoListTile>[
CupertinoListTile(
leading: const Icon(
CupertinoIcons.xmark_circle_fill,
color: Colors.red,
),
title: Text('Can I cancel my ride?'.tr),
trailing: const CupertinoListTileChevron(),
onTap: () => _showAnswerDialog(
context,
'Can I cancel my ride?'.tr,
'Yes, you can cancel your ride, but please note that cancellation fees may apply depending on how far in advance you cancel.'
.tr,
),
),
],
),
CupertinoListSection.insetGrouped(
header: Text(
'For Drivers'.tr,
style: const TextStyle(fontWeight: FontWeight.bold),
),
children: <CupertinoListTile>[
CupertinoListTile(
leading: const Icon(
CupertinoIcons.person_crop_circle_fill,
color: Colors.orange,
),
title: Text('Driver Registration & Requirements'.tr),
trailing: const CupertinoListTileChevron(),
onTap: () => showCupertinoDialog(
context: context,
builder: (BuildContext context) => CupertinoAlertDialog(
title: Text('Driver Registration'.tr,
style: const TextStyle(
fontWeight: FontWeight.bold,
color: Colors.indigo)),
content: Text(
'To register as a driver or learn about the requirements, please visit our website or contact Sefer support directly.'
.tr),
actions: <CupertinoDialogAction>[
CupertinoDialogAction(
isDefaultAction: true,
onPressed: () {
Get.to(() => ContactUsPage());
// Optionally, you can open a URL here
},
child: Text('Visit Website/Contact Support'.tr),
),
CupertinoDialogAction(
onPressed: () {
Navigator.of(context).pop();
},
child: Text('Close'.tr),
),
],
),
),
),
],
),
CupertinoListSection.insetGrouped(
header: Text(
'Communication'.tr,
style: const TextStyle(fontWeight: FontWeight.bold),
),
children: <CupertinoListTile>[
CupertinoListTile(
leading: const Icon(
CupertinoIcons.chat_bubble_2_fill,
color: Colors.purple,
),
title: Text(
'How do I communicate with the other party (passenger/driver)?'
.tr),
trailing: const CupertinoListTileChevron(),
onTap: () => _showAnswerDialog(
context,
'How do I communicate with the other party (passenger/driver)?'
.tr,
'You can communicate with your driver or passenger through the in-app chat feature once a ride is confirmed.'
.tr,
),
),
],
),
CupertinoListSection.insetGrouped(
header: Text(
'Safety & Security'.tr,
style: const TextStyle(fontWeight: FontWeight.bold),
),
children: <CupertinoListTile>[
CupertinoListTile(
leading: const Icon(
CupertinoIcons.shield_fill,
color: Colors.teal,
),
title: Text('What safety measures does Sefer offer?'.tr),
trailing: const CupertinoListTileChevron(),
onTap: () => _showAnswerDialog(
context,
'What safety measures does Sefer offer?'.tr,
'Sefer offers various safety features including driver verification, in-app trip tracking, emergency contact options, and the ability to share your trip status with trusted contacts.'
.tr,
),
),
],
),
const SizedBox(height: 20), // Add some bottom padding
],
),
),
);
} }
} }

View File

@@ -50,7 +50,7 @@ class MapPagePassenger extends StatelessWidget {
buttomSheetMapPage(), buttomSheetMapPage(),
CarDetailsTypeToChoose(), CarDetailsTypeToChoose(),
const HeaderDestination(), // const HeaderDestination(),
const BurcMoney(), const BurcMoney(),
const PromoCode(), const PromoCode(),
const ApplyOrderWidget(), const MapMenuWidget(), const ApplyOrderWidget(), const MapMenuWidget(),
@@ -67,7 +67,7 @@ class MapPagePassenger extends StatelessWidget {
const VipRideBeginPassenger(), const VipRideBeginPassenger(),
const RideFromStartApp(), const RideFromStartApp(),
cancelRidePage(), // cancelRidePage(),
const MenuIconMapPageWidget(), const MenuIconMapPageWidget(),
PointsPageForRider() PointsPageForRider()
], ],

View File

@@ -5,6 +5,14 @@ import 'package:SEFER/constant/style.dart';
import 'package:SEFER/controller/home/map_passenger_controller.dart'; import 'package:SEFER/controller/home/map_passenger_controller.dart';
import '../../widgets/elevated_btn.dart'; import '../../widgets/elevated_btn.dart';
void showCancelRideBottomSheet() {
Get.bottomSheet(
cancelRidePage(),
backgroundColor: Colors.transparent,
isScrollControlled: true,
);
}
GetBuilder<MapPassengerController> cancelRidePage() { GetBuilder<MapPassengerController> cancelRidePage() {
Get.put(MapPassengerController()); Get.put(MapPassengerController());
@@ -19,78 +27,73 @@ GetBuilder<MapPassengerController> cancelRidePage() {
return GetBuilder<MapPassengerController>( return GetBuilder<MapPassengerController>(
builder: (controller) => controller.isCancelRidePageShown builder: (controller) => controller.isCancelRidePageShown
? Positioned( ? Container(
left: 20, height: Get.height * 0.6,
top: Get.height * 0.15, padding: const EdgeInsets.all(20),
right: 20, decoration: BoxDecoration(
bottom: Get.height * 0.15, color: Colors.white,
child: Container( boxShadow: [
padding: const EdgeInsets.all(20), BoxShadow(
decoration: BoxDecoration( color: Colors.black.withOpacity(0.2),
color: Colors.white, offset: const Offset(0, 8),
boxShadow: [ blurRadius: 16,
BoxShadow( ),
color: Colors.black.withOpacity(0.2), ],
offset: const Offset(0, 8), borderRadius: BorderRadius.circular(20),
blurRadius: 16, ),
), child: Column(
], mainAxisAlignment: MainAxisAlignment.spaceBetween,
borderRadius: BorderRadius.circular(20), children: [
), Text(
child: Column( 'Can we know why you want to cancel Ride ?'.tr,
mainAxisAlignment: MainAxisAlignment.spaceBetween, style: AppStyle.title
children: [ .copyWith(fontSize: 18, fontWeight: FontWeight.bold),
Text( textAlign: TextAlign.center,
'Can we know why you want to cancel Ride ?'.tr, ),
style: AppStyle.title const SizedBox(height: 20),
.copyWith(fontSize: 18, fontWeight: FontWeight.bold), Expanded(
textAlign: TextAlign.center, child: ListView.separated(
), itemCount: reasons.length,
const SizedBox(height: 20), separatorBuilder: (context, index) => const Divider(),
Expanded( itemBuilder: (context, index) {
child: ListView.separated( return ListTile(
itemCount: reasons.length, title: Text(
separatorBuilder: (context, index) => const Divider(), reasons[index],
itemBuilder: (context, index) { style: AppStyle.title.copyWith(fontSize: 16),
return ListTile( ),
title: Text( leading: Radio(
reasons[index], value: index,
style: AppStyle.title.copyWith(fontSize: 16), groupValue: controller.selectedReason,
), onChanged: (int? value) {
leading: Radio( controller.selectReason(value!, reasons[index]);
value: index,
groupValue: controller.selectedReason,
onChanged: (int? value) {
controller.selectReason(value!, reasons[index]);
},
activeColor: AppColor.primaryColor,
),
onTap: () {
controller.selectReason(index, reasons[index]);
}, },
); activeColor: AppColor.primaryColor,
}, ),
), onTap: () {
), controller.selectReason(index, reasons[index]);
const SizedBox(height: 20), },
MyElevatedButton( );
title: 'Cancel Ride'.tr,
onPressed: () {
if (controller.selectedReason == -1) {
Get.snackbar(
'You Should be select reason.'.tr,
'',
snackPosition: SnackPosition.BOTTOM,
backgroundColor: AppColor.redColor,
colorText: Colors.white,
);
} else {
controller.cancelRide();
}
}, },
), ),
], ),
), const SizedBox(height: 20),
MyElevatedButton(
title: 'Cancel Ride'.tr,
onPressed: () {
if (controller.selectedReason == -1) {
Get.snackbar(
'You Should be select reason.'.tr,
'',
snackPosition: SnackPosition.BOTTOM,
backgroundColor: AppColor.redColor,
colorText: Colors.white,
);
} else {
controller.cancelRide();
}
},
),
],
), ),
) )
: const SizedBox(), : const SizedBox(),

File diff suppressed because it is too large Load Diff

View File

@@ -116,7 +116,7 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
controller.newStartPointLocation; controller.newStartPointLocation;
controller.changeMainBottomMenuMap(); controller.changeMainBottomMenuMap();
await controller.getMap( await controller.getDirectionMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}', '${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
'${latLng.latitude},${latLng.longitude}', '${latLng.latitude},${latLng.longitude}',
); );
@@ -191,7 +191,7 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
controller.changeMainBottomMenuMap(); controller.changeMainBottomMenuMap();
// controller.newMyLocation = latLng; // controller.newMyLocation = latLng;
await controller.getMap( await controller.getDirectionMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}', '${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
'${latLng.latitude},${latLng.longitude}', '${latLng.latitude},${latLng.longitude}',
); );

View File

@@ -108,6 +108,7 @@ GetBuilder<MapPassengerController> formSearchPlacesStart() {
'longitude': res['geometry']['location']['lng'], 'longitude': res['geometry']['location']['lng'],
'name': res['name'].toString(), 'name': res['name'].toString(),
'rate': res['rating'].toString(), 'rate': res['rating'].toString(),
'createdAt': DateTime.now().toIso8601String(),
}, TableName.recentLocations); }, TableName.recentLocations);
controller.convertHintTextStartNewPlaces(index); controller.convertHintTextStartNewPlaces(index);

View File

@@ -1,4 +1,3 @@
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart';
@@ -7,8 +6,8 @@ import 'package:SEFER/controller/home/points_for_rider_controller.dart';
import '../../../constant/colors.dart'; import '../../../constant/colors.dart';
import '../../../constant/style.dart'; import '../../../constant/style.dart';
import '../../../controller/home/map_passenger_controller.dart'; import '../../../controller/home/map_passenger_controller.dart';
import '../../widgets/elevated_btn.dart';
import '../../widgets/mycircular.dart'; import '../../widgets/mycircular.dart';
import '../../widgets/mydialoug.dart';
class GoogleMapPassengerWidget extends StatelessWidget { class GoogleMapPassengerWidget extends StatelessWidget {
GoogleMapPassengerWidget({ GoogleMapPassengerWidget({
@@ -34,7 +33,7 @@ class GoogleMapPassengerWidget extends StatelessWidget {
() async { () async {
controller.clearPolyline(); controller.clearPolyline();
if (controller.dataCarsLocationByPassenger != null) { if (controller.dataCarsLocationByPassenger != null) {
await controller.getMap( await controller.getDirectionMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}', '${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
'${argument.latitude.toString()},${argument.longitude.toString()}'); '${argument.latitude.toString()},${argument.longitude.toString()}');
@@ -230,6 +229,7 @@ class GoogleMapPassengerWidget extends StatelessWidget {
target: controller.passengerLocation, target: controller.passengerLocation,
zoom: 15, zoom: 15,
), ),
markers: controller.markers.toSet(), markers: controller.markers.toSet(),
// { // {
// if (controller.statusRide != 'Apply' || // if (controller.statusRide != 'Apply' ||
@@ -319,86 +319,88 @@ class GoogleMapPassengerWidget extends StatelessWidget {
// ), // ),
// }, // },
polygons: controller.polygons, polygons: controller.polygons,
polylines: { polylines: controller.polyLines.toSet(),
Polyline( // {
zIndex: 2, // Polyline(
consumeTapEvents: true, // polylineId: const PolylineId('route'),
geodesic: true, // points: controller.polylineCoordinates,
endCap: Cap.buttCap, // color: AppColor.primaryColor,
startCap: Cap.buttCap, // width: 4,
visible: true, // // patterns: [
polylineId: const PolylineId('route'), // // PatternItem.dot,
points: controller.polylineCoordinates, // // PatternItem.gap(10),
color: AppColor.primaryColor, // // ],
width: 5, // endCap: Cap.roundCap,
), // startCap: Cap.roundCap,
// geodesic: true,
// ),
Polyline( // Polyline(
zIndex: 1, // zIndex: 1,
consumeTapEvents: true, // consumeTapEvents: true,
geodesic: true, // geodesic: true,
endCap: Cap.buttCap, // endCap: Cap.buttCap,
startCap: Cap.buttCap, // startCap: Cap.buttCap,
visible: true, // visible: true,
polylineId: const PolylineId('route0'), // polylineId: const PolylineId('route0'),
points: controller.polylineCoordinatesPointsAll[0], // points: controller.polylineCoordinatesPointsAll[0],
color: AppColor.blueColor, // color: AppColor.blueColor,
width: 5, // width: 5,
), // ),
Polyline( // Polyline(
zIndex: 2, // zIndex: 2,
consumeTapEvents: true, // consumeTapEvents: true,
geodesic: true, // geodesic: true,
endCap: Cap.buttCap, // endCap: Cap.buttCap,
startCap: Cap.buttCap, // startCap: Cap.buttCap,
visible: true, // visible: true,
polylineId: const PolylineId('route1'), // polylineId: const PolylineId('route1'),
points: controller.polylineCoordinatesPointsAll[1], // points: controller.polylineCoordinatesPointsAll[1],
color: AppColor.yellowColor, // color: AppColor.yellowColor,
width: 5, // width: 5,
), // ),
Polyline( // Polyline(
zIndex: 2, // zIndex: 2,
consumeTapEvents: true, // consumeTapEvents: true,
geodesic: true, // geodesic: true,
endCap: Cap.buttCap, // endCap: Cap.buttCap,
startCap: Cap.buttCap, // startCap: Cap.buttCap,
visible: true, // visible: true,
polylineId: const PolylineId('route2'), // polylineId: const PolylineId('route2'),
points: controller.polylineCoordinatesPointsAll[2], // points: controller.polylineCoordinatesPointsAll[2],
color: AppColor.greenColor, // color: AppColor.greenColor,
width: 5, // width: 5,
), // ),
Polyline( // Polyline(
zIndex: 2, // zIndex: 2,
consumeTapEvents: true, // consumeTapEvents: true,
geodesic: true, // geodesic: true,
endCap: Cap.buttCap, // endCap: Cap.buttCap,
startCap: Cap.buttCap, // startCap: Cap.buttCap,
visible: true, // visible: true,
polylineId: const PolylineId('route3'), // polylineId: const PolylineId('route3'),
points: controller.polylineCoordinatesPointsAll[2], // points: controller.polylineCoordinatesPointsAll[2],
color: AppColor.deepPurpleAccent, // color: AppColor.deepPurpleAccent,
width: 5, // width: 5,
), // ),
// Polyline( // // Polyline(
// zIndex: 2, // // zIndex: 2,
// consumeTapEvents: true, // // consumeTapEvents: true,
// geodesic: true, // // geodesic: true,
// endCap: Cap.buttCap, // // endCap: Cap.buttCap,
// startCap: Cap.buttCap, // // startCap: Cap.buttCap,
// visible: true, // // visible: true,
// polylineId: PolylineId('g'), // // polylineId: PolylineId('g'),
// points: [ // // points: [
// LatLng(controller.southwest.latitude, // // LatLng(controller.southwest.latitude,
// controller.southwest.longitude), // // controller.southwest.longitude),
// LatLng(controller.northeast.latitude, // // LatLng(controller.northeast.latitude,
// controller.northeast.longitude) // // controller.northeast.longitude)
// ], // // ],
// color: AppColor.primaryColor, // // color: AppColor.primaryColor,
// width: 5, // // width: 5,
// ), // // ),
}, // },
// circles: { // circles: {
// Circle( // Circle(
// circleId: const CircleId('kk'), // circleId: const CircleId('kk'),

View File

@@ -1,8 +1,10 @@
import 'package:SEFER/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_font_icons/flutter_font_icons.dart'; import 'package:flutter_font_icons/flutter_font_icons.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart';
import '../../../constant/colors.dart'; import '../../../constant/colors.dart';
import '../../../constant/table_names.dart';
import '../../../controller/functions/tts.dart'; import '../../../controller/functions/tts.dart';
import '../../../controller/home/map_passenger_controller.dart'; import '../../../controller/home/map_passenger_controller.dart';
import '../../../controller/home/vip_waitting_page.dart'; import '../../../controller/home/vip_waitting_page.dart';
@@ -99,26 +101,26 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
), ),
), ),
), ),
// AnimatedContainer( // AnimatedContainer(
// duration: const Duration(microseconds: 200), // duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic, // width: controller.widthMapTypeAndTraffic,
// decoration: BoxDecoration( // decoration: BoxDecoration(
// color: AppColor.secondaryColor, // color: AppColor.secondaryColor,
// border: Border.all(), // border: Border.all(),
// borderRadius: BorderRadius.circular(15)), // borderRadius: BorderRadius.circular(15)),
// child: IconButton( // child: IconButton(
// onPressed: () async { // onPressed: () async {
// controller.statusRide == 'Apply' && // final result = await sql.getCustomQuery('''
// controller.isSearchingWindow == false; // SELECT * FROM ${TableName.recentLocations} ORDER BY createdAt DESC
// controller.update(); // ''');
// }, // },
// icon: const Icon( // icon: const Icon(
// Octicons // Octicons
// .telescope, // Replace this with your desired VIP icon // .telescope, // Replace this with your desired VIP icon
// size: 29, // size: 29,
// ), // ),
// ), // ),
// ), // ),
], ],
); );
})), })),

View File

@@ -1,6 +1,4 @@
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:SEFER/views/widgets/my_textField.dart'; import 'package:SEFER/views/widgets/my_textField.dart';
import 'package:SEFER/views/widgets/mysnakbar.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@@ -16,7 +14,8 @@ import '../../../constant/colors.dart';
import '../../../constant/table_names.dart'; import '../../../constant/table_names.dart';
import '../../../controller/functions/toast.dart'; import '../../../controller/functions/toast.dart';
import '../../../controller/functions/tts.dart'; import '../../../controller/functions/tts.dart';
import '../../../print.dart'; import '../../widgets/error_snakbar.dart';
import '../../widgets/mydialoug.dart';
import 'form_search_start.dart'; import 'form_search_start.dart';
class MainBottomMenuMap extends StatelessWidget { class MainBottomMenuMap extends StatelessWidget {
@@ -352,7 +351,7 @@ class MainBottomMenuMap extends StatelessWidget {
onPressed: () async { onPressed: () async {
Get.back(); Get.back();
await controller.getLocation(); await controller.getLocation();
await controller.getMap( await controller.getDirectionMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}', '${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
'${controller.recentPlaces[index]['latitude']},${controller.recentPlaces[index]['longitude']}', '${controller.recentPlaces[index]['latitude']},${controller.recentPlaces[index]['longitude']}',
); );
@@ -402,7 +401,7 @@ class MainBottomMenuMap extends StatelessWidget {
controller.newMyLocation = controller.newStartPointLocation; controller.newMyLocation = controller.newStartPointLocation;
controller.changeMainBottomMenuMap(); controller.changeMainBottomMenuMap();
await controller.getMap( await controller.getDirectionMap(
'${controller.newStartPointLocation.latitude},${controller.newStartPointLocation.longitude}', '${controller.newStartPointLocation.latitude},${controller.newStartPointLocation.longitude}',
'${controller.myDestination.latitude},${controller.myDestination.longitude}', '${controller.myDestination.latitude},${controller.myDestination.longitude}',
); );
@@ -632,7 +631,7 @@ class FaviouratePlacesDialog extends StatelessWidget {
onPressed: () async { onPressed: () async {
Get.back(); Get.back();
await controller.getLocation(); await controller.getLocation();
await controller.getMap( await controller.getDirectionMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}', '${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
'${favoritePlaces[index]['latitude']},${favoritePlaces[index]['longitude']}', '${favoritePlaces[index]['latitude']},${favoritePlaces[index]['longitude']}',
); );

View File

@@ -16,7 +16,7 @@ import '../../../constant/colors.dart';
import '../../../controller/home/map_passenger_controller.dart'; import '../../../controller/home/map_passenger_controller.dart';
import '../../notification/notification_page.dart'; import '../../notification/notification_page.dart';
import '../../widgets/icon_widget_menu.dart'; import '../../widgets/icon_widget_menu.dart';
import '../home_page.dart'; import '../setting_page.dart';
import '../profile/passenger_profile_page.dart'; import '../profile/passenger_profile_page.dart';
class MapMenuWidget extends StatelessWidget { class MapMenuWidget extends StatelessWidget {
@@ -73,12 +73,12 @@ class MapMenuWidget extends StatelessWidget {
title: 'Home'.tr, title: 'Home'.tr,
onpressed: () { onpressed: () {
Get.to( Get.to(
() => const HomePage(), () => const SettingPage(),
transition: Transition.downToUp, transition: Transition.downToUp,
curve: Curves.easeInOutExpo, curve: Curves.easeInOutExpo,
); );
}, },
icon: Icons.home), icon: Icons.settings),
], ],
) )
: const SizedBox(), // Choose the desired overlay color : const SizedBox(), // Choose the desired overlay color

View File

@@ -133,7 +133,7 @@ class PickerAnimtionContainerFormPlaces extends StatelessWidget {
TextButton( TextButton(
onPressed: () async { onPressed: () async {
await controller await controller
.getMap( .getDirectionMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}', '${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
'${favoritePlaces[index]['latitude']},${favoritePlaces[index]['longitude']}', '${favoritePlaces[index]['latitude']},${favoritePlaces[index]['longitude']}',
); );
@@ -191,7 +191,7 @@ class PickerAnimtionContainerFormPlaces extends StatelessWidget {
MyElevatedButton( MyElevatedButton(
title: 'Go to this Target'.tr, title: 'Go to this Target'.tr,
onPressed: () async { onPressed: () async {
await controller.getMap( await controller.getDirectionMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}', '${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
'${controller.newMyLocation.latitude},${controller.newMyLocation.longitude}', '${controller.newMyLocation.latitude},${controller.newMyLocation.longitude}',
); );

View File

@@ -8,121 +8,6 @@ import 'package:SEFER/views/widgets/my_textField.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import '../../../constant/links.dart';
// class SearchingCaptainWindow extends StatelessWidget {
// const SearchingCaptainWindow({super.key});
// Widget _buildDriverAvatars(MapPassengerController controller) {
// // If no drivers yet, show loading indicator
// if (controller.isSearchingWindow) {
// // Check if dataCarsLocationByPassenger or its 'data' is null
// if (controller.dataCarsLocationByPassenger == null ||
// controller.dataCarsLocationByPassenger['data'] == null ||
// controller.dataCarsLocationByPassenger['data'].isEmpty) {
// return const SizedBox(
// height: 60,
// child: Center(
// child: CircularProgressIndicator(
// valueColor:
// AlwaysStoppedAnimation<Color>(AppColor.secondaryColor),
// ),
// ),
// );
// }
// }
// return SizedBox(
// height: 60,
// child: ListView.builder(
// scrollDirection: Axis.horizontal,
// itemCount: controller.dataCarsLocationByPassenger['data'].length,
// padding: const EdgeInsets.symmetric(horizontal: 16),
// itemBuilder: (context, index) {
// final driver = controller.dataCarsLocationByPassenger['data'][index];
// return Padding(
// padding: const EdgeInsets.only(right: 8),
// child: Column(
// mainAxisSize: MainAxisSize.min,
// children: [
// CircleAvatar(
// radius: 25,
// backgroundColor: AppColor.secondaryColor,
// child: ClipOval(
// child: Image.network(
// '${AppLink.server}/portrate_captain_image/${driver['driver_id']}.jpg',
// width: 50,
// height: 50,
// fit: BoxFit.cover,
// errorBuilder: (context, error, stackTrace) {
// return const Icon(
// Icons.person,
// color: Colors.white,
// size: 30,
// );
// },
// ),
// ),
// ),
// ],
// ),
// );
// },
// ),
// );
// }
// @override
// Widget build(BuildContext context) {
// return GetBuilder<MapPassengerController>(
// builder: (mapPassengerController) {
// return mapPassengerController.isSearchingWindow
// ? Positioned(
// bottom: 0,
// left: 0,
// right: 0,
// child: Container(
// decoration: AppStyle.boxDecoration1,
// height: Get.height *
// .3, // Increased height to accommodate avatars
// child: Column(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// children: [
// SizedBox(
// width: Get.width * .7,
// child: const LinearProgressIndicator(
// minHeight: 6,
// backgroundColor: AppColor.yellowColor,
// color: AppColor.secondaryColor,
// ),
// ),
// mapPassengerController.driverOrderStatus == 'recive'
// ? Text(
// "Drivers received orders".tr,
// style: AppStyle.title,
// )
// : Text(
// "We are searching for the nearest driver to you"
// .tr,
// style: AppStyle.title,
// ),
// Text(
// 'please wait till driver accept your order'.tr,
// style: AppStyle.title,
// ),
// // New: Driver avatars section
// _buildDriverAvatars(mapPassengerController),
// _buildTimer(mapPassengerController),
// ],
// ),
// ),
// )
// : const SizedBox();
// },
// );
// }
// }
class SearchingCaptainWindow extends StatelessWidget { class SearchingCaptainWindow extends StatelessWidget {
const SearchingCaptainWindow({super.key}); const SearchingCaptainWindow({super.key});

View File

@@ -6,7 +6,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import '../../../constant/api_key.dart';
import '../../../constant/links.dart'; import '../../../constant/links.dart';
import '../../../print.dart'; import '../../../print.dart';

View File

@@ -4,12 +4,12 @@ import 'package:SEFER/constant/colors.dart';
import 'package:SEFER/constant/style.dart'; import 'package:SEFER/constant/style.dart';
import 'package:SEFER/controller/functions/crud.dart'; import 'package:SEFER/controller/functions/crud.dart';
import 'package:SEFER/controller/home/profile/complaint_controller.dart'; import 'package:SEFER/controller/home/profile/complaint_controller.dart';
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'dart:io'; import 'dart:io';
import '../../../controller/functions/audio_record1.dart'; import '../../../controller/functions/audio_record1.dart';
import '../../widgets/mydialoug.dart';
class ComplaintPage extends StatelessWidget { class ComplaintPage extends StatelessWidget {
final ComplaintController complaintController = final ComplaintController complaintController =

View File

@@ -413,68 +413,72 @@ class CountryPickerFromSetting extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GetBuilder<ProfileController>(builder: (controller) { return GetBuilder<ProfileController>(builder: (controller) {
return Padding( return CupertinoPageScaffold(
padding: const EdgeInsets.all(20.0), navigationBar: CupertinoNavigationBar(
child: ListView( middle: Text('Select Your Country'.tr),
children: [ ),
const SizedBox( child: Padding(
height: 20, padding: const EdgeInsets.all(20.0),
), child: ListView(
Text( children: [
"Select Your Country".tr, const SizedBox(
style: AppStyle.headTitle2, height: 20,
textAlign: TextAlign.center, ),
), // Text(
// const SizedBox( // "Select Your Country".tr,
// height: 20, // style: AppStyle.headTitle2,
// ), // textAlign: TextAlign.center,
Padding( // ),
padding: const EdgeInsets.all(10), // const SizedBox(
child: Text( // height: 20,
"To ensure you receive the most accurate information for your location, please select your country below. This will help tailor the app experience and content to your country." // ),
.tr, Padding(
style: AppStyle.title, padding: const EdgeInsets.all(10),
textAlign: TextAlign.center, child: Text(
), "To ensure you receive the most accurate information for your location, please select your country below. This will help tailor the app experience and content to your country."
), .tr,
SizedBox( style: AppStyle.headTitle2,
height: 200, textAlign: TextAlign.center,
child: CupertinoPicker( ),
itemExtent: 32, ),
onSelectedItemChanged: (int index) { SizedBox(
controller.setCountry(countryOptions[index]); height: 200,
box.write(BoxName.countryCode, child: CupertinoPicker(
countryOptions[index]); // Save in English itemExtent: 32,
}, onSelectedItemChanged: (int index) {
children: List.generate( controller.setCountry(countryOptions[index]);
countryOptions.length, box.write(BoxName.countryCode,
(index) => Center( countryOptions[index]); // Save in English
child: Text( },
countryOptions[index] children: List.generate(
.tr, // Display translated if not English countryOptions.length,
style: AppStyle.title, (index) => Center(
child: Text(
countryOptions[index]
.tr, // Display translated if not English
style: AppStyle.title,
),
),
), ),
), ),
), ),
),
),
MyElevatedButton( MyElevatedButton(
title: 'Select Country'.tr, // Use translated text for button title: 'Select Country'.tr, // Use translated text for button
onPressed: () async { onPressed: () async {
loginController.saveCountryCode(controller.selectedCountry loginController.saveCountryCode(controller.selectedCountry
.toString()); // No conversion needed .toString()); // No conversion needed
box.write( box.write(
BoxName.countryCode, // BoxName.countryCode, //
controller.selectedCountry); // Already saved in English controller.selectedCountry); // Already saved in English
Get.snackbar(controller.selectedCountry.toString().tr, '', Get.snackbar(controller.selectedCountry.toString().tr, '',
backgroundColor: AppColor.greenColor); backgroundColor: AppColor.greenColor);
// Get.back();// // Get.back();//
// Get.back(); // Get.back();
}, },
) )
], ],
), )),
); );
}); });
} }

View File

@@ -10,15 +10,15 @@ import 'HomePage/share_app_page.dart';
import 'HomePage/trip_record_page.dart'; import 'HomePage/trip_record_page.dart';
import 'profile/passenger_profile_page.dart'; import 'profile/passenger_profile_page.dart';
class HomePage extends StatelessWidget { class SettingPage extends StatelessWidget {
const HomePage({super.key}); const SettingPage({super.key});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Get.put(HomePageController()); Get.put(HomePageController());
return CupertinoPageScaffold( return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar( navigationBar: CupertinoNavigationBar(
middle: Text('Home Page'.tr), middle: Text('Setting'.tr),
leading: CupertinoButton( leading: CupertinoButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
child: const Icon(CupertinoIcons.back), child: const Icon(CupertinoIcons.back),
@@ -42,14 +42,7 @@ class HomePage extends StatelessWidget {
), ),
CupertinoListTile( CupertinoListTile(
onTap: () { onTap: () {
Get.to(CupertinoPageScaffold( Get.to(() => CountryPickerFromSetting());
navigationBar: CupertinoNavigationBar(
middle: Text('Change Country'.tr),
),
child: SafeArea(
child: CountryPickerFromSetting(),
),
));
}, },
leading: const Icon(CupertinoIcons.location, leading: const Icon(CupertinoIcons.location,
color: CupertinoColors.activeBlue), color: CupertinoColors.activeBlue),

View File

@@ -1,4 +1,5 @@
import 'package:SEFER/constant/style.dart'; import 'package:SEFER/constant/style.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart'; import 'package:SEFER/views/widgets/elevated_btn.dart';
@@ -14,238 +15,122 @@ class Language extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return CupertinoPageScaffold(
body: GetBuilder<LocaleController>( navigationBar: CupertinoNavigationBar(
builder: (controller) => Center( middle: Text('Choose Language'.tr),
child: Container( border: null,
padding: const EdgeInsets.all(15), ),
child: ListView( child: SafeArea(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly, child: GetBuilder<LocaleController>(
children: [ builder: (controller) => Center(
Text( child: Padding(
"Choose Language".tr, padding: const EdgeInsets.all(16),
style: Theme.of(context).textTheme.headlineLarge, child: Column(
children: [
_buildHeader(),
const SizedBox(height: 20),
Expanded(
child: ListView(
physics: const BouncingScrollPhysics(),
children: [
_buildLanguageButton(
'العربية', 'ar', controller, context),
_buildLanguageButton(
'English', 'en', controller, context),
_buildLanguageButton(
'Türkçe', 'tr', controller, context),
_buildLanguageButton(
'Français', 'fr', controller, context),
_buildLanguageButton(
'Italiano', 'it', controller, context),
_buildLanguageButton(
'Deutsch', 'de', controller, context),
_buildLanguageButton(
'Ελληνικά', 'el', controller, context),
_buildLanguageButton(
'Español', 'es', controller, context),
_buildLanguageButton(
'فارسی', 'fa', controller, context),
_buildLanguageButton('中文', 'zh', controller, context),
_buildLanguageButton(
'Русский', 'ru', controller, context),
_buildLanguageButton(
'हिन्दी', 'hi', controller, context),
],
),
),
],
), ),
const SizedBox(height: 20), ),
MyElevatedButton(
title: 'العربية',
onPressed: () {
controller.changeLang("ar");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
box.read(BoxName.email) != null
? Get.offAll(() => const MapPagePassenger())
: Get.offAll(() => LoginPage());
}));
},
),
MyElevatedButton(
title: "English",
onPressed: () {
controller.changeLang("en");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
box.read(BoxName.email) != null
? Get.offAll(() => const MapPagePassenger())
: Get.offAll(() => LoginPage());
}));
},
),
MyElevatedButton(
title: "Türkçe",
onPressed: () {
controller.changeLang("tr");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
box.read(BoxName.email) != null
? Get.offAll(() => const MapPagePassenger())
: Get.offAll(() => LoginPage());
}));
},
),
MyElevatedButton(
title: "Français",
onPressed: () {
controller.changeLang("fr");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
box.read(BoxName.email) != null
? Get.offAll(() => const MapPagePassenger())
: Get.offAll(() => LoginPage());
}));
},
),
MyElevatedButton(
title: "Italiano",
onPressed: () {
controller.changeLang("it");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
box.read(BoxName.email) != null
? Get.offAll(() => const MapPagePassenger())
: Get.offAll(() => LoginPage());
}));
},
),
MyElevatedButton(
title: "Deutsch",
onPressed: () {
controller.changeLang("de");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
Get.defaultDialog(
title:
'You should restart app to change language'
.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
box.read(BoxName.email) != null
? Get.offAll(
() => const MapPagePassenger())
: Get.offAll(() => LoginPage());
}));
}));
},
),
MyElevatedButton(
title: "Ελληνικά",
onPressed: () {
controller.changeLang("el");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
box.read(BoxName.email) != null
? Get.offAll(() => const MapPagePassenger())
: Get.offAll(() => LoginPage());
}));
},
),
MyElevatedButton(
title: "Español",
onPressed: () {
controller.changeLang("es");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
box.read(BoxName.email) != null
? Get.offAll(() => const MapPagePassenger())
: Get.offAll(() => LoginPage());
}));
},
),
MyElevatedButton(
title: "فارسی",
onPressed: () {
controller.changeLang("fa");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
box.read(BoxName.email) != null
? Get.offAll(() => const MapPagePassenger())
: Get.offAll(() => LoginPage());
}));
},
),
MyElevatedButton(
title: "中文",
onPressed: () {
controller.changeLang("zh");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
box.read(BoxName.email) != null
? Get.offAll(() => const MapPagePassenger())
: Get.offAll(() => LoginPage());
}));
},
),
MyElevatedButton(
title: "Русский",
onPressed: () {
controller.changeLang("ru");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
box.read(BoxName.email) != null
? Get.offAll(() => const MapPagePassenger())
: Get.offAll(() => LoginPage());
}));
},
),
MyElevatedButton(
title: "हिन्दी",
onPressed: () {
controller.changeLang("hi");
Get.defaultDialog(
title: 'You should restart app to change language'.tr,
titleStyle: AppStyle.title,
middleText: '',
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: () {
box.read(BoxName.email) != null
? Get.offAll(() => const MapPagePassenger())
: Get.offAll(() => LoginPage());
}));
},
),
],
), ),
), ),
), ),
)); );
}
Widget _buildHeader() {
return Container(
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [Color(0xFF2196F3), Color(0xFF1976D2)],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: CupertinoColors.systemBlue.withOpacity(0.2),
blurRadius: 10,
offset: const Offset(0, 4),
),
],
),
child: Column(
children: [
const Icon(
CupertinoIcons.globe,
color: CupertinoColors.white,
size: 48,
),
const SizedBox(height: 16),
Text(
'Choose Language'.tr,
style: const TextStyle(
color: CupertinoColors.white,
fontSize: 22,
fontWeight: FontWeight.bold,
),
textAlign: TextAlign.center,
),
],
),
);
}
Widget _buildLanguageButton(String title, String langCode,
LocaleController controller, BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8),
child: MyElevatedButton(
title: title,
onPressed: () async {
controller.changeLang(langCode);
showCupertinoDialog(
context: context,
builder: (context) => CupertinoAlertDialog(
title: Text('You should restart app to change language'.tr),
actions: [
CupertinoDialogAction(
child: Text('Ok'.tr),
onPressed: () {
Get.offAll(() => MapPagePassenger());
},
),
],
),
);
},
));
} }
} }

View File

@@ -1,6 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:SEFER/constant/colors.dart';
import '../../constant/colors.dart';
import 'mydialoug.dart';
class MyCircleContainer extends StatelessWidget { class MyCircleContainer extends StatelessWidget {
final Widget child; final Widget child;
@@ -22,6 +24,12 @@ class MyCircleContainer extends StatelessWidget {
builder: ((controller) => GestureDetector( builder: ((controller) => GestureDetector(
onTap: () { onTap: () {
controller.changeColor(); controller.changeColor();
MyDialog().getDialog(
'Rejected Orders Count'.tr,
'This is the total number of rejected orders per day after accepting the orders'
.tr, () {
Get.back();
});
}, },
child: AnimatedContainer( child: AnimatedContainer(
onEnd: () { onEnd: () {

View File

@@ -1,18 +1,19 @@
import 'dart:io'; import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:vibration/vibration.dart'; import 'package:vibration/vibration.dart';
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/constant/colors.dart'; import '../../constant/box_name.dart';
import 'package:SEFER/constant/style.dart'; import '../../constant/colors.dart';
import 'package:SEFER/main.dart'; import '../../constant/style.dart';
import '../../main.dart';
class MyElevatedButton extends StatelessWidget { class MyElevatedButton extends StatelessWidget {
final String title; final String title;
final VoidCallback onPressed; final VoidCallback onPressed;
final Color kolor; final Color kolor;
final int vibrateDuration; final int vibrateDuration;
const MyElevatedButton({ const MyElevatedButton({
Key? key, Key? key,
required this.title, required this.title,
@@ -24,22 +25,27 @@ class MyElevatedButton extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
bool vibrate = box.read(BoxName.isvibrate) ?? true; bool vibrate = box.read(BoxName.isvibrate) ?? true;
return ElevatedButton( return ElevatedButton(
style: ElevatedButton.styleFrom( style: ButtonStyle(
backgroundColor: kolor, backgroundColor: WidgetStateProperty.all(kolor),
shape: RoundedRectangleBorder( shadowColor: WidgetStateProperty.all(Colors.transparent),
borderRadius: BorderRadius.circular(12.0), shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
), ),
), ),
onPressed: () async { onPressed: () async {
// Handle haptic feedback for both iOS and Android
if (vibrate == true) { if (vibrate == true) {
if (Platform.isIOS) { if (Platform.isIOS) {
HapticFeedback.selectionClick(); HapticFeedback.selectionClick();
} else { } else if (Platform.isAndroid) {
await Vibration.vibrate(duration: vibrateDuration); await Vibration.vibrate(duration: vibrateDuration);
} } else {}
} }
// Ensure the onPressed callback is called after haptic feedback
onPressed(); onPressed();
}, },
child: Text( child: Text(

View File

@@ -0,0 +1,123 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import '../../constant/colors.dart';
class SnackbarConfig {
static const duration = Duration(seconds: 3);
static const animationDuration = Duration(milliseconds: 300);
static const margin = EdgeInsets.symmetric(horizontal: 16, vertical: 10);
static const borderRadius = 12.0;
static const elevation = 6.0;
static final BoxShadow shadow = BoxShadow(
color: Colors.black.withOpacity(0.1),
blurRadius: 10,
offset: const Offset(0, 2),
);
}
SnackbarController mySnackeBarError(String message) {
// Trigger error haptic feedback
HapticFeedback.mediumImpact();
return Get.snackbar(
'Error'.tr,
message,
backgroundColor: AppColor.redColor.withOpacity(0.95),
colorText: AppColor.secondaryColor,
icon: const Icon(
Icons.error_outline_rounded,
color: AppColor.secondaryColor,
size: 28,
),
shouldIconPulse: true,
snackPosition: SnackPosition.TOP,
margin: SnackbarConfig.margin,
borderRadius: SnackbarConfig.borderRadius,
duration: SnackbarConfig.duration,
animationDuration: SnackbarConfig.animationDuration,
forwardAnimationCurve: Curves.easeOutCirc,
reverseAnimationCurve: Curves.easeInCirc,
boxShadows: [SnackbarConfig.shadow],
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
titleText: Text(
'Error'.tr,
style: const TextStyle(
fontWeight: FontWeight.w700,
color: Colors.white,
fontSize: 16,
letterSpacing: 0.2,
),
),
messageText: Text(
message,
style: TextStyle(
color: Colors.white.withOpacity(0.95),
fontSize: 14,
height: 1.3,
),
),
onTap: (_) {
HapticFeedback.lightImpact();
Get.closeCurrentSnackbar();
},
isDismissible: true,
dismissDirection: DismissDirection.horizontal,
overlayBlur: 0.8,
overlayColor: Colors.black12,
);
}
SnackbarController mySnackbarSuccess(String message) {
// Trigger success haptic feedback
HapticFeedback.lightImpact();
return Get.snackbar(
'Success'.tr,
message,
backgroundColor: AppColor.greenColor.withOpacity(0.95),
colorText: AppColor.secondaryColor,
icon: const Icon(
Icons.check_circle_outline_rounded,
color: AppColor.secondaryColor,
size: 28,
),
shouldIconPulse: true,
snackPosition: SnackPosition.TOP,
margin: SnackbarConfig.margin,
borderRadius: SnackbarConfig.borderRadius,
duration: SnackbarConfig.duration,
animationDuration: SnackbarConfig.animationDuration,
forwardAnimationCurve: Curves.easeOutCirc,
reverseAnimationCurve: Curves.easeInCirc,
boxShadows: [SnackbarConfig.shadow],
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
titleText: Text(
'Success'.tr,
style: const TextStyle(
fontWeight: FontWeight.w700,
color: Colors.white,
fontSize: 16,
letterSpacing: 0.2,
),
),
messageText: Text(
message,
style: TextStyle(
color: Colors.white.withOpacity(0.95),
fontSize: 14,
height: 1.3,
),
),
onTap: (_) {
HapticFeedback.lightImpact();
Get.closeCurrentSnackbar();
},
isDismissible: true,
dismissDirection: DismissDirection.horizontal,
overlayBlur: 0.8,
overlayColor: Colors.black12,
);
}

View File

@@ -1,7 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:SEFER/constant/style.dart';
import '../../constant/colors.dart'; import '../../constant/colors.dart';
import '../../constant/style.dart';
class IconWidgetMenu extends StatelessWidget { class IconWidgetMenu extends StatelessWidget {
const IconWidgetMenu({ const IconWidgetMenu({
@@ -20,7 +20,7 @@ class IconWidgetMenu extends StatelessWidget {
return InkWell( return InkWell(
onTap: onpressed, onTap: onpressed,
child: Padding( child: Padding(
padding: const EdgeInsets.only(top: 1), padding: const EdgeInsets.only(top: 25),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
@@ -29,22 +29,22 @@ class IconWidgetMenu extends StatelessWidget {
decoration: const BoxDecoration( decoration: const BoxDecoration(
color: AppColor.secondaryColor, color: AppColor.secondaryColor,
shape: BoxShape.circle, shape: BoxShape.circle,
// boxShadow: [ boxShadow: [
// BoxShadow( BoxShadow(
// color: AppColor.secondaryColor, color: AppColor.secondaryColor,
// offset: Offset(-2, -2), offset: Offset(-2, -2),
// blurRadius: 0, blurRadius: 0,
// spreadRadius: 0, spreadRadius: 0,
// blurStyle: BlurStyle.outer, blurStyle: BlurStyle.outer,
// ), ),
// BoxShadow( BoxShadow(
// color: AppColor.accentColor, color: AppColor.accentColor,
// offset: Offset(3, 3), offset: Offset(3, 3),
// blurRadius: 0, blurRadius: 0,
// spreadRadius: 0, spreadRadius: 0,
// blurStyle: BlurStyle.outer, blurStyle: BlurStyle.outer,
// ), ),
// ], ],
), ),
child: Center( child: Center(
child: Icon( child: Icon(
@@ -56,7 +56,7 @@ class IconWidgetMenu extends StatelessWidget {
), ),
Text( Text(
title, title,
style: AppStyle.subtitle.copyWith(color: AppColor.secondaryColor), style: AppStyle.subtitle,
) )
], ],
), ),

View File

@@ -0,0 +1,74 @@
import 'package:flutter/material.dart';
import 'dart:async';
import '../../constant/style.dart';
class MyCircularProgressIndicatorWithTimer extends StatelessWidget {
final Color backgroundColor;
final bool isLoading;
MyCircularProgressIndicatorWithTimer({
Key? key,
this.backgroundColor = Colors.transparent,
required this.isLoading,
}) : super(key: key);
final StreamController<int> _streamController = StreamController<int>();
void startTimer() {
int _timeLeft = 60;
Timer.periodic(const Duration(seconds: 1), (timer) {
if (_timeLeft > 0 && isLoading) {
_streamController.add(_timeLeft);
_timeLeft--;
} else {
timer.cancel();
_streamController.close();
}
});
}
@override
Widget build(BuildContext context) {
if (isLoading) {
startTimer();
}
return Center(
child: Container(
width: 200,
height: 200,
decoration: BoxDecoration(
color: backgroundColor,
shape: BoxShape.circle,
),
child: Stack(
children: [
const Center(child: CircularProgressIndicator()),
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Align(
alignment: Alignment.center,
child: Image.asset(
'assets/images/logo.gif',
width: 140,
height: 140,
),
),
const SizedBox(height: 10),
StreamBuilder<int>(
stream: _streamController.stream,
initialData: 60,
builder: (context, snapshot) {
return Text('${snapshot.data}', style: AppStyle.title);
},
),
],
),
],
),
),
);
}
}

View File

@@ -1,109 +0,0 @@
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../constant/colors.dart';
import '../../constant/style.dart';
import '../../controller/functions/tts.dart';
import 'elevated_btn.dart';
class MyDialog extends GetxController {
void getDialog(String title, String? midTitle, VoidCallback onPressed) {
final textToSpeechController = Get.put(TextToSpeechController());
Get.dialog(
BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
child: CupertinoAlertDialog(
title: Text(
title,
style: AppStyle.title.copyWith(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
content: Column(
children: [
CupertinoButton(
onPressed: () async {
await textToSpeechController.speakText(title ?? midTitle!);
},
child: const Icon(CupertinoIcons.headphones,
color: AppColor.primaryColor),
),
Text(
midTitle!,
style: AppStyle.title.copyWith(fontSize: 16),
),
],
),
actions: [
CupertinoDialogAction(
child: const Text('Cancel',
style: TextStyle(color: AppColor.redColor)),
onPressed: () {
Get.back();
},
),
CupertinoDialogAction(
onPressed: onPressed,
child: Text('OK'.tr,
style: const TextStyle(color: AppColor.greenColor)),
),
],
),
),
barrierDismissible: false,
);
}
}
class MyDialogContent extends GetxController {
void getDialog(String title, Widget? content, VoidCallback onPressed) {
final textToSpeechController = Get.put(TextToSpeechController());
Get.dialog(
BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
child: CupertinoAlertDialog(
title: Text(
title,
style: AppStyle.title.copyWith(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
content: Column(
children: [
CupertinoButton(
onPressed: () async {
await textToSpeechController.speakText(title);
},
child: const Icon(CupertinoIcons.speaker_2,
color: AppColor.primaryColor),
),
content!
],
),
actions: [
CupertinoDialogAction(
child: const Text('Cancel',
style: TextStyle(color: AppColor.redColor)),
onPressed: () {
Get.back();
},
),
CupertinoDialogAction(
onPressed: onPressed,
child: Text('OK'.tr,
style: const TextStyle(color: AppColor.greenColor)),
),
],
),
),
barrierDismissible: false,
);
}
}

View File

@@ -1,7 +1,8 @@
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart'; import 'package:get_storage/get_storage.dart';
import 'package:SEFER/constant/box_name.dart';
import '../../constant/box_name.dart';
class MyTextForm extends StatelessWidget { class MyTextForm extends StatelessWidget {
const MyTextForm({ const MyTextForm({
@@ -27,7 +28,7 @@ class MyTextForm extends StatelessWidget {
children: [ children: [
Text( Text(
label.tr, label.tr,
style: const TextStyle( style: TextStyle(
color: CupertinoColors.label, color: CupertinoColors.label,
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

View File

@@ -1,34 +1,131 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class MyCircularProgressIndicator extends StatelessWidget { class MyCircularProgressIndicator extends StatefulWidget {
final Color backgroundColor; final Color backgroundColor;
final double size;
final Color progressColor;
final double strokeWidth;
const MyCircularProgressIndicator({ const MyCircularProgressIndicator({
super.key, super.key,
this.backgroundColor = Colors.transparent, this.backgroundColor = Colors.transparent,
this.size = 110,
this.progressColor = Colors.blue,
this.strokeWidth = 3.0,
}); });
@override
State<MyCircularProgressIndicator> createState() =>
_MyCircularProgressIndicatorState();
}
class _MyCircularProgressIndicatorState
extends State<MyCircularProgressIndicator>
with SingleTickerProviderStateMixin {
late AnimationController _controller;
late Animation<double> _scaleAnimation;
late Animation<double> _rotationAnimation;
@override
void initState() {
super.initState();
_controller = AnimationController(
duration: const Duration(seconds: 2),
vsync: this,
)..repeat(reverse: true);
_scaleAnimation = Tween<double>(
begin: 0.95,
end: 1.05,
).animate(CurvedAnimation(
parent: _controller,
curve: Curves.easeInOut,
));
_rotationAnimation = Tween<double>(
begin: 0,
end: 2,
).animate(CurvedAnimation(
parent: _controller,
curve: Curves.linear,
));
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Center( return Center(
child: Container( child: AnimatedBuilder(
width: 140, animation: _controller,
height: 140, builder: (context, child) {
decoration: BoxDecoration( return Transform.scale(
color: backgroundColor, scale: _scaleAnimation.value,
shape: BoxShape.circle, child: Container(
), width: widget.size,
child: Stack( height: widget.size,
children: [ decoration: BoxDecoration(
const Center(child: CircularProgressIndicator()), color: widget.backgroundColor,
Image.asset( shape: BoxShape.circle,
'assets/images/logo.gif', boxShadow: [
width: 140, BoxShadow(
height: 140, color: widget.progressColor.withAlpha(30),
fit: BoxFit.contain, blurRadius: 12,
spreadRadius: 2,
),
],
),
child: Stack(
alignment: Alignment.center,
children: [
// Outer rotating progress indicator
Transform.rotate(
angle: _rotationAnimation.value * 3.14,
child: CircularProgressIndicator(
strokeWidth: widget.strokeWidth,
valueColor: AlwaysStoppedAnimation<Color>(
widget.progressColor,
),
),
),
// Inner static progress indicator
CircularProgressIndicator(
strokeWidth: widget.strokeWidth * 0.7,
valueColor: AlwaysStoppedAnimation<Color>(
widget.progressColor.withAlpha(150),
),
),
// Logo container with scale animation
ScaleTransition(
scale: Tween<double>(
begin: 0.9,
end: 1.0,
).animate(CurvedAnimation(
parent: _controller,
curve: Curves.easeInOut,
)),
child: Container(
width: widget.size * 0.7,
height: widget.size * 0.7,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: widget.backgroundColor,
),
child: Image.asset(
'assets/images/logo.gif',
fit: BoxFit.contain,
),
),
),
],
),
), ),
], );
), },
), ),
); );
} }

View File

@@ -0,0 +1,246 @@
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import '../../constant/colors.dart';
import '../../constant/style.dart';
import '../../controller/functions/tts.dart';
class DialogConfig {
static const Duration animationDuration = Duration(milliseconds: 200);
static const double blurStrength = 8.0;
static const double cornerRadius = 14.0;
static final BoxDecoration decoration = BoxDecoration(
borderRadius: BorderRadius.circular(cornerRadius),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(38), // 0.15 opacity
blurRadius: 16,
offset: const Offset(0, 8),
),
],
);
}
class MyDialog extends GetxController {
void getDialog(String title, String? midTitle, VoidCallback onPressed) {
final textToSpeechController = Get.put(TextToSpeechController());
HapticFeedback.mediumImpact();
Get.dialog(
TweenAnimationBuilder<double>(
duration: DialogConfig.animationDuration,
tween: Tween(begin: 0.0, end: 1.0),
builder: (context, value, child) {
return Transform.scale(
scale: 0.95 + (0.05 * value),
child: Opacity(opacity: value, child: child),
);
},
child: BackdropFilter(
filter: ImageFilter.blur(
sigmaX: DialogConfig.blurStrength,
sigmaY: DialogConfig.blurStrength,
),
child: Theme(
data: ThemeData.light().copyWith(
dialogBackgroundColor: CupertinoColors.systemBackground,
),
child: CupertinoAlertDialog(
title: Column(
children: [
Text(
title,
style: AppStyle.title.copyWith(
fontSize: 20,
fontWeight: FontWeight.w700,
letterSpacing: -0.5,
color: AppColor.primaryColor,
),
),
const SizedBox(height: 8),
],
),
content: Column(
children: [
CupertinoButton(
padding: const EdgeInsets.all(8),
onPressed: () async {
HapticFeedback.selectionClick();
await textToSpeechController.speakText(title);
await textToSpeechController.speakText(midTitle!);
},
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color:
AppColor.primaryColor.withAlpha(26), // 0.1 opacity
borderRadius: BorderRadius.circular(8),
),
child: Icon(
CupertinoIcons.speaker_2_fill,
color: AppColor.primaryColor,
size: 24,
),
),
),
const SizedBox(height: 8),
Text(
midTitle!,
style: AppStyle.title.copyWith(
fontSize: 16,
height: 1.3,
color: Colors.black87,
),
textAlign: TextAlign.center,
),
],
),
actions: [
CupertinoDialogAction(
onPressed: () {
HapticFeedback.lightImpact();
Get.back();
},
child: Text(
'Cancel',
style: TextStyle(
color: AppColor.redColor,
fontWeight: FontWeight.w600,
fontSize: 17,
),
),
),
CupertinoDialogAction(
onPressed: () {
HapticFeedback.mediumImpact();
onPressed();
},
child: Text(
'OK'.tr,
style: TextStyle(
color: AppColor.greenColor,
fontWeight: FontWeight.w600,
fontSize: 17,
),
),
),
],
),
),
),
),
barrierDismissible: true,
barrierColor: Colors.black.withAlpha(102), // 0.4 opacity
);
}
}
class MyDialogContent extends GetxController {
void getDialog(String title, Widget? content, VoidCallback onPressed) {
final textToSpeechController = Get.put(TextToSpeechController());
HapticFeedback.mediumImpact();
Get.dialog(
TweenAnimationBuilder<double>(
duration: DialogConfig.animationDuration,
tween: Tween(begin: 0.0, end: 1.0),
builder: (context, value, child) {
return Transform.scale(
scale: 0.95 + (0.05 * value),
child: Opacity(opacity: value, child: child),
);
},
child: BackdropFilter(
filter: ImageFilter.blur(
sigmaX: DialogConfig.blurStrength,
sigmaY: DialogConfig.blurStrength,
),
child: Theme(
data: ThemeData.light().copyWith(
dialogBackgroundColor: CupertinoColors.systemBackground,
),
child: CupertinoAlertDialog(
title: Column(
children: [
Text(
title,
style: AppStyle.title.copyWith(
fontSize: 20,
fontWeight: FontWeight.w700,
letterSpacing: -0.5,
color: AppColor.primaryColor,
),
),
const SizedBox(height: 8),
],
),
content: Column(
children: [
CupertinoButton(
padding: const EdgeInsets.all(8),
onPressed: () async {
HapticFeedback.selectionClick();
await textToSpeechController.speakText(title);
},
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color:
AppColor.primaryColor.withAlpha(26), // 0.1 opacity
borderRadius: BorderRadius.circular(8),
),
child: Icon(
CupertinoIcons.headphones,
color: AppColor.primaryColor,
size: 24,
),
),
),
const SizedBox(height: 12),
content!,
],
),
actions: [
CupertinoDialogAction(
onPressed: () {
HapticFeedback.lightImpact();
Get.back();
},
child: Text(
'Cancel',
style: TextStyle(
color: AppColor.redColor,
fontWeight: FontWeight.w600,
fontSize: 17,
),
),
),
CupertinoDialogAction(
onPressed: () {
HapticFeedback.mediumImpact();
onPressed();
},
child: Text(
'OK'.tr,
style: TextStyle(
color: AppColor.greenColor,
fontWeight: FontWeight.w600,
fontSize: 17,
),
),
),
],
),
),
),
),
barrierDismissible: true,
barrierColor: Colors.black.withAlpha(102), // 0.4 opacity
);
}
}

View File

@@ -1,69 +0,0 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../constant/colors.dart';
SnackbarController mySnackeBarError(String message) {
return Get.snackbar(
'Error'.tr,
message,
backgroundColor: AppColor.redColor.withOpacity(0.9),
colorText: AppColor.secondaryColor,
icon: const Icon(Icons.error, color: AppColor.secondaryColor),
shouldIconPulse: true,
snackPosition: SnackPosition.TOP,
margin: const EdgeInsets.all(10),
borderRadius: 10,
animationDuration: const Duration(milliseconds: 500),
forwardAnimationCurve: Curves.easeOutBack,
reverseAnimationCurve: Curves.easeInBack,
titleText: Text(
'Error'.tr,
style: const TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 16,
),
),
messageText: Text(
message,
style: TextStyle(
color: Colors.white.withOpacity(0.9),
fontSize: 14,
),
),
);
}
SnackbarController mySnackbarSuccess(String message) {
return Get.snackbar(
'Success'.tr,
message,
backgroundColor: AppColor.greenColor
.withOpacity(0.9), // Assuming green color for success
colorText: AppColor.secondaryColor,
icon: const Icon(Icons.check_circle, color: AppColor.secondaryColor),
shouldIconPulse: true,
snackPosition: SnackPosition.TOP,
margin: const EdgeInsets.all(10),
borderRadius: 10,
animationDuration: const Duration(milliseconds: 500),
forwardAnimationCurve: Curves.easeOutBack,
reverseAnimationCurve: Curves.easeInBack,
titleText: Text(
'Success'.tr,
style: const TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
fontSize: 16,
),
),
messageText: Text(
message,
style: TextStyle(
color: Colors.white.withOpacity(0.9),
fontSize: 14,
),
),
);
}

View File

@@ -23,7 +23,7 @@ import package_info_plus
import path_provider_foundation import path_provider_foundation
import record_darwin import record_darwin
import sign_in_with_apple import sign_in_with_apple
import sqflite import sqflite_darwin
import url_launcher_macos import url_launcher_macos
import video_player_avfoundation import video_player_avfoundation
import wakelock_plus import wakelock_plus

View File

@@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true return true
} }
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
} }

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,7 @@ dependencies:
path: ./secure_string_operations path: ./secure_string_operations
firebase_messaging: ^15.0.3 firebase_messaging: ^15.0.3
firebase_core: ^3.2.0 firebase_core: ^3.2.0
flutter_local_notifications: ^17.2.1+2 flutter_local_notifications: ^18.0.1
google_maps_flutter: ^2.5.0 google_maps_flutter: ^2.5.0
sqflite: ^2.3.0 sqflite: ^2.3.0
path: ^1.8.3 path: ^1.8.3
@@ -28,10 +28,10 @@ dependencies:
google_polyline_algorithm: ^3.1.0 google_polyline_algorithm: ^3.1.0
animated_text_kit: ^4.2.2 animated_text_kit: ^4.2.2
flutter_secure_storage: ^9.0.0 flutter_secure_storage: ^9.0.0
geolocator: ^12.0.0 geolocator: ^13.0.2
flutter_paypal: ^0.2.0 flutter_paypal: ^0.2.0
google_fonts: ^6.2.1 google_fonts: ^6.2.1
flutter_launcher_icons: ^0.13.1 flutter_launcher_icons: ^0.14.2
flutter_rating_bar: ^4.0.1 flutter_rating_bar: ^4.0.1
flutter_font_icons: ^2.2.5 flutter_font_icons: ^2.2.5
image_picker: ^1.0.4 image_picker: ^1.0.4
@@ -41,7 +41,7 @@ dependencies:
local_auth: ^2.1.7 local_auth: ^2.1.7
# image: ^4.1.3 #to be remove # image: ^4.1.3 #to be remove
image_cropper: ^8.0.2 image_cropper: ^8.0.2
envied: ^0.5.2 envied: ^1.0.0
# cached_network_image: ^3.3.0 # cached_network_image: ^3.3.0
calendar_builder: ^0.0.6 calendar_builder: ^0.0.6
# agora_rtc_engine: ^6.2.6 # agora_rtc_engine: ^6.2.6
@@ -70,8 +70,8 @@ dependencies:
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_lints: ^4.0.0 flutter_lints: ^5.0.0
envied_generator: ^0.5.2 envied_generator: ^1.0.0
build_runner: ^2.4.6 build_runner: ^2.4.6
flutter_launcher_icons: flutter_launcher_icons: