25-1/4/1
This commit is contained in:
3
.env
3
.env
@@ -17,7 +17,8 @@ llamaKey=RR-EuyoFDUvfRDBj46fZKAtKJ3voM8Mt768cPeJV7GNdAkPTKdY8Odm9n4ggGqI5GyoXrXl
|
||||
serverPHP=https://api.sefer.live/sefer
|
||||
seferAlexandriaServer=https://seferalexandria.site/sefer
|
||||
seferPaymentServer=https://seferpw.shop/sefer
|
||||
seferCairoServer=https://sefer.click/sefer
|
||||
# seferCairoServer=https://sefer.click/sefer
|
||||
seferCairoServer=https://server.sefer.live/sefer.click/sefer
|
||||
seferGizaServer=https://gizasefer.online/sefer
|
||||
anthropicAIkeySeferNewHamzaayedpython=zg-qbc-qvo39-vCB-WnzEwFNArO0YlTapvfhtmguKWsXJSKqg_NZSjHBYVXMZK1yUK88SobdckV0KuPaBh0c_WHtGsRO_439PBk-e2QqgkQQXrXlBl
|
||||
|
||||
|
||||
@@ -4,16 +4,27 @@ import '../main.dart';
|
||||
import 'box_name.dart';
|
||||
|
||||
class AppLink {
|
||||
static final String seferPaymentServer0 = Env.seferPaymentServer;
|
||||
static final String seferPaymentServer = '${Env.seferPaymentServer}/ride';
|
||||
static final String seferAlexandriaServer = Env.seferAlexandriaServer;
|
||||
static final String seferCairoServer = Env.seferCairoServer;
|
||||
static const String seferGizaServer = 'https://gizasefer.online/sefer';
|
||||
static String serverPHP = box.read('serverPHP');
|
||||
static String seferCairoServer = box.read('seferCairoServer');
|
||||
static String seferGizaServer = box.read('seferGizaServer');
|
||||
static String seferAlexandriaServer = box.read('seferAlexandriaServer');
|
||||
static String seferPaymentServer = box.read('seferPaymentServer');
|
||||
static String seferPaymentServer0 = box.read('seferPaymentServer');
|
||||
// static final String seferPaymentServer0 = Env.seferPaymentServer;
|
||||
// static final String seferPaymentServer = '${Env.seferPaymentServer}/ride';
|
||||
// static final String seferAlexandriaServer = Env.seferAlexandriaServer;
|
||||
// static final String seferCairoServer = Env.seferCairoServer;
|
||||
// static final String seferCairoServer =
|
||||
// 'https://server.sefer.live/sefer.click/sefer';
|
||||
// static final String seferGizaServer = Env.seferCairoServer;
|
||||
// static final String seferAlexandriaServer = Env.seferCairoServer;
|
||||
// static final String seferPaymentServer = '${Env.seferCairoServer}/ride';
|
||||
// static final String seferPaymentServer0 = Env.seferCairoServer;
|
||||
// static const String seferGizaServer = 'https://gizasefer.online/sefer';
|
||||
// static final String seferGizaServer = Env.seferGizaServer;
|
||||
static final String endPoint = box.read(BoxName.serverChosen);
|
||||
static final String server = endPoint;
|
||||
|
||||
static final String endPoint =
|
||||
box.read(BoxName.serverChosen) ?? Env.seferCairoServer;
|
||||
static final String server = seferCairoServer;
|
||||
// static final String server = Env.serverPHP;
|
||||
|
||||
static String googleMapsLink = 'https://maps.googleapis.com/maps/api/';
|
||||
@@ -34,8 +45,8 @@ class AppLink {
|
||||
static String addTokensDriver = "$server/ride/firebase/addDriver.php";
|
||||
|
||||
//=======================Wallet===================
|
||||
static String wallet = '$seferPaymentServer/passengerWallet';
|
||||
static String walletDriver = '$seferPaymentServer/driverWallet';
|
||||
static String wallet = '$seferPaymentServer/ride/passengerWallet';
|
||||
static String walletDriver = '$seferPaymentServer/ride/driverWallet';
|
||||
static String getAllPassengerTransaction =
|
||||
"$wallet/getAllPassengerTransaction.php";
|
||||
static String getWalletByPassenger = "$wallet/getWalletByPassenger.php";
|
||||
@@ -81,6 +92,8 @@ class AppLink {
|
||||
static String getRideOrderID = "$ride/rides/getRideOrderID.php";
|
||||
static String getRideStatus = "$ride/rides/getRideStatus.php";
|
||||
static String getapiKey = "$ride/apiKey/get.php";
|
||||
static String getapiKeySefer =
|
||||
"https://api.sefer.live/sefer/ride/apiKey/get.php";
|
||||
static String getRideStatusBegin = "$ride/rides/getRideStatusBegin.php";
|
||||
static String getRideStatusFromStartApp =
|
||||
"$ride/rides/getRideStatusFromStartApp.php";
|
||||
@@ -99,26 +112,27 @@ class AppLink {
|
||||
static String addKazanPercent = "$ride/kazan/add.php";
|
||||
|
||||
////-----------------DriverPayment------------------
|
||||
static String addDrivePayment = "$seferPaymentServer/payment/add.php";
|
||||
static String addDrivePayment = "$seferPaymentServer/ride/payment/add.php";
|
||||
static String updatePaymetToPaid =
|
||||
"$seferPaymentServer/payment/updatePaymetToPaid.php";
|
||||
"$seferPaymentServer/ride/payment/updatePaymetToPaid.php";
|
||||
|
||||
static String addSeferWallet = "$seferPaymentServer/seferWallet/add.php";
|
||||
static String getSeferWallet = "$seferPaymentServer/seferWallet/get.php";
|
||||
static String addSeferWallet = "$seferPaymentServer/ride/seferWallet/add.php";
|
||||
static String getSeferWallet = "$seferPaymentServer/ride/seferWallet/get.php";
|
||||
static String addDriverPaymentPoints =
|
||||
"$seferPaymentServer/driverPayment/add.php";
|
||||
"$seferPaymentServer/ride/driverPayment/add.php";
|
||||
static String addPaymentTokenDriver =
|
||||
"$seferPaymentServer/driverWallet/addPaymentToken.php"; //driverWallet/addPaymentToken.php
|
||||
"$seferPaymentServer/ride/driverWallet/addPaymentToken.php"; //driverWallet/addPaymentToken.php
|
||||
static String addPaymentTokenPassenger =
|
||||
"$seferPaymentServer/passengerWallet/addPaymentTokenPassenger.php";
|
||||
"$seferPaymentServer/ride/passengerWallet/addPaymentTokenPassenger.php";
|
||||
static String getDriverPaymentPoints =
|
||||
"$seferPaymentServer/driverWallet/get.php";
|
||||
static String getDriverPaymentToday = "$seferPaymentServer/payment/get.php";
|
||||
"$seferPaymentServer/ride/driverWallet/get.php";
|
||||
static String getDriverPaymentToday =
|
||||
"$seferPaymentServer/ride/payment/get.php";
|
||||
static String getCountRide = "$server/ride/payment/getCountRide.php";
|
||||
static String getAllPaymentFromRide =
|
||||
"$seferPaymentServer/payment/getAllPayment.php";
|
||||
"$seferPaymentServer/ride/payment/getAllPayment.php";
|
||||
static String getAllPaymentVisa =
|
||||
"$seferPaymentServer/payment/getAllPaymentVisa.php";
|
||||
"$seferPaymentServer/ride/payment/getAllPaymentVisa.php";
|
||||
|
||||
//-----------------Passenger NotificationCaptain------------------
|
||||
static String addNotificationPassenger =
|
||||
|
||||
@@ -28,8 +28,6 @@ class CRUD {
|
||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials.toString()))}',
|
||||
},
|
||||
);
|
||||
Log.print('request: ${response.request}');
|
||||
Log.print('response: ${response.body}');
|
||||
// if (response.statusCode == 200) {
|
||||
var jsonData = jsonDecode(response.body);
|
||||
if (jsonData['status'] == 'success') {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
|
||||
import '../../constant/links.dart';
|
||||
import '../../main.dart';
|
||||
import 'crud.dart';
|
||||
|
||||
class SecureStorage {
|
||||
final FlutterSecureStorage _storage = const FlutterSecureStorage();
|
||||
|
||||
@@ -12,3 +18,45 @@ class SecureStorage {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
const List<String> keysToFetch = [
|
||||
'serverPHP',
|
||||
'seferAlexandriaServer',
|
||||
'seferPaymentServer',
|
||||
'seferCairoServer',
|
||||
'seferGizaServer',
|
||||
];
|
||||
|
||||
class AppInitializer {
|
||||
// final FlutterSecureStorage _storage = const FlutterSecureStorage();
|
||||
|
||||
Future<void> initializeApp() async {
|
||||
// Check if app is running for the first time
|
||||
|
||||
// Loop through the keys and fetch their values
|
||||
for (String key in keysToFetch) {
|
||||
try {
|
||||
String? value = await getKey(key); // Fetch from server
|
||||
if (value != null) {
|
||||
await box.write(key, value); // Save securely
|
||||
}
|
||||
} catch (e) {
|
||||
print('Error fetching or saving key $key: $e');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<String?> getKey(String key) async {
|
||||
var res =
|
||||
await CRUD().get(link: AppLink.getapiKey, payload: {"keyName": key});
|
||||
if (res != 'failure') {
|
||||
try {
|
||||
var data = jsonDecode(res)['message'];
|
||||
return data[key]?.toString();
|
||||
} catch (e) {
|
||||
print('Error parsing response for $key: $e');
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -630,72 +630,80 @@ class MapDriverController extends GetxController {
|
||||
}
|
||||
|
||||
void finishRideFromDriver1() async {
|
||||
// if (carType != 'Comfort' || carType != 'Free Ride') {
|
||||
|
||||
isRideFinished = true;
|
||||
isRideStarted = false;
|
||||
isPriceWindow = false;
|
||||
box.write(BoxName.rideStatus, 'Finished');
|
||||
// Get.find<HomeCaptainController>().changeToAppliedRide('Finished');
|
||||
// Get.find<HomeCaptainController>().update();
|
||||
totalCost = price < 20
|
||||
? carType != 'Comfort' && carType != 'Mishwar Vip' && carType != 'Lady'
|
||||
? '20'
|
||||
: '30'
|
||||
: price < double.parse(totalPricePassenger)
|
||||
? totalPricePassenger
|
||||
: carType != 'Comfort' &&
|
||||
carType != 'Mishwar Vip' &&
|
||||
carType != 'Lady'
|
||||
? totalPricePassenger
|
||||
: price.toStringAsFixed(2);
|
||||
|
||||
// Calculate totalCost more concisely
|
||||
if (price < 20) {
|
||||
totalCost = (carType == 'Comfort' ||
|
||||
carType == 'Mishwar Vip' ||
|
||||
carType == 'Lady')
|
||||
? '30'
|
||||
: '20';
|
||||
} else if (price < double.parse(totalPricePassenger)) {
|
||||
totalCost = totalPricePassenger;
|
||||
} else {
|
||||
totalCost = (carType == 'Comfort' ||
|
||||
carType == 'Mishwar Vip' ||
|
||||
carType == 'Lady')
|
||||
? price.toStringAsFixed(2)
|
||||
: totalPricePassenger;
|
||||
}
|
||||
paymentAmount = totalCost;
|
||||
box.write(BoxName.statusDriverLocation, 'off');
|
||||
// changeRideToBeginToPassenger();
|
||||
await CRUD().post(
|
||||
link: "${AppLink.seferCairoServer}/ride/rides/update.php",
|
||||
payload: {
|
||||
'id': rideId,
|
||||
'rideTimeFinish': DateTime.now().toString(),
|
||||
'status': 'Finished',
|
||||
'price': totalCost,
|
||||
});
|
||||
CRUD().post(
|
||||
link: "${AppLink.seferCairoServer}/ride/driver_order/update.php",
|
||||
payload: {
|
||||
// 'driver_id': box.read(BoxName.driverID).toString(),
|
||||
'order_id': rideId.toString(),
|
||||
'status': 'Finished'
|
||||
});
|
||||
|
||||
// Prepare data for API calls
|
||||
final nowString = DateTime.now().toString();
|
||||
final basePayload = {
|
||||
'id': rideId,
|
||||
'rideTimeFinish': nowString,
|
||||
'status': 'Finished',
|
||||
'price': totalCost,
|
||||
};
|
||||
final driverOrderPayload = {
|
||||
'order_id': rideId.toString(),
|
||||
'status': 'Finished'
|
||||
};
|
||||
|
||||
// List to hold all asynchronous operations
|
||||
List<Future<dynamic>> futures = [];
|
||||
|
||||
// API calls that can run in parallel
|
||||
futures.add(CRUD().post(
|
||||
link: "${AppLink.seferCairoServer}/ride/rides/update.php",
|
||||
payload: basePayload,
|
||||
));
|
||||
futures.add(CRUD().post(
|
||||
link: "${AppLink.seferCairoServer}/ride/driver_order/update.php",
|
||||
payload: driverOrderPayload,
|
||||
));
|
||||
|
||||
if (AppLink.endPoint != AppLink.seferCairoServer) {
|
||||
CRUD().post(
|
||||
futures.add(CRUD().post(
|
||||
link: "${AppLink.endPoint}/ride/rides/update.php",
|
||||
payload: {
|
||||
'id': rideId,
|
||||
'rideTimeFinish': DateTime.now().toString(),
|
||||
'status': 'Finished',
|
||||
'price': totalCost,
|
||||
},
|
||||
);
|
||||
CRUD().post(
|
||||
link: "${AppLink.endPoint}/ride/driver_order/update.php",
|
||||
payload: {
|
||||
// 'driver_id': box.read(BoxName.driverID).toString(),
|
||||
'order_id': rideId.toString(),
|
||||
'status': 'Finished'
|
||||
});
|
||||
payload: basePayload,
|
||||
));
|
||||
futures.add(CRUD().post(
|
||||
link: "${AppLink.endPoint}/ride/driver_order/update.php",
|
||||
payload: driverOrderPayload,
|
||||
));
|
||||
}
|
||||
|
||||
// Wallet transactions (can potentially be parallelized if independent)
|
||||
if (walletChecked == 'true') {
|
||||
paymentToken = await generateTokenPassenger(
|
||||
((-1) * double.parse(paymentAmount)).toString());
|
||||
await CRUD().post(link: AppLink.addPassengersWallet, payload: {
|
||||
futures.add(CRUD().post(link: AppLink.addPassengersWallet, payload: {
|
||||
'passenger_id': passengerId,
|
||||
'balance': ((-1) * double.parse(paymentAmount)).toString(),
|
||||
'token': paymentToken,
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
paymentToken = await generateTokenDriver(paymentAmount.toString());
|
||||
await CRUD().post(link: AppLink.addDrivePayment, payload: {
|
||||
futures.add(CRUD().post(link: AppLink.addDrivePayment, payload: {
|
||||
'rideId': rideId,
|
||||
'amount': paymentAmount,
|
||||
'payment_method':
|
||||
@@ -703,31 +711,33 @@ class MapDriverController extends GetxController {
|
||||
'passengerID': passengerId,
|
||||
'token': paymentToken,
|
||||
'driverID': box.read(BoxName.driverID).toString(),
|
||||
});
|
||||
}));
|
||||
|
||||
if (double.parse(passengerWalletBurc) < 0) {
|
||||
// for zero passenger
|
||||
var paymentToken1 = await generateTokenPassenger(
|
||||
final paymentToken1 = await generateTokenPassenger(
|
||||
((-1) * double.parse(passengerWalletBurc)).toString());
|
||||
await CRUD().post(link: AppLink.addPassengersWallet, payload: {
|
||||
futures.add(CRUD().post(link: AppLink.addPassengersWallet, payload: {
|
||||
'passenger_id': passengerId,
|
||||
'token': paymentToken1,
|
||||
'balance': ((-1) * double.parse(passengerWalletBurc)).toString()
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
double pointsSubtraction = 0;
|
||||
pointsSubtraction =
|
||||
double.parse(paymentAmount) * (-1) * .08; //for 300 from 3000
|
||||
var paymentToken2 =
|
||||
double pointsSubtraction = double.parse(paymentAmount) * (-1) * 0.08;
|
||||
final paymentToken2 =
|
||||
await generateTokenDriver((pointsSubtraction).toStringAsFixed(0));
|
||||
var res = await CRUD().post(link: AppLink.addDriversWalletPoints, payload: {
|
||||
futures.add(CRUD().post(link: AppLink.addDriversWalletPoints, payload: {
|
||||
'paymentID': 'rideId$rideId',
|
||||
'amount': (pointsSubtraction).toStringAsFixed(0),
|
||||
'paymentMethod': paymentMethod,
|
||||
'token': paymentToken2,
|
||||
'driverID': box.read(BoxName.driverID).toString(),
|
||||
});
|
||||
Future.delayed(const Duration(milliseconds: 300));
|
||||
}));
|
||||
|
||||
// Wait for all independent API calls to complete
|
||||
await Future.wait(futures);
|
||||
|
||||
// Send notification (this likely depends on previous steps)
|
||||
FirebaseMessagesController().sendNotificationToDriverMAP(
|
||||
"Driver Finish Trip".tr,
|
||||
'${'you will pay to Driver'.tr} $paymentAmount \$',
|
||||
@@ -736,20 +746,139 @@ class MapDriverController extends GetxController {
|
||||
box.read(BoxName.driverID),
|
||||
rideId,
|
||||
box.read(BoxName.tokenDriver),
|
||||
// carType == 'Comfort' || carType == 'Mishwar Vip'
|
||||
// ? price.toStringAsFixed(2)
|
||||
// : totalPassenger
|
||||
paymentAmount.toString()
|
||||
],
|
||||
'ding.wav');
|
||||
|
||||
// Navigate to the next screen (likely depends on previous steps being done)
|
||||
Get.to(() => RatePassenger(), arguments: {
|
||||
'passengerId': passengerId,
|
||||
'rideId': rideId,
|
||||
'price': paymentAmount.toString(), //price
|
||||
'price': paymentAmount.toString(),
|
||||
'walletChecked': walletChecked
|
||||
});
|
||||
// Get.back();
|
||||
}
|
||||
// void finishRideFromDriver1() async {
|
||||
// // if (carType != 'Comfort' || carType != 'Free Ride') {
|
||||
|
||||
// isRideFinished = true;
|
||||
// isRideStarted = false;
|
||||
// isPriceWindow = false;
|
||||
// box.write(BoxName.rideStatus, 'Finished');
|
||||
// // Get.find<HomeCaptainController>().changeToAppliedRide('Finished');
|
||||
// // Get.find<HomeCaptainController>().update();
|
||||
// totalCost = price < 20
|
||||
// ? carType != 'Comfort' && carType != 'Mishwar Vip' && carType != 'Lady'
|
||||
// ? '20'
|
||||
// : '30'
|
||||
// : price < double.parse(totalPricePassenger)
|
||||
// ? totalPricePassenger
|
||||
// : carType != 'Comfort' &&
|
||||
// carType != 'Mishwar Vip' &&
|
||||
// carType != 'Lady'
|
||||
// ? totalPricePassenger
|
||||
// : price.toStringAsFixed(2);
|
||||
// paymentAmount = totalCost;
|
||||
// box.write(BoxName.statusDriverLocation, 'off');
|
||||
// // changeRideToBeginToPassenger();
|
||||
// await CRUD().post(
|
||||
// link: "${AppLink.seferCairoServer}/ride/rides/update.php",
|
||||
// payload: {
|
||||
// 'id': rideId,
|
||||
// 'rideTimeFinish': DateTime.now().toString(),
|
||||
// 'status': 'Finished',
|
||||
// 'price': totalCost,
|
||||
// });
|
||||
// CRUD().post(
|
||||
// link: "${AppLink.seferCairoServer}/ride/driver_order/update.php",
|
||||
// payload: {
|
||||
// // 'driver_id': box.read(BoxName.driverID).toString(),
|
||||
// 'order_id': rideId.toString(),
|
||||
// 'status': 'Finished'
|
||||
// });
|
||||
// if (AppLink.endPoint != AppLink.seferCairoServer) {
|
||||
// CRUD().post(
|
||||
// link: "${AppLink.endPoint}/ride/rides/update.php",
|
||||
// payload: {
|
||||
// 'id': rideId,
|
||||
// 'rideTimeFinish': DateTime.now().toString(),
|
||||
// 'status': 'Finished',
|
||||
// 'price': totalCost,
|
||||
// },
|
||||
// );
|
||||
// CRUD().post(
|
||||
// link: "${AppLink.endPoint}/ride/driver_order/update.php",
|
||||
// payload: {
|
||||
// // 'driver_id': box.read(BoxName.driverID).toString(),
|
||||
// 'order_id': rideId.toString(),
|
||||
// 'status': 'Finished'
|
||||
// });
|
||||
// }
|
||||
// if (walletChecked == 'true') {
|
||||
// paymentToken = await generateTokenPassenger(
|
||||
// ((-1) * double.parse(paymentAmount)).toString());
|
||||
// await CRUD().post(link: AppLink.addPassengersWallet, payload: {
|
||||
// 'passenger_id': passengerId,
|
||||
// 'balance': ((-1) * double.parse(paymentAmount)).toString(),
|
||||
// 'token': paymentToken,
|
||||
// });
|
||||
// }
|
||||
// paymentToken = await generateTokenDriver(paymentAmount.toString());
|
||||
// await CRUD().post(link: AppLink.addDrivePayment, payload: {
|
||||
// 'rideId': rideId,
|
||||
// 'amount': paymentAmount,
|
||||
// 'payment_method':
|
||||
// walletChecked == 'true' ? "${paymentMethod}Ride" : paymentMethod,
|
||||
// 'passengerID': passengerId,
|
||||
// 'token': paymentToken,
|
||||
// 'driverID': box.read(BoxName.driverID).toString(),
|
||||
// });
|
||||
// if (double.parse(passengerWalletBurc) < 0) {
|
||||
// // for zero passenger
|
||||
// var paymentToken1 = await generateTokenPassenger(
|
||||
// ((-1) * double.parse(passengerWalletBurc)).toString());
|
||||
// await CRUD().post(link: AppLink.addPassengersWallet, payload: {
|
||||
// 'passenger_id': passengerId,
|
||||
// 'token': paymentToken1,
|
||||
// 'balance': ((-1) * double.parse(passengerWalletBurc)).toString()
|
||||
// });
|
||||
// }
|
||||
|
||||
// double pointsSubtraction = 0;
|
||||
// pointsSubtraction =
|
||||
// double.parse(paymentAmount) * (-1) * .08; //for 300 from 3000
|
||||
// var paymentToken2 =
|
||||
// await generateTokenDriver((pointsSubtraction).toStringAsFixed(0));
|
||||
// var res = await CRUD().post(link: AppLink.addDriversWalletPoints, payload: {
|
||||
// 'paymentID': 'rideId$rideId',
|
||||
// 'amount': (pointsSubtraction).toStringAsFixed(0),
|
||||
// 'paymentMethod': paymentMethod,
|
||||
// 'token': paymentToken2,
|
||||
// 'driverID': box.read(BoxName.driverID).toString(),
|
||||
// });
|
||||
// Future.delayed(const Duration(milliseconds: 300));
|
||||
// FirebaseMessagesController().sendNotificationToDriverMAP(
|
||||
// "Driver Finish Trip".tr,
|
||||
// '${'you will pay to Driver'.tr} $paymentAmount \$',
|
||||
// tokenPassenger,
|
||||
// [
|
||||
// box.read(BoxName.driverID),
|
||||
// rideId,
|
||||
// box.read(BoxName.tokenDriver),
|
||||
// // carType == 'Comfort' || carType == 'Mishwar Vip'
|
||||
// // ? price.toStringAsFixed(2)
|
||||
// // : totalPassenger
|
||||
// paymentAmount.toString()
|
||||
// ],
|
||||
// 'ding.wav');
|
||||
// Get.to(() => RatePassenger(), arguments: {
|
||||
// 'passengerId': passengerId,
|
||||
// 'rideId': rideId,
|
||||
// 'price': paymentAmount.toString(), //price
|
||||
// 'walletChecked': walletChecked
|
||||
// });
|
||||
// // Get.back();
|
||||
// }
|
||||
|
||||
void cancelCheckRideFromPassenger() async {
|
||||
var res = await CRUD().get(
|
||||
|
||||
@@ -23,6 +23,7 @@ import 'constant/notification.dart';
|
||||
import 'controller/firebase/firbase_messge.dart';
|
||||
import 'controller/firebase/local_notification.dart';
|
||||
import 'controller/functions/location_controller.dart';
|
||||
import 'controller/functions/secure_storage.dart';
|
||||
import 'controller/local/local_controller.dart';
|
||||
import 'controller/local/translations.dart';
|
||||
import 'controller/payment/paymob/paymob_wallet.dart';
|
||||
@@ -182,7 +183,8 @@ void main() async {
|
||||
userTokenExpiration: 200,
|
||||
iFrameID: 837992,
|
||||
);
|
||||
|
||||
final AppInitializer initializer = AppInitializer();
|
||||
await initializer.initializeApp();
|
||||
runApp(MyApp());
|
||||
}
|
||||
|
||||
|
||||
@@ -194,9 +194,9 @@ class WalletCaptain extends StatelessWidget {
|
||||
_buildPromoCard(
|
||||
title: 'Morning Promo'.tr,
|
||||
timePromo: 'Morning Promo',
|
||||
count: captainWalletController
|
||||
count: int.parse(captainWalletController
|
||||
.walletDate['message'][0]
|
||||
['morning_count'],
|
||||
['morning_count']),
|
||||
maxCount: 5,
|
||||
description:
|
||||
"this is count of your all trips in the morning promo today from 7:00am-10:00am"
|
||||
@@ -207,9 +207,9 @@ class WalletCaptain extends StatelessWidget {
|
||||
_buildPromoCard(
|
||||
timePromo: 'Afternoon Promo',
|
||||
title: 'Afternoon Promo'.tr,
|
||||
count: captainWalletController
|
||||
count: int.parse(captainWalletController
|
||||
.walletDate['message'][0]
|
||||
['afternoon_count'],
|
||||
['afternoon_count']),
|
||||
maxCount: 5,
|
||||
description:
|
||||
"this is count of your all trips in the Afternoon promo today from 3:00pm-6:00 pm"
|
||||
|
||||
Reference in New Issue
Block a user