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
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/
# IntelliJ related

View File

@@ -59,22 +59,13 @@ android {
applicationId = "com.mobileapp.store.ride"
// 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.
<<<<<<< HEAD
minSdkVersion 23
targetSdkVersion 34
versionCode 65
versionName '1.5.65'
multiDexEnabled =true
// manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml']
=======
minSdk = 23
targetSdk = flutter.targetSdkVersion
versionCode = 108
versionName = '1.6.108'
versionCode = 109
versionName = '1.6.109'
multiDexEnabled =true
// manifestPlaceholders can be specified here if needed
>>>>>>> 8813b4d
}
signingConfigs {
@@ -89,9 +80,9 @@ android {
buildTypes {
release {
signingConfig signingConfigs.release
// minifyEnabled true
// shrinkResources true
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
@@ -102,11 +93,11 @@ flutter {
dependencies {
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
// implementation platform('com.google.firebase:firebase-bom:32.1.1')
implementation "com.stripe:stripe-android:20.47.0"
implementation 'com.stripe:paymentsheet:20.47.0'
implementation "com.stripe:stripe-android:20.52.2"
implementation 'com.stripe:paymentsheet:20.52.2'
// If push provisioning is needed, make sure you have the correct version:

View File

@@ -28,3 +28,5 @@
# Keep rules for Stripe
-keep class com.stripe.android.** { *; }
-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.nonTransitiveRClass=false
android.nonFinalResIds=false
android.enableR8.fullMode=true

View File

@@ -1,58 +1,58 @@
PODS:
- AppAuth (1.7.5):
- AppAuth/Core (= 1.7.5)
- AppAuth/ExternalUserAgent (= 1.7.5)
- AppAuth/Core (1.7.5)
- AppAuth/ExternalUserAgent (1.7.5):
- AppAuth (1.7.6):
- AppAuth/Core (= 1.7.6)
- AppAuth/ExternalUserAgent (= 1.7.6)
- AppAuth/Core (1.7.6)
- AppAuth/ExternalUserAgent (1.7.6):
- AppAuth/Core
- audio_session (0.0.1):
- Flutter
- device_info_plus (0.0.1):
- Flutter
- Firebase/Auth (11.0.0):
- Firebase/Auth (11.4.0):
- Firebase/CoreOnly
- FirebaseAuth (~> 11.0.0)
- Firebase/CoreOnly (11.0.0):
- FirebaseCore (= 11.0.0)
- Firebase/Messaging (11.0.0):
- FirebaseAuth (~> 11.4.0)
- Firebase/CoreOnly (11.4.0):
- FirebaseCore (= 11.4.0)
- Firebase/Messaging (11.4.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 11.0.0)
- firebase_auth (5.2.0):
- Firebase/Auth (= 11.0.0)
- FirebaseMessaging (~> 11.4.0)
- firebase_auth (5.3.4):
- Firebase/Auth (= 11.4.0)
- firebase_core
- Flutter
- firebase_core (3.4.0):
- Firebase/CoreOnly (= 11.0.0)
- firebase_core (3.9.0):
- Firebase/CoreOnly (= 11.4.0)
- Flutter
- firebase_messaging (15.1.0):
- Firebase/Messaging (= 11.0.0)
- firebase_messaging (15.1.6):
- Firebase/Messaging (= 11.4.0)
- firebase_core
- Flutter
- FirebaseAppCheckInterop (11.5.0)
- FirebaseAuth (11.0.0):
- FirebaseAppCheckInterop (11.6.0)
- FirebaseAuth (11.4.0):
- FirebaseAppCheckInterop (~> 11.0)
- FirebaseAuthInterop (~> 11.0)
- FirebaseCore (~> 11.0)
- FirebaseCoreExtension (~> 11.0)
- FirebaseCore (~> 11.4)
- FirebaseCoreExtension (~> 11.4)
- GoogleUtilities/AppDelegateSwizzler (~> 8.0)
- GoogleUtilities/Environment (~> 8.0)
- GTMSessionFetcher/Core (~> 3.4)
- GTMSessionFetcher/Core (< 5.0, >= 3.4)
- RecaptchaInterop (~> 100.0)
- FirebaseAuthInterop (11.5.0)
- FirebaseCore (11.0.0):
- FirebaseAuthInterop (11.6.0)
- FirebaseCore (11.4.0):
- FirebaseCoreInternal (~> 11.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/Logger (~> 8.0)
- FirebaseCoreExtension (11.4.1):
- FirebaseCore (~> 11.0)
- FirebaseCoreInternal (11.5.0):
- FirebaseCoreInternal (11.6.0):
- "GoogleUtilities/NSData+zlib (~> 8.0)"
- FirebaseInstallations (11.4.0):
- FirebaseCore (~> 11.0)
- GoogleUtilities/Environment (~> 8.0)
- GoogleUtilities/UserDefaults (~> 8.0)
- PromisesObjC (~> 2.4)
- FirebaseMessaging (11.0.0):
- FirebaseMessaging (11.4.0):
- FirebaseCore (~> 11.0)
- FirebaseInstallations (~> 11.0)
- GoogleDataTransport (~> 10.0)
@@ -156,50 +156,49 @@ PODS:
- RecaptchaInterop (100.0.0)
- record_darwin (1.0.0):
- Flutter
- FlutterMacOS
- share (0.0.1):
- Flutter
- sign_in_with_apple (0.0.1):
- Flutter
- sqflite (0.0.3):
- sqflite_darwin (0.0.4):
- Flutter
- FlutterMacOS
- Stripe (23.28.3):
- StripeApplePay (= 23.28.3)
- StripeCore (= 23.28.3)
- StripePayments (= 23.28.3)
- StripePaymentsUI (= 23.28.3)
- StripeUICore (= 23.28.3)
- Stripe (23.30.0):
- StripeApplePay (= 23.30.0)
- StripeCore (= 23.30.0)
- StripePayments (= 23.30.0)
- StripePaymentsUI (= 23.30.0)
- StripeUICore (= 23.30.0)
- stripe_ios (0.0.1):
- Flutter
- Stripe (~> 23.28.0)
- StripeApplePay (~> 23.28.0)
- StripeFinancialConnections (~> 23.28.0)
- StripePayments (~> 23.28.0)
- StripePaymentSheet (~> 23.28.0)
- StripePaymentsUI (~> 23.28.0)
- StripeApplePay (23.28.3):
- StripeCore (= 23.28.3)
- StripeCore (23.28.3)
- StripeFinancialConnections (23.28.3):
- StripeCore (= 23.28.3)
- StripeUICore (= 23.28.3)
- StripePayments (23.28.3):
- StripeCore (= 23.28.3)
- StripePayments/Stripe3DS2 (= 23.28.3)
- StripePayments/Stripe3DS2 (23.28.3):
- StripeCore (= 23.28.3)
- StripePaymentSheet (23.28.3):
- StripeApplePay (= 23.28.3)
- StripeCore (= 23.28.3)
- StripePayments (= 23.28.3)
- StripePaymentsUI (= 23.28.3)
- StripePaymentsUI (23.28.3):
- StripeCore (= 23.28.3)
- StripePayments (= 23.28.3)
- StripeUICore (= 23.28.3)
- StripeUICore (23.28.3):
- StripeCore (= 23.28.3)
- Stripe (~> 23.30.0)
- StripeApplePay (~> 23.30.0)
- StripeFinancialConnections (~> 23.30.0)
- StripePayments (~> 23.30.0)
- StripePaymentSheet (~> 23.30.0)
- StripePaymentsUI (~> 23.30.0)
- StripeApplePay (23.30.0):
- StripeCore (= 23.30.0)
- StripeCore (23.30.0)
- StripeFinancialConnections (23.30.0):
- StripeCore (= 23.30.0)
- StripeUICore (= 23.30.0)
- StripePayments (23.30.0):
- StripeCore (= 23.30.0)
- StripePayments/Stripe3DS2 (= 23.30.0)
- StripePayments/Stripe3DS2 (23.30.0):
- StripeCore (= 23.30.0)
- StripePaymentSheet (23.30.0):
- StripeApplePay (= 23.30.0)
- StripeCore (= 23.30.0)
- StripePayments (= 23.30.0)
- StripePaymentsUI (= 23.30.0)
- StripePaymentsUI (23.30.0):
- StripeCore (= 23.30.0)
- StripePayments (= 23.30.0)
- StripeUICore (= 23.30.0)
- StripeUICore (23.30.0):
- StripeCore (= 23.30.0)
- TOCropViewController (2.7.4)
- uni_links (0.0.1):
- Flutter
@@ -241,7 +240,7 @@ DEPENDENCIES:
- record_darwin (from `.symlinks/plugins/record_darwin/ios`)
- share (from `.symlinks/plugins/share/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`)
- uni_links (from `.symlinks/plugins/uni_links/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
@@ -331,8 +330,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/share/ios"
sign_in_with_apple:
:path: ".symlinks/plugins/sign_in_with_apple/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/darwin"
sqflite_darwin:
:path: ".symlinks/plugins/sqflite_darwin/darwin"
stripe_ios:
:path: ".symlinks/plugins/stripe_ios/ios"
uni_links:
@@ -349,27 +348,27 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter_wkwebview/darwin"
SPEC CHECKSUMS:
AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa
AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73
audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9
firebase_auth: 16ac5db3d064db837ecd845080d7e18e4be7c66d
firebase_core: ceec591a66629daaee82d3321551692c4a871493
firebase_messaging: 15d8b557010f3bb7b98d0302e1c7c8fbcd244425
FirebaseAppCheckInterop: d265d9f4484e7ec1c591086408840fdd383d1213
FirebaseAuth: d5cf28be74d7e82257f6a3f717509eff70d3cf4a
FirebaseAuthInterop: 1219bee9b23e6ebe84c256a0d95adab53d11c331
FirebaseCore: 3cf438f431f18c12cdf2aaf64434648b63f7e383
device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342
Firebase: cf1b19f21410b029b6786a54e9764a0cacad3c99
firebase_auth: c4bdd9d7b338ac004008cb5024a643584e0ec03f
firebase_core: b62a5080210edad3f2934314a8b2c6f5124e8e10
firebase_messaging: 98619a0572d82cfb3668e78859ba9f1110e268c9
FirebaseAppCheckInterop: 347aa09a805219a31249b58fc956888e9fcb314b
FirebaseAuth: c359af98bd703cbf4293eec107a40de08ede6ce6
FirebaseAuthInterop: a919d415797d23b7bfe195a04f322b86c65020ef
FirebaseCore: e0510f1523bc0eb21653cac00792e1e2bd6f1771
FirebaseCoreExtension: f1bc67a4702931a7caa097d8e4ac0a1b0d16720e
FirebaseCoreInternal: f47dd28ae7782e6a4738aad3106071a8fe0af604
FirebaseCoreInternal: d98ab91e2d80a56d7b246856a8885443b302c0c2
FirebaseInstallations: 6ef4a1c7eb2a61ee1f74727d7f6ce2e72acf1414
FirebaseMessaging: d2d1d9c62c46dd2db49a952f7deb5b16ad2c9742
FirebaseMessaging: f8a160d99c2c2e5babbbcc90c4a3e15db036aee2
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_contacts: edb1c5ce76aa433e20e6cb14c615f4c0b66e0983
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086
flutter_local_notifications: df98d66e515e1ca797af436137b4459b160ad8c9
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
flutter_tts: 0f492aab6accf87059b72354fcb4ba934304771d
geolocator_apple: 6cbaf322953988e009e5ecb481f07efece75c450
geolocator_apple: 9bcea1918ff7f0062d98345d238ae12718acfbc1
Google-Maps-iOS-Utils: 66d6de12be1ce6d3742a54661e7a79cb317a9321
google_maps_flutter_ios: e31555a04d1986ab130f2b9f24b6cdc861acc6d3
google_sign_in_ios: 07375bfbf2620bc93a602c0e27160d6afc6ead38
@@ -385,32 +384,32 @@ SPEC CHECKSUMS:
local_auth_darwin: 66e40372f1c29f383a314c738c7446e2f7fdadc3
location: d5cf8598915965547c3f36761ae9cc4f4e87d22e
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21
record_darwin: df0a677188e5fed18472550298e675f19ddaffbe
record_darwin: 3b1a8e7d5c0cbf45ad6165b4d83a6ca643d929c3
share: 0b2c3e82132f5888bccca3351c504d0003b3b410
sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
Stripe: cdf416cf2efe286f532a6306de0fcaa0ecc8c71a
stripe_ios: 91946e5c07e0a0dc0e1484ee6659e1f90a302cf3
StripeApplePay: efb62ffc08e6cd4f161d77ddb45de2451075c54e
StripeCore: 9731f05e327c3dcaf7d7abd116840ceaa9482bbe
StripeFinancialConnections: 46c0049aaab3a179193502bce4a8096eb7b73f55
StripePayments: dd1867a620b0b8b5e294e9ff2f1f7b7770765f47
StripePaymentSheet: d155dfde74e90784d054deffb4f561a1f6dd638f
StripePaymentsUI: c24f990b03a68a7f6fe704b15dd487e7bb6b603e
StripeUICore: f2d514e900c37436dc5427fdf2c29d68ab1c2935
sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d
Stripe: 9757efc154de1d9615cbea4836d590bc4034d3a4
stripe_ios: 4463f81157e91cbbf441e1b3fdf5edce90787491
StripeApplePay: ca33933601302742623762157d587b79b942d073
StripeCore: 2af250a2366ff2bbf64d4243c5f9bbf2a98b2aaf
StripeFinancialConnections: 3ab1ef6182ec44e71c29e9a2100b663f9713ac20
StripePayments: 658a16bd34d20c8185aa281866227b9e1743300e
StripePaymentSheet: eac031f76d7fbb4f52df9b9c39be5be671ca4c07
StripePaymentsUI: 7d7cffb2ecfc0d6b5ac3a4488c02893a5ff6cc77
StripeUICore: bb102d453b1e1a10a37f810bc0a9aa0675fb17fd
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
wakelock_plus: 373cfe59b235a6dd5837d0fb88791d2f13a90d56
webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4
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:google_fonts/google_fonts.dart';
import '../main.dart';
import 'box_name.dart';
import 'colors.dart';
class AppStyle {
static TextStyle headTitle = const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 40,
color: AppColor.accentColor,
// fontFamily: box.read(BoxName.lang) == 'ar'
// // ?GoogleFonts.notoNaskhArabic().fontFamily
// ? GoogleFonts.notoNaskhArabic().fontFamily
// : GoogleFonts.roboto().fontFamily,
);
static TextStyle headTitle2 = const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22,
color: AppColor.writeColor,
// fontFamily: box.read(BoxName.lang) == 'ar'
// ? GoogleFonts.notoNaskhArabic().fontFamily
// : GoogleFonts.roboto().fontFamily
);
static TextStyle headTitle = TextStyle(
fontWeight: FontWeight.bold,
fontSize: 36,
color: AppColor.accentColor,
fontFamily: box.read(BoxName.lang) == 'ar'
// ?GoogleFonts.markaziText().fontFamily
? GoogleFonts.markaziText().fontFamily
: GoogleFonts.inter().fontFamily);
static TextStyle headTitle2 = TextStyle(
fontWeight: FontWeight.bold,
fontSize: 24,
color: AppColor.writeColor,
fontFamily: box.read(BoxName.lang) == 'ar'
? GoogleFonts.markaziText().fontFamily
: GoogleFonts.inter().fontFamily);
static TextStyle title = TextStyle(
fontWeight: FontWeight.normal,
fontSize: box.read(BoxName.lang) == 'ar' ? 14 : 16,
color: AppColor.writeColor,
// fontFamily: box.read(BoxName.lang) == 'ar'
// ? GoogleFonts.notoNaskhArabic().fontFamily
// : GoogleFonts.roboto().fontFamily
);
static TextStyle subtitle = const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 13,
color: AppColor.writeColor,
// fontFamily: box.read(BoxName.lang) == 'ar'
// ? GoogleFonts.notoNaskhArabic().fontFamily
// : GoogleFonts.roboto().fontFamily
);
fontWeight: FontWeight.normal,
fontSize: 16,
color: AppColor.writeColor,
fontFamily: box.read(BoxName.lang) == 'ar'
? GoogleFonts.markaziText().fontFamily
: GoogleFonts.inter().fontFamily);
static TextStyle subtitle = TextStyle(
fontWeight: FontWeight.bold,
fontSize: 12,
color: AppColor.writeColor,
fontFamily: box.read(BoxName.lang) == 'ar'
? GoogleFonts.markaziText().fontFamily
: GoogleFonts.inter().fontFamily);
static TextStyle number = const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14,
@@ -47,9 +43,7 @@ class AppStyle {
static BoxDecoration boxDecoration = const BoxDecoration(
boxShadow: [
BoxShadow(
color: Color.fromARGB(255, 218, 218, 255),
blurRadius: 5,
offset: Offset(2, 4)),
color: AppColor.accentColor, blurRadius: 5, offset: Offset(2, 4)),
BoxShadow(
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/views/auth/login_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:get/get.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/local/phone_intel/phone_number.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:get/get.dart';
import 'package:SEFER/constant/links.dart';
@@ -20,6 +19,7 @@ import '../../constant/box_name.dart';
import '../../main.dart';
import '../../print.dart';
import '../../views/auth/verify_email_page.dart';
import '../../views/widgets/mydialoug.dart';
import '../functions/sms_controller.dart';
class RegisterController extends GetxController {

View File

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

View File

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

View File

@@ -1,13 +1,12 @@
import 'dart:convert';
import 'dart:io';
import 'package:SEFER/constant/links.dart';
import 'package:SEFER/controller/functions/crud.dart';
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../constant/box_name.dart';
import '../../constant/info.dart';
import '../../constant/colors.dart';
import '../../main.dart';
Future<void> checkForUpdate(BuildContext context) async {
@@ -42,38 +41,120 @@ checkForBounusInvitation() {
void showUpdateDialog(BuildContext context) {
final String storeUrl = Platform.isAndroid
? 'https://play.google.com/store/apps/details?id=com.mobileapp.store.ride'
: 'https://apps.apple.com/ae/app/sefer/id6458734951';
showCupertinoDialog(
? 'https://play.google.com/store/apps/details?id=com.sefer_driver'
: 'https://apps.apple.com/ae/app/sefer-driver/id6502189302';
showGeneralDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return CupertinoAlertDialog(
title: Text('Update Available'.tr),
content: Text(
'A new version of the app is available. Please update to the latest version.'
.tr,
barrierColor: Colors.black.withOpacity(0.5),
pageBuilder: (_, __, ___) {
return BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
child: Center(
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),
onPressed: () async {
if (await canLaunchUrl(Uri.parse(storeUrl))) {
await launchUrl(Uri.parse(storeUrl));
} else {
print('Could not launch $storeUrl');
}
Navigator.of(context).pop();
},
),
CupertinoDialogAction(
child: Text('Cancel'.tr),
onPressed: () async {
Navigator.of(context).pop();
},
),
],
);
},
transitionBuilder: (_, animation, __, child) {
return ScaleTransition(
scale: CurvedAnimation(
parent: animation,
curve: Curves.easeOutCubic, // More natural curve
),
child: child,
);
},
);

View File

@@ -5,14 +5,12 @@ import 'dart:math' as math;
import 'dart:ui';
import 'package:SEFER/constant/univeries_polygon.dart';
import 'package:SEFER/controller/firebase/local_notification.dart';
import 'package:SEFER/views/widgets/mysnakbar.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_confetti/flutter_confetti.dart';
import 'package:vector_math/vector_math.dart' show radians, degrees;
import 'package:SEFER/controller/functions/tts.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:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
@@ -34,9 +32,12 @@ import '../../main.dart';
import '../../models/model/locations.dart';
import '../../models/model/painter_copoun.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/select_driver_mishwari.dart';
import '../../views/widgets/elevated_btn.dart';
import '../../views/widgets/error_snakbar.dart';
import '../../views/widgets/mydialoug.dart';
import '../firebase/firbase_messge.dart';
import '../functions/audio_record1.dart';
import '../functions/crud.dart';
@@ -565,8 +566,7 @@ class MapPassengerController extends GetxController {
}
void changeCancelRidePageShow() {
// rideConfirm == true
// ?
showCancelRideBottomSheet();
isCancelRidePageShown = !isCancelRidePageShown;
// : cancelRide();
update();
@@ -1791,16 +1791,17 @@ class MapPassengerController extends GetxController {
return;
}
driversStatusForSearchWindow = 'Your order is being prepared'.tr;
Log.print('driversStatusForSearchWindow: ${driversStatusForSearchWindow}');
Log.print('driversStatusForSearchWindow: $driversStatusForSearchWindow');
update();
await postRideDetailsToServer();
driversStatusForSearchWindow = 'Your order sent to drivers'.tr;
delayAndFetchRideStatusForAllDriverAvailable(rideId);
await notifyAvailableDrivers();
driversStatusForSearchWindow = 'The drivers are reviewing your request'.tr;
Log.print('driversStatusForSearchWindow: ${driversStatusForSearchWindow}');
Log.print('driversStatusForSearchWindow: $driversStatusForSearchWindow');
update();
delayAndFetchRideStatusForAllDriverAvailable(rideId);
// update();
}
@@ -1829,9 +1830,9 @@ class MapPassengerController extends GetxController {
}
// await postRideDetailsToServer();
await notifyAvailableDrivers();
delayAndFetchRideStatusForAllDriverAvailable(rideId);
update();
// update();
await notifyAvailableDrivers();
}
bool isDriversDataValid() {
@@ -2023,7 +2024,7 @@ class MapPassengerController extends GetxController {
tick = 0;
await addRideToNotificationDriverAvailable();
Timer.periodic(const Duration(seconds: 1), (timer) async {
if (attemptCounter >= maxAttempts || isApplied) {
if (attemptCounter >= maxAttempts || isApplied == true) {
timer.cancel();
_rideStatusStreamController.close(); // Close the stream when done
return;
@@ -2034,9 +2035,9 @@ class MapPassengerController extends GetxController {
try {
var res = await getRideStatus(rideId);
Log.print('res:2022 ${res}');
Log.print('res:2022 $res');
String rideStatusDelayed = res.toString();
Log.print('rideStatusDelayed: ${rideStatusDelayed}');
Log.print('rideStatusDelayed: $rideStatusDelayed');
_rideStatusStreamController
.add(rideStatusDelayed); // Emit the ride status
@@ -2051,6 +2052,7 @@ class MapPassengerController extends GetxController {
//
} else if (rideStatusDelayed == 'Apply' ||
rideStatusDelayed == 'Applied') {
isApplied = true;
rideAppliedFromDriver(isApplied);
timer.cancel();
// Close stream after applying
@@ -2525,7 +2527,7 @@ class MapPassengerController extends GetxController {
noCarString = false;
dataCarsLocationByPassenger = jsonDecode(res);
Log.print(
'dataCarsLocationByPassenger:getCarsLocationByPassengerAndReloadMarker ${dataCarsLocationByPassenger}');
'dataCarsLocationByPassenger:getCarsLocationByPassengerAndReloadMarker $dataCarsLocationByPassenger');
// Check if 'message' is present and not null
if (dataCarsLocationByPassenger != null &&
@@ -3084,7 +3086,7 @@ class MapPassengerController extends GetxController {
changeCancelRidePageShow();
if (rideId != 'yet') {
Log.print('cancelRide: 1');
FirebaseMessagesController().sendNotificationToDriverMAP(
await FirebaseMessagesController().sendNotificationToDriverMAP(
'Cancel Trip'.tr,
'Trip Cancelled'.tr,
driverToken.toString(),
@@ -3698,6 +3700,11 @@ class MapPassengerController extends GetxController {
controller.animateCamera(
CameraUpdate.newLatLng(passengerLocation),
);
// Future.delayed(const Duration(milliseconds: 500), () {
// markers.forEach((marker) {
// controller.showMarkerInfoWindow(marker.markerId);
// });
// });
update();
}
@@ -4011,7 +4018,7 @@ class MapPassengerController extends GetxController {
late String startNameAddress = '';
late String endNameAddress = '';
getMap(String origin, destination) async {
getDirectionMap(String origin, destination) async {
isLoading = true;
update();
remainingTime = 25; //to make cancel every call
@@ -4043,22 +4050,7 @@ class MapPassengerController extends GetxController {
isLoading = false;
newStartPointLocation = LatLng(
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'];
final points =
decodePolyline(response["routes"][0]["overview_polyline"]["points"]);
@@ -4081,31 +4073,176 @@ class MapPassengerController extends GetxController {
LatLngBounds(northeast: northeast, southwest: southwest);
// Fit the camera to the bounds
var cameraUpdate = CameraUpdate.newLatLngBounds(boundsData, 160);
var cameraUpdate = CameraUpdate.newLatLngBounds(boundsData, 100);
mapController!.animateCamera(cameraUpdate);
// getDistanceFromText(data[0]['distance']['text']);
double distanceOfTrip = (data[0]['distance']['value']) / 1000;
distance = distanceOfTrip;
durationToAdd = Duration(seconds: durationToRide);
hours = durationToAdd.inHours;
minutes = (durationToAdd.inMinutes % 60).round();
// 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) {
clearPolyline();
} else {
var polyline = Polyline(
polylineId: PolylineId(response["routes"][0]["summary"]),
points: polylineCoordinates,
width: 10,
color: Colors.blue,
);
polyLines.add(polyline);
_animatePolyline(polylineCoordinates);
rideConfirm = false;
isMarkersShown = true;
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) {
// Split the address into parts
List<String> parts = fullAddress.split('،');
@@ -4871,7 +5008,7 @@ class MapPassengerController extends GetxController {
try {
var d = jsonDecode(res);
driversForMishwari = d['message'];
Log.print('driversForMishwari: ${driversForMishwari}');
Log.print('driversForMishwari: $driversForMishwari');
update();
} catch (e) {
// Handle invalid JSON format

View File

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

View File

@@ -5,16 +5,15 @@ import 'package:SEFER/constant/colors.dart';
import 'package:SEFER/constant/links.dart';
import 'package:SEFER/controller/functions/crud.dart';
import 'package:SEFER/controller/payment/payment_controller.dart';
import 'package:SEFER/views/widgets/mysnakbar.dart';
import 'package:flutter/material.dart';
import 'package:flutter_contacts/contact.dart';
import 'package:flutter_contacts/flutter_contacts.dart';
import 'package:get/get.dart';
import 'package:share/share.dart';
import '../../../main.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 '../../notification/notification_captain_controller.dart';

View File

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

View File

@@ -8,73 +8,82 @@ import '../themes/themes.dart';
class LocaleController extends GetxController {
Locale? language;
String countryCode = '';
void restartApp() {
runApp(const MyApp());
}
ThemeData appTheme = themeEnglish;
ThemeData appTheme = lightThemeEnglish;
changeLang(String langcode) {
void changeLang(String langcode) {
Locale locale;
switch (langcode) {
case "ar":
locale = const Locale("ar");
appTheme = themeArabic;
appTheme = lightThemeArabic;
box.write(BoxName.lang, 'ar');
break;
case "en":
locale = const Locale("en");
appTheme = themeEnglish;
appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'en');
break;
case "tr":
locale = const Locale("tr");
appTheme = themeEnglish;
appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'tr');
break;
case "fr":
locale = const Locale("fr");
appTheme = themeEnglish;
appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'fr');
break;
case "it":
locale = const Locale("it");
appTheme = themeEnglish;
appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'it');
break;
case "de":
locale = const Locale("de");
appTheme = themeEnglish;
appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'de');
break;
case "el":
locale = const Locale("el");
appTheme = themeEnglish;
appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'el');
break;
case "es":
locale = const Locale("es");
appTheme = themeEnglish;
appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'es');
break;
case "fa":
locale = const Locale("fa");
appTheme = themeArabic;
appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'fa');
break;
case "zh":
locale = const Locale("zh");
appTheme = themeEnglish;
appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'zh');
break;
case "ru":
locale = const Locale("ru");
appTheme = themeEnglish;
appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'ru');
break;
case "hi":
locale = const Locale("hi");
appTheme = themeEnglish;
appTheme = lightThemeEnglish;
box.write(BoxName.lang, 'hi');
break;
default:
locale = Locale(Get.deviceLocale!.languageCode);
appTheme = themeEnglish;
box.write(BoxName.lang, Get.deviceLocale!.languageCode);
appTheme = lightThemeEnglish;
break;
}
box.write(BoxName.lang, langcode);
Get.changeTheme(appTheme);
Get.updateLocale(locale);
restartApp();
update();
}
@@ -88,7 +97,94 @@ class LocaleController extends GetxController {
}
changeLang(storedLang);
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
Map<String, Map<String, String>> get keys => {
"ar": {
"You should restart app to change language":
"يجب إعادة تشغيل التطبيق لتغيير اللغة",
"Home Page": "الصفحة الرئيسية",
"To change Language the App": "لتغيير لغة التطبيق",
"Learn more about our app and mission":
"تعرف على المزيد حول تطبيقنا ورسالتنا",
"Promos For Today": "عروض اليوم",
'Choose your ride': "اختر رحلتك",
"Your Journey Begins Here": "رحلتك تبدأ هنا",
'Bonus gift': 'بونص', "Pay": "ادفع",
"Get": "احصل على",
"Send to Driver Again": "إرسال إلى السائق مرة أخرى",
@@ -436,17 +440,74 @@ iOS [https://getapp.cc/app/6458734951]
"To : ": "إِلَى: ",
"Add Promo": "إضَافَة بَرُومُو",
"Confirm Selection": "تَأْكِيد الاخْتِيَار",
"distance is": "المَسَافَة",
"duration is": "المُدَّة",
"I don't need a ride anymore":
"لَسْتُ بِحَاجَة إِلَى رِحْلَة بَعْد الآن",
"I was just trying the application":
"كُنْتُ فَقَط أُجَرِّب التَّطْبِيق",
"No driver accepted my request": "لَمْ يَقْبَل أَيُّ سَائِق طَلَبِي",
"distance is": "المَسَافَة", "About Us": "عنّا",
"SEFER LLC": "شركة SEFER",
"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.":
"أول خدمة مشاركة ركوب في مصر، تم تطويرها بفخر من قبل مالكين عرب ومحليين. نحن نركز على أن نكون قريبين منك - سواء كنت راكبًا قيمًا أو قائدًا مخلصًا.",
"Why Choose SEFER?": "لماذا تختار SEFER؟",
"Closest to You": "الأقرب إليك",
"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 don't have a reason": "لَيْسَ لَدَيَّ سَبَب",
"Other": "آخَر",
"أضفت موقع استلام/توصيل خاطئ",
"I don't have a reason": "ليس لدي سبب",
"Other": "أخرى",
"Can we know why you want to cancel Ride ?":
"هَل يُمْكِنُنَا مَعْرِفَة سَبَب رَغْبَتِكَ فِي إلْغَاء الرِّحْلَة؟",
"Cancel Ride": "إلْغَاء الرِّحْلَة",

View File

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

View File

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

View File

@@ -3,19 +3,21 @@ import 'package:SEFER/constant/style.dart';
import '../../constant/colors.dart';
ThemeData themeEnglish = ThemeData(
fontFamily: "PlayfairDisplay",
ThemeData lightThemeEnglish = ThemeData(
brightness: Brightness.light,
fontFamily: "SFPro",
textTheme: TextTheme(
displaySmall: AppStyle.title,
displayLarge: AppStyle.title,
displayMedium: AppStyle.title,
bodyLarge: AppStyle.title,
bodyMedium: AppStyle.title),
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.title,
titleTextStyle: AppStyle.headTitle2,
),
appBarTheme: AppBarTheme(
elevation: 0,
@@ -25,35 +27,122 @@ ThemeData themeEnglish = ThemeData(
color: AppColor.primaryColor,
),
toolbarTextStyle: TextTheme(
titleSmall: AppStyle.subtitle,
headlineSmall: AppStyle.title,
titleLarge: AppStyle.headTitle2)
.bodyMedium,
titleSmall: AppStyle.subtitle,
headlineSmall: AppStyle.title,
titleLarge: AppStyle.headTitle2,
).bodyMedium,
titleTextStyle: TextTheme(
titleSmall: AppStyle.subtitle,
headlineSmall: AppStyle.title,
titleLarge: AppStyle.headTitle2)
.titleLarge,
titleSmall: AppStyle.subtitle,
headlineSmall: AppStyle.title,
titleLarge: AppStyle.headTitle2,
).titleLarge,
),
);
ThemeData themeArabic = ThemeData(
fontFamily: "Cairo",
textTheme: const TextTheme(
displayLarge: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22,
color: AppColor.primaryColor),
displayMedium: TextStyle(
fontWeight: FontWeight.bold,
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)),
ThemeData darkThemeEnglish = ThemeData(
brightness: Brightness.dark,
fontFamily: "SFPro",
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 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
)
''');
await db.execute('DROP TABLE IF EXISTS ${TableName.recentLocations}');
// await db.execute('DROP TABLE IF EXISTS ${TableName.recentLocations}');
await db.execute('''
CREATE TABLE ${TableName.recentLocations}(
id INTEGER PRIMARY KEY AUTOINCREMENT,

View File

@@ -18,65 +18,195 @@ class SplashScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor:
AppColor.secondaryColor, // Set your desired background color
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GetBuilder<SplashScreenController>(
builder: (_) {
return AnimatedBuilder(
animation: splashScreenController.animationController,
builder: (BuildContext context, Widget? child) {
return Transform.scale(
scale:
splashScreenController.animationController.value < 0.2
? splashScreenController.zoomInAnimation.value
: splashScreenController.zoomOutAnimation.value,
child: Image.asset(
'assets/images/logo.gif',
width: Get.width * .5,
body: Container(
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
AppColor.primaryColor,
// AppColor.primaryColor,
AppColor.secondaryColor,
AppColor.secondaryColor,
],
),
),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
GetBuilder<SplashScreenController>(
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),
const SizedBox(
height: 20,
),
AnimatedTextKit(animatedTexts: [
TypewriterAnimatedText(
'Powered By ${AppInformation.appName} LLC',
textStyle:
AppStyle.title.copyWith(color: AppColor.primaryColor),
speed: const Duration(milliseconds: 200),
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 40, vertical: 20),
child: Column(
children: [
Obx(() => LinearProgressIndicator(
value: splashScreenController.progress.value,
backgroundColor: AppColor.writeColor.withOpacity(0.2),
valueColor: AlwaysStoppedAnimation<Color>(
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(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
box.read(BoxName.packagInfo) ?? '1.4.61',
style: AppStyle.subtitle,
bottomNavigationBar: Padding(
padding: const EdgeInsets.only(bottom: 16.0),
child: Text(
'Version: ${box.read(BoxName.packagInfo) ?? '1.0.0'}',
style: AppStyle.subtitle.copyWith(
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/controller/auth/register_controller.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_textField.dart';
import 'package:flutter/material.dart';

View File

@@ -1,8 +1,7 @@
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/main.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
class AboutPage extends StatelessWidget {
const AboutPage({super.key});
@@ -15,136 +14,219 @@ class AboutPage extends StatelessWidget {
),
child: SafeArea(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// Company Logo
Center(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// Company Logo
Center(
child: Image.asset(
'assets/images/logo.png', // Replace with your logo image asset path
height: 100.0,
width: 100.0,
'assets/images/logo.gif', // Replace with your logo image asset path
height: 80.0,
),
),
),
const SizedBox(height: 20),
// Company Name and Location
Padding(
padding: const EdgeInsets.all(16.0),
child: Text(
'SEFER LLC\n${box.read(BoxName.countryCode).toString().tr}',
style:
CupertinoTheme.of(context).textTheme.textStyle.copyWith(
fontSize: 22.0,
fontWeight: FontWeight.bold,
),
// Company Name and Introduction
Text(
'SEFER LLC',
style: CupertinoTheme.of(context).textTheme.navTitleTextStyle,
textAlign: TextAlign.center,
),
),
// About Us Description
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:'
const SizedBox(height: 8),
Text(
'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.'
.tr,
style:
CupertinoTheme.of(context).textTheme.textStyle.copyWith(
fontSize: 16.0,
),
style: CupertinoTheme.of(context).textTheme.textStyle,
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
Padding(
padding: const EdgeInsets.symmetric(horizontal: 24.0),
child: Column(
// Nearest Availability
Row(
children: [
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: [
Row(
children: [
const Icon(CupertinoIcons.lock_fill,
color: CupertinoColors.activeBlue),
const SizedBox(width: 8.0),
Expanded(
child: Text(
'Most Secure Methods'.tr,
style: CupertinoTheme.of(context)
.textTheme
.textStyle
.copyWith(
fontSize: 16.0,
fontWeight: FontWeight.w500,
),
),
const Icon(CupertinoIcons.person_2_fill,
size: 18, color: CupertinoColors.activeGreen),
const SizedBox(width: 5),
Text(
'Lady Captains Available'.tr,
style: CupertinoTheme.of(context)
.textTheme
.textStyle
.copyWith(fontSize: 15),
),
],
),
const SizedBox(height: 8.0),
const SizedBox(height: 5),
Row(
children: [
const Icon(CupertinoIcons.phone_fill,
color: CupertinoColors.activeBlue),
const SizedBox(width: 8.0),
Expanded(
child: Text(
'In-App VOIP Calls'.tr,
style: CupertinoTheme.of(context)
.textTheme
.textStyle
.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 Icon(CupertinoIcons.recordingtape,
size: 18, color: CupertinoColors.activeGreen),
const SizedBox(width: 5),
Text(
'Recorded Trips (Voice & AI Analysis)'.tr,
style: CupertinoTheme.of(context)
.textTheme
.textStyle
.copyWith(fontSize: 15),
),
],
),
],
),
),
const SizedBox(height: 20),
// Affordability Highlight
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Text(
'\nWe also prioritize affordability, offering competitive pricing to make your rides accessible.'
.tr,
style:
CupertinoTheme.of(context).textTheme.textStyle.copyWith(
fontSize: 16.0,
fontWeight: FontWeight.w500,
),
textAlign: TextAlign.center,
// Fast Support
Row(
children: [
const Icon(CupertinoIcons.bolt_horizontal_fill,
color: CupertinoColors.systemOrange),
const SizedBox(width: 10),
Expanded(
child: Text(
'Fastest Complaint Response'.tr,
style: CupertinoTheme.of(context).textTheme.textStyle,
),
),
],
),
),
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/widgets/my_scafold.dart';
import 'package:SEFER/views/home/HomePage/contact_us.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../constant/style.dart';
class FrequentlyQuestionsPage extends StatelessWidget {
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
Widget build(BuildContext context) {
String selectedPayment = 'cash'; // Replace with your initial selection
bool canCancelRide = false;
return MyScafolld(
title: 'Frequently Questions'.tr,
body: [
Padding(
padding: const EdgeInsets.all(8.0),
child: ListView(
children: [
// Question 1: How do I request a ride?
ExpansionTile(
title: Text(
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
backgroundColor: Colors.indigo,
middle: Text(
'Frequently Asked Questions'.tr,
style: const TextStyle(color: Colors.white),
),
),
child: SafeArea(
child: ListView(
children: <Widget>[
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,
style: AppStyle.title,
),
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)?'
'Simply open the Sefer app, enter your destination, and tap "Request Ride". The app will connect you with a nearby driver.'
.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,
),
],
),
],
),
)
],
isleading: true);
CupertinoListSection.insetGrouped(
header: Text(
'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(),
CarDetailsTypeToChoose(),
const HeaderDestination(),
// const HeaderDestination(),
const BurcMoney(),
const PromoCode(),
const ApplyOrderWidget(), const MapMenuWidget(),
@@ -67,7 +67,7 @@ class MapPagePassenger extends StatelessWidget {
const VipRideBeginPassenger(),
const RideFromStartApp(),
cancelRidePage(),
// cancelRidePage(),
const MenuIconMapPageWidget(),
PointsPageForRider()
],

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

@@ -1,8 +1,10 @@
import 'package:SEFER/main.dart';
import 'package:flutter/material.dart';
import 'package:flutter_font_icons/flutter_font_icons.dart';
import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import '../../../constant/colors.dart';
import '../../../constant/table_names.dart';
import '../../../controller/functions/tts.dart';
import '../../../controller/home/map_passenger_controller.dart';
import '../../../controller/home/vip_waitting_page.dart';
@@ -99,26 +101,26 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
),
),
),
// AnimatedContainer(
// duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic,
// decoration: BoxDecoration(
// color: AppColor.secondaryColor,
// border: Border.all(),
// borderRadius: BorderRadius.circular(15)),
// child: IconButton(
// onPressed: () async {
// controller.statusRide == 'Apply' &&
// controller.isSearchingWindow == false;
// controller.update();
// },
// icon: const Icon(
// Octicons
// .telescope, // Replace this with your desired VIP icon
// size: 29,
// ),
// ),
// ),
// AnimatedContainer(
// duration: const Duration(microseconds: 200),
// width: controller.widthMapTypeAndTraffic,
// decoration: BoxDecoration(
// color: AppColor.secondaryColor,
// border: Border.all(),
// borderRadius: BorderRadius.circular(15)),
// child: IconButton(
// onPressed: () async {
// final result = await sql.getCustomQuery('''
// SELECT * FROM ${TableName.recentLocations} ORDER BY createdAt DESC
// ''');
// },
// icon: const Icon(
// Octicons
// .telescope, // Replace this with your desired VIP icon
// 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/mysnakbar.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@@ -16,7 +14,8 @@ import '../../../constant/colors.dart';
import '../../../constant/table_names.dart';
import '../../../controller/functions/toast.dart';
import '../../../controller/functions/tts.dart';
import '../../../print.dart';
import '../../widgets/error_snakbar.dart';
import '../../widgets/mydialoug.dart';
import 'form_search_start.dart';
class MainBottomMenuMap extends StatelessWidget {
@@ -352,7 +351,7 @@ class MainBottomMenuMap extends StatelessWidget {
onPressed: () async {
Get.back();
await controller.getLocation();
await controller.getMap(
await controller.getDirectionMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
'${controller.recentPlaces[index]['latitude']},${controller.recentPlaces[index]['longitude']}',
);
@@ -402,7 +401,7 @@ class MainBottomMenuMap extends StatelessWidget {
controller.newMyLocation = controller.newStartPointLocation;
controller.changeMainBottomMenuMap();
await controller.getMap(
await controller.getDirectionMap(
'${controller.newStartPointLocation.latitude},${controller.newStartPointLocation.longitude}',
'${controller.myDestination.latitude},${controller.myDestination.longitude}',
);
@@ -632,7 +631,7 @@ class FaviouratePlacesDialog extends StatelessWidget {
onPressed: () async {
Get.back();
await controller.getLocation();
await controller.getMap(
await controller.getDirectionMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.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 '../../notification/notification_page.dart';
import '../../widgets/icon_widget_menu.dart';
import '../home_page.dart';
import '../setting_page.dart';
import '../profile/passenger_profile_page.dart';
class MapMenuWidget extends StatelessWidget {
@@ -73,12 +73,12 @@ class MapMenuWidget extends StatelessWidget {
title: 'Home'.tr,
onpressed: () {
Get.to(
() => const HomePage(),
() => const SettingPage(),
transition: Transition.downToUp,
curve: Curves.easeInOutExpo,
);
},
icon: Icons.home),
icon: Icons.settings),
],
)
: const SizedBox(), // Choose the desired overlay color

View File

@@ -133,7 +133,7 @@ class PickerAnimtionContainerFormPlaces extends StatelessWidget {
TextButton(
onPressed: () async {
await controller
.getMap(
.getDirectionMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.longitude}',
'${favoritePlaces[index]['latitude']},${favoritePlaces[index]['longitude']}',
);
@@ -191,7 +191,7 @@ class PickerAnimtionContainerFormPlaces extends StatelessWidget {
MyElevatedButton(
title: 'Go to this Target'.tr,
onPressed: () async {
await controller.getMap(
await controller.getDirectionMap(
'${controller.passengerLocation.latitude},${controller.passengerLocation.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: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 {
const SearchingCaptainWindow({super.key});

View File

@@ -6,7 +6,6 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../constant/api_key.dart';
import '../../../constant/links.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/controller/functions/crud.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:get/get.dart';
import 'dart:io';
import '../../../controller/functions/audio_record1.dart';
import '../../widgets/mydialoug.dart';
class ComplaintPage extends StatelessWidget {
final ComplaintController complaintController =

View File

@@ -413,68 +413,72 @@ class CountryPickerFromSetting extends StatelessWidget {
@override
Widget build(BuildContext context) {
return GetBuilder<ProfileController>(builder: (controller) {
return Padding(
padding: const EdgeInsets.all(20.0),
child: ListView(
children: [
const SizedBox(
height: 20,
),
Text(
"Select Your Country".tr,
style: AppStyle.headTitle2,
textAlign: TextAlign.center,
),
// const SizedBox(
// height: 20,
// ),
Padding(
padding: const EdgeInsets.all(10),
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,
style: AppStyle.title,
textAlign: TextAlign.center,
),
),
SizedBox(
height: 200,
child: CupertinoPicker(
itemExtent: 32,
onSelectedItemChanged: (int index) {
controller.setCountry(countryOptions[index]);
box.write(BoxName.countryCode,
countryOptions[index]); // Save in English
},
children: List.generate(
countryOptions.length,
(index) => Center(
child: Text(
countryOptions[index]
.tr, // Display translated if not English
style: AppStyle.title,
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: Text('Select Your Country'.tr),
),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: ListView(
children: [
const SizedBox(
height: 20,
),
// Text(
// "Select Your Country".tr,
// style: AppStyle.headTitle2,
// textAlign: TextAlign.center,
// ),
// const SizedBox(
// height: 20,
// ),
Padding(
padding: const EdgeInsets.all(10),
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,
style: AppStyle.headTitle2,
textAlign: TextAlign.center,
),
),
SizedBox(
height: 200,
child: CupertinoPicker(
itemExtent: 32,
onSelectedItemChanged: (int index) {
controller.setCountry(countryOptions[index]);
box.write(BoxName.countryCode,
countryOptions[index]); // Save in English
},
children: List.generate(
countryOptions.length,
(index) => Center(
child: Text(
countryOptions[index]
.tr, // Display translated if not English
style: AppStyle.title,
),
),
),
),
),
),
),
MyElevatedButton(
title: 'Select Country'.tr, // Use translated text for button
onPressed: () async {
loginController.saveCountryCode(controller.selectedCountry
.toString()); // No conversion needed
box.write(
BoxName.countryCode, //
controller.selectedCountry); // Already saved in English
Get.snackbar(controller.selectedCountry.toString().tr, '',
backgroundColor: AppColor.greenColor);
// Get.back();//
// Get.back();
},
)
],
),
MyElevatedButton(
title: 'Select Country'.tr, // Use translated text for button
onPressed: () async {
loginController.saveCountryCode(controller.selectedCountry
.toString()); // No conversion needed
box.write(
BoxName.countryCode, //
controller.selectedCountry); // Already saved in English
Get.snackbar(controller.selectedCountry.toString().tr, '',
backgroundColor: AppColor.greenColor);
// Get.back();//
// Get.back();
},
)
],
)),
);
});
}

View File

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

View File

@@ -1,4 +1,5 @@
import 'package:SEFER/constant/style.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart';
@@ -14,238 +15,122 @@ class Language extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: GetBuilder<LocaleController>(
builder: (controller) => Center(
child: Container(
padding: const EdgeInsets.all(15),
child: ListView(
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
"Choose Language".tr,
style: Theme.of(context).textTheme.headlineLarge,
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: Text('Choose Language'.tr),
border: null,
),
child: SafeArea(
child: GetBuilder<LocaleController>(
builder: (controller) => Center(
child: Padding(
padding: const EdgeInsets.all(16),
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:get/get.dart';
import 'package:SEFER/constant/colors.dart';
import '../../constant/colors.dart';
import 'mydialoug.dart';
class MyCircleContainer extends StatelessWidget {
final Widget child;
@@ -22,6 +24,12 @@ class MyCircleContainer extends StatelessWidget {
builder: ((controller) => GestureDetector(
onTap: () {
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(
onEnd: () {

View File

@@ -1,18 +1,19 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:vibration/vibration.dart';
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/constant/colors.dart';
import 'package:SEFER/constant/style.dart';
import 'package:SEFER/main.dart';
import '../../constant/box_name.dart';
import '../../constant/colors.dart';
import '../../constant/style.dart';
import '../../main.dart';
class MyElevatedButton extends StatelessWidget {
final String title;
final VoidCallback onPressed;
final Color kolor;
final int vibrateDuration;
const MyElevatedButton({
Key? key,
required this.title,
@@ -24,22 +25,27 @@ class MyElevatedButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
bool vibrate = box.read(BoxName.isvibrate) ?? true;
return ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: kolor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0),
style: ButtonStyle(
backgroundColor: WidgetStateProperty.all(kolor),
shadowColor: WidgetStateProperty.all(Colors.transparent),
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
),
onPressed: () async {
// Handle haptic feedback for both iOS and Android
if (vibrate == true) {
if (Platform.isIOS) {
HapticFeedback.selectionClick();
} else {
} else if (Platform.isAndroid) {
await Vibration.vibrate(duration: vibrateDuration);
}
} else {}
}
// Ensure the onPressed callback is called after haptic feedback
onPressed();
},
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:SEFER/constant/style.dart';
import '../../constant/colors.dart';
import '../../constant/style.dart';
class IconWidgetMenu extends StatelessWidget {
const IconWidgetMenu({
@@ -20,7 +20,7 @@ class IconWidgetMenu extends StatelessWidget {
return InkWell(
onTap: onpressed,
child: Padding(
padding: const EdgeInsets.only(top: 1),
padding: const EdgeInsets.only(top: 25),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@@ -29,22 +29,22 @@ class IconWidgetMenu extends StatelessWidget {
decoration: const BoxDecoration(
color: AppColor.secondaryColor,
shape: BoxShape.circle,
// boxShadow: [
// BoxShadow(
// color: AppColor.secondaryColor,
// offset: Offset(-2, -2),
// blurRadius: 0,
// spreadRadius: 0,
// blurStyle: BlurStyle.outer,
// ),
// BoxShadow(
// color: AppColor.accentColor,
// offset: Offset(3, 3),
// blurRadius: 0,
// spreadRadius: 0,
// blurStyle: BlurStyle.outer,
// ),
// ],
boxShadow: [
BoxShadow(
color: AppColor.secondaryColor,
offset: Offset(-2, -2),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer,
),
BoxShadow(
color: AppColor.accentColor,
offset: Offset(3, 3),
blurRadius: 0,
spreadRadius: 0,
blurStyle: BlurStyle.outer,
),
],
),
child: Center(
child: Icon(
@@ -56,7 +56,7 @@ class IconWidgetMenu extends StatelessWidget {
),
Text(
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:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'package:SEFER/constant/box_name.dart';
import '../../constant/box_name.dart';
class MyTextForm extends StatelessWidget {
const MyTextForm({
@@ -27,7 +28,7 @@ class MyTextForm extends StatelessWidget {
children: [
Text(
label.tr,
style: const TextStyle(
style: TextStyle(
color: CupertinoColors.label,
fontSize: 16,
fontWeight: FontWeight.w600,

View File

@@ -1,34 +1,131 @@
import 'package:flutter/material.dart';
class MyCircularProgressIndicator extends StatelessWidget {
class MyCircularProgressIndicator extends StatefulWidget {
final Color backgroundColor;
final double size;
final Color progressColor;
final double strokeWidth;
const MyCircularProgressIndicator({
super.key,
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
Widget build(BuildContext context) {
return Center(
child: Container(
width: 140,
height: 140,
decoration: BoxDecoration(
color: backgroundColor,
shape: BoxShape.circle,
),
child: Stack(
children: [
const Center(child: CircularProgressIndicator()),
Image.asset(
'assets/images/logo.gif',
width: 140,
height: 140,
fit: BoxFit.contain,
child: AnimatedBuilder(
animation: _controller,
builder: (context, child) {
return Transform.scale(
scale: _scaleAnimation.value,
child: Container(
width: widget.size,
height: widget.size,
decoration: BoxDecoration(
color: widget.backgroundColor,
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: widget.progressColor.withAlpha(30),
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 record_darwin
import sign_in_with_apple
import sqflite
import sqflite_darwin
import url_launcher_macos
import video_player_avfoundation
import wakelock_plus

View File

@@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate {
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
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
firebase_messaging: ^15.0.3
firebase_core: ^3.2.0
flutter_local_notifications: ^17.2.1+2
flutter_local_notifications: ^18.0.1
google_maps_flutter: ^2.5.0
sqflite: ^2.3.0
path: ^1.8.3
@@ -28,10 +28,10 @@ dependencies:
google_polyline_algorithm: ^3.1.0
animated_text_kit: ^4.2.2
flutter_secure_storage: ^9.0.0
geolocator: ^12.0.0
geolocator: ^13.0.2
flutter_paypal: ^0.2.0
google_fonts: ^6.2.1
flutter_launcher_icons: ^0.13.1
flutter_launcher_icons: ^0.14.2
flutter_rating_bar: ^4.0.1
flutter_font_icons: ^2.2.5
image_picker: ^1.0.4
@@ -41,7 +41,7 @@ dependencies:
local_auth: ^2.1.7
# image: ^4.1.3 #to be remove
image_cropper: ^8.0.2
envied: ^0.5.2
envied: ^1.0.0
# cached_network_image: ^3.3.0
calendar_builder: ^0.0.6
# agora_rtc_engine: ^6.2.6
@@ -70,8 +70,8 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^4.0.0
envied_generator: ^0.5.2
flutter_lints: ^5.0.0
envied_generator: ^1.0.0
build_runner: ^2.4.6
flutter_launcher_icons: