This commit is contained in:
Hamza-Ayed
2024-06-28 19:10:34 +03:00
parent 929ecf39f9
commit 08d31bc4d1
67 changed files with 159 additions and 58 deletions

View File

@@ -32,7 +32,7 @@ def keystorePropertiesFile = rootProject.file('key.properties')
android {
namespace "com.mobileapp.store.ride"
compileSdkVersion 34
compileSdkVersion 33
ndkVersion flutter.ndkVersion
compileOptions {
@@ -54,7 +54,7 @@ android {
// 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.
minSdkVersion 23
targetSdkVersion flutter.targetSdkVersion
targetSdkVersion 33
versionCode 40
versionName '1.5.40'
// manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml']

View File

@@ -9,9 +9,10 @@
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
<!-- Permissions required by the SDK -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 424 B

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 850 B

After

Width:  |  Height:  |  Size: 1010 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 939 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -38,7 +38,7 @@ class GoogleSignInHelper {
if (googleUser != null) {
await _handleSignUp(googleUser);
// if (box.read(BoxName.countryCode) == 'Egypt') {
await Get.put(LoginController()).loginFromSignInGoogle(
await Get.put(LoginController()).loginUsingCredentials(
box.read(BoxName.passengerID).toString(),
box.read(BoxName.email).toString(),
);

View File

@@ -40,7 +40,7 @@ class LoginController extends GetxController {
update();
}
loginFromSignInGoogle(String passengerID, email) async {
loginUsingCredentials(String passengerID, email) async {
isloading = true;
update();
var res =

View File

@@ -5,7 +5,6 @@ import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:http/http.dart' as http;
import 'package:SEFER/controller/functions/crud.dart';
import 'package:SEFER/controller/functions/toast.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart';
@@ -125,6 +124,9 @@ 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>().update();
NotificationController().showNotification(
'Apply Order'.tr, 'Driver Applied the Ride for You'.tr, 'order1');
// driverAppliedTripSnakBar();

View File

@@ -4,7 +4,7 @@ import '../../constant/box_name.dart';
import '../../main.dart';
class HomePageController extends GetxController {
late bool isVibrate = true;
late bool isVibrate = box.read(BoxName.isvibrate) ?? true;
void changeVibrateOption(bool value) {
isVibrate = box.read(BoxName.isvibrate) ?? true;

View File

@@ -7,8 +7,6 @@ import 'package:SEFER/views/auth/login_page.dart';
import '../../constant/box_name.dart';
import '../../main.dart';
import '../../onbording_page.dart';
import '../../views/home/map_page_passenger.dart';
import '../auth/google_sign.dart';
import '../auth/login_controller.dart';
class SplashScreenController extends GetxController
@@ -52,7 +50,7 @@ class SplashScreenController extends GetxController
box.read(BoxName.phone) != null &&
box.read(BoxName.isVerified) == '1'
// ? Get.off(() => const MapPagePassenger())
? await Get.put(LoginController()).loginFromSignInGoogle(
? await Get.put(LoginController()).loginUsingCredentials(
box.read(BoxName.passengerID).toString(),
box.read(BoxName.email).toString(),
)

View File

@@ -142,7 +142,9 @@ class PaymobPaymentWallet {
}) async {
final Map<String, dynamic> data = {
"source": {
"identifier": "01010101010", // Replace with actual source identifier
"identifier": box
.read(BoxName.phone)
.toString(), // Replace with actual source identifier
"subtype": "WALLET",
},
"payment_token": paymentToken,

View File

@@ -1,5 +1,7 @@
import 'dart:io';
import 'package:SEFER/controller/home/map_passenger_controller.dart';
import 'package:SEFER/views/widgets/my_dialog.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
@@ -86,8 +88,13 @@ class LoginPage extends StatelessWidget {
if (user != null) {
box.write(BoxName.passengerID, user.uid);
box.write(BoxName.email, user.email);
await GoogleSignInHelper
.signInFromLogin();
await Get.put(LoginController())
.loginUsingCredentials(
box
.read(BoxName.passengerID)
.toString(),
box.read(BoxName.email).toString(),
);
// Navigate to another screen or perform other actions
} else {}
},
@@ -265,7 +272,7 @@ class LoginPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
'We use location to get accurate and nearest driver for you'
'We use your precise location to find the nearest available driver and provide accurate pickup and dropoff information. You can manage this in Settings.'
.tr,
textAlign: TextAlign.center,
style: AppStyle.title,
@@ -273,7 +280,19 @@ class LoginPage extends StatelessWidget {
MyElevatedButton(
title: 'Next'.tr,
onPressed: () async {
// if (box.read(BoxName.locationPermission) != 'true') {
// Get.put(MyDialog()).getDialog(
// 'Location Permission is requiered for find drivers'
// .tr,
// 'You can just manage your account!'.tr, () {
// Get.back();
// Get.to(() {
// PassengerProfilePage();
// });
// });
// } else {
await controller.getLocationPermission();
// }
},
kolor: AppColor.greenColor,
)

View File

@@ -37,7 +37,7 @@ class SearchingCaptainWindow extends StatelessWidget {
),
Text(
"We are searching for the nearest driver to you".tr,
style: AppStyle.headTitle2,
style: AppStyle.title,
),
Text(
'please wait till driver accept your order'.tr,
@@ -192,18 +192,26 @@ Widget _buildTimer(MapPassengerController mapPassengerController) {
return Stack(
children: [
Center(
child: CircularProgressIndicator(
value: progress, // Use calculated progress
color: AppColor.blueColor,
backgroundColor: AppColor.yellowColor,
SizedBox(
height: 35,
width: 35,
child: Center(
child: CircularProgressIndicator(
value: progress, // Use calculated progress
color: AppColor.blueColor,
backgroundColor: AppColor.yellowColor,
),
),
),
Center(
child: Text(
'${snapshot.data} ', // Display elapsed time
style: AppStyle.title.copyWith(
color: AppColor.greenColor), // Adjust color for timer
SizedBox(
height: 35,
width: 35,
child: Center(
child: Text(
'${snapshot.data} ', // Display elapsed time
style: AppStyle.title.copyWith(
color: AppColor.greenColor), // Adjust color for timer
),
),
)
],

View File

@@ -23,7 +23,7 @@ class MyElevatedButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final bool vibrate = box.read(BoxName.isvibrate) ?? true;
bool vibrate = box.read(BoxName.isvibrate) ?? true;
return ElevatedButton(
style: ElevatedButton.styleFrom(
@@ -33,7 +33,7 @@ class MyElevatedButton extends StatelessWidget {
),
),
onPressed: () async {
if (vibrate) {
if (vibrate == true) {
if (Platform.isIOS) {
HapticFeedback.selectionClick();
} else {

View File

@@ -0,0 +1,43 @@
import 'dart:ui';
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.defaultDialog(
title: title,
titleStyle: AppStyle.title,
middleTextStyle: AppStyle.title,
content: Column(
children: [
IconButton(
onPressed: () async {
await textToSpeechController.speakText(title ?? midTitle!);
},
icon: const Icon(Icons.headphones)),
Text(
midTitle!,
style: AppStyle.title,
)
],
),
confirm: MyElevatedButton(
title: 'Ok'.tr,
onPressed: onPressed,
kolor: AppColor.greenColor,
),
cancel: MyElevatedButton(
title: 'Cancel',
kolor: AppColor.redColor,
onPressed: () {
Get.back();
}));
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 872 B

After

Width:  |  Height:  |  Size: 1005 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -41,6 +41,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.2.2"
archive:
dependency: transitive
description:
name: archive
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
url: "https://pub.dev"
source: hosted
version: "3.6.1"
args:
dependency: transitive
description:
@@ -193,6 +201,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.7.4"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19
url: "https://pub.dev"
source: hosted
version: "0.4.1"
clock:
dependency: transitive
description:
@@ -470,6 +486,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.7"
flutter_launcher_icons:
dependency: "direct main"
description:
name: flutter_launcher_icons
sha256: "526faf84284b86a4cb36d20a5e45147747b7563d921373d4ee0559c54fcdbcea"
url: "https://pub.dev"
source: hosted
version: "0.13.1"
flutter_lints:
dependency: "direct dev"
description:
@@ -928,6 +952,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.2"
image:
dependency: transitive
description:
name: image
sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8"
url: "https://pub.dev"
source: hosted
version: "4.2.0"
image_cropper:
dependency: "direct main"
description:

View File

@@ -1,12 +1,11 @@
name: SEFER
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: '>=3.0.5 <4.0.0'
sdk: ">=3.0.5 <4.0.0"
dependencies:
flutter:
@@ -14,7 +13,7 @@ dependencies:
cupertino_icons: ^1.0.2
firebase_messaging: ^14.6.7
firebase_core: ^2.15.0
flutter_local_notifications: ^16.2.0
flutter_local_notifications: ^16.2.0
google_maps_flutter: ^2.5.0
sqflite: ^2.3.0
path: ^1.8.3
@@ -30,25 +29,25 @@ dependencies:
geolocator: ^10.0.0
flutter_paypal: ^0.2.0
google_fonts: ^4.0.4
# flutter_launcher_icons: ^0.13.1
flutter_launcher_icons: #^0.13.1
flutter_rating_bar: ^4.0.1
flutter_font_icons: ^2.2.5
image_picker: ^1.0.4
flutter_stripe: ^9.5.0+1
# camera: ^0.10.5+5 #to be remove
# camera: ^0.10.5+5 #to be remove
flutter_widget_from_html: ^0.14.6
local_auth: ^2.1.7
# image: ^4.1.3 #to be remove
# image: ^4.1.3 #to be remove
image_cropper: ^4.0.1
envied: ^0.5.2
# cached_network_image: ^3.3.0
# cached_network_image: ^3.3.0
calendar_builder: ^0.0.6
agora_rtc_engine: ^6.2.6
flutter_tts: ^3.8.5
permission_handler: ^11.3.0
# google_generative_ai: ^0.0.1-dev
# google_generative_ai: ^0.0.1-dev
vibration: ^1.8.4
wakelock_plus:
wakelock_plus:
record: ^5.0.5
dio: ^5.4.3+1
webview_flutter: ^4.7.0
@@ -58,9 +57,6 @@ dependencies:
sign_in_with_apple: ^6.1.0
firebase_auth: ^4.19.6
dev_dependencies:
flutter_test:
sdk: flutter
@@ -68,23 +64,23 @@ dev_dependencies:
envied_generator: ^0.5.2
build_runner: ^2.4.6
#flutter_launcher_icons:
# android: "launcher_icon"
# ios: true
# image_path: "assets/images/logo.png"
# min_sdk_android: 21
# web:
# generate: true
# image_path: "assets/images/logo.png"
# background_color: "#hexcode"
# theme_color: "#hexcode"
# windows:
# generate: true
# image_path: "assets/images/logo.png"
# icon_size: 48
# macos:
# generate: true
# image_path: "assets/images/logo.png"
flutter_launcher_icons:
android: "launcher_icon"
ios: true
image_path: "assets/images/logo.png"
min_sdk_android: 21
web:
generate: true
image_path: "assets/images/logo.png"
background_color: "#hexcode"
theme_color: "#hexcode"
windows:
generate: true
image_path: "assets/images/logo.png"
icon_size: 48
macos:
generate: true
image_path: "assets/images/logo.png"
flutter:
uses-material-design: true
@@ -103,4 +99,4 @@ flutter:
- asset: assets/fonts/josefin.ttf
- family: digit
fonts:
- asset: assets/fonts/digit.ttf
- asset: assets/fonts/digit.ttf

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB