2/22/1
This commit is contained in:
@@ -10,9 +10,7 @@ import 'package:SEFER/controller/functions/crud.dart';
|
||||
import 'package:SEFER/controller/functions/secure_storage.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/views/auth/captin/verify_email_captain.dart';
|
||||
import 'package:SEFER/views/auth/verify_email_page.dart';
|
||||
import 'package:SEFER/views/home/Captin/home_captain/home_captin.dart';
|
||||
import 'package:SEFER/views/home/map_page_passenger.dart';
|
||||
|
||||
class LoginCaptinController extends GetxController {
|
||||
final formKey = GlobalKey<FormState>();
|
||||
|
||||
@@ -13,7 +13,6 @@ import 'package:SEFER/views/auth/captin/verify_email_captain.dart';
|
||||
|
||||
import '../../../views/auth/captin/ai_page.dart';
|
||||
import '../../../views/auth/captin/car_license_page.dart';
|
||||
import '../../../views/auth/verify_email_page.dart';
|
||||
|
||||
class RegisterCaptainController extends GetxController {
|
||||
final formKey = GlobalKey<FormState>();
|
||||
|
||||
@@ -31,7 +31,7 @@ class RegisterController extends GetxController {
|
||||
|
||||
getBirthDate() {
|
||||
Get.defaultDialog(
|
||||
title: 'Select Date',
|
||||
title: 'Select Date'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
content: SizedBox(
|
||||
width: 300,
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:get/get.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../../constant/box_name.dart';
|
||||
import '../../constant/credential.dart';
|
||||
import '../../constant/links.dart';
|
||||
import '../../main.dart';
|
||||
|
||||
@@ -35,7 +34,7 @@ class TokenController extends GetxController {
|
||||
var jsonToken = jsonDecode(res.body);
|
||||
// print(jsonToken);
|
||||
if (jsonToken['status'] == 'The token has been updated successfully.') {
|
||||
Get.snackbar('token updated', 'message');
|
||||
Get.snackbar('token updated'.tr, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:SEFER/controller/functions/crud.dart';
|
||||
@@ -18,10 +17,10 @@ import '../../main.dart';
|
||||
import '../../views/Rate/rate_captain.dart';
|
||||
import '../../views/home/Captin/home_captain/home_captin.dart';
|
||||
import '../../views/home/map_page_passenger.dart';
|
||||
import '../../views/home/map_widget.dart/call_passenger_page.dart';
|
||||
import '../../views/home/profile/promos_passenger_page.dart';
|
||||
import '../../views/home/Captin/orderCaptin/order_request_page.dart';
|
||||
import '../home/map_passenger_controller.dart';
|
||||
import '../home/payment/captain_wallet_controller.dart';
|
||||
import '../payment/payment_controller.dart';
|
||||
import 'local_notification.dart';
|
||||
|
||||
@@ -150,7 +149,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
driverID = myList[2].toString();
|
||||
|
||||
NotificationController().showNotification(
|
||||
'Apply Order', 'Driver Applied the Ride for You'.tr, 'order');
|
||||
'Apply Order'.tr, 'Driver Applied the Ride for You'.tr, 'order');
|
||||
// driverAppliedTripSnakBar();
|
||||
} else if (message.notification!.title! == 'Promo') {
|
||||
NotificationController()
|
||||
@@ -203,6 +202,19 @@ class FirebaseMessagesController extends GetxController {
|
||||
'rideId': driverList[1].toString(),
|
||||
});
|
||||
}
|
||||
} else if (message.notification!.title! == 'Call Income') {
|
||||
var myListString = message.data['passengerList'];
|
||||
var driverList = jsonDecode(myListString) as List<dynamic>;
|
||||
NotificationController().showNotification(
|
||||
'Driver Finish Trip'.tr,
|
||||
message.notification!.body!,
|
||||
'order',
|
||||
);
|
||||
Get.to(() => PassengerCallPage(
|
||||
channelName: driverList[1].toString(),
|
||||
token: driverList[0].toString(),
|
||||
remoteID: driverList[2].toString(),
|
||||
));
|
||||
} else if (message.notification!.title! == 'Driver Cancel Your Trip') {
|
||||
// Get.snackbar(
|
||||
// 'You will be pay the cost to driver or we will get it from you on next trip'
|
||||
@@ -222,7 +234,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
SnackbarController driverAppliedTripSnakBar() {
|
||||
return Get.snackbar(
|
||||
'Driver Applied the Ride for You'.tr,
|
||||
'message',
|
||||
'',
|
||||
colorText: AppColor.greenColor,
|
||||
duration: const Duration(seconds: 3),
|
||||
snackPosition: SnackPosition.TOP,
|
||||
@@ -302,7 +314,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
if (res != 'failure') {
|
||||
FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||
'You Have Tips',
|
||||
'${tip.toString()}\$ tips\nTotal is ${tip + (Get.find<MapPassengerController>().totalPassenger)}',
|
||||
'${'${tip.toString()}\$${' tips\nTotal is'.tr}'} ${tip + (Get.find<MapPassengerController>().totalPassenger)}',
|
||||
driverList[2].toString(),
|
||||
);
|
||||
}
|
||||
@@ -518,7 +530,7 @@ class DriverTipWidget extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Your fee is ${Get.find<MapPassengerController>().totalPassenger.toStringAsFixed(2)}'),
|
||||
'${'Your fee is '.tr}${Get.find<MapPassengerController>().totalPassenger.toStringAsFixed(2)}'),
|
||||
Text('Do you want to pay Tips for this Driver'.tr),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
@@ -528,7 +540,7 @@ class DriverTipWidget extends StatelessWidget {
|
||||
box.write(BoxName.tipPercentage, '0.05');
|
||||
Toast.show(
|
||||
context,
|
||||
'Tip is ${(Get.find<MapPassengerController>().totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))}',
|
||||
'${'Tip is '.tr}${(Get.find<MapPassengerController>().totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))}',
|
||||
AppColor.blueColor);
|
||||
},
|
||||
child: Container(
|
||||
@@ -546,7 +558,7 @@ class DriverTipWidget extends StatelessWidget {
|
||||
box.write(BoxName.tipPercentage, '0.10');
|
||||
Toast.show(
|
||||
context,
|
||||
'Tip is ${(Get.find<MapPassengerController>().totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))}',
|
||||
'${'Tip is'.tr} ${(Get.find<MapPassengerController>().totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))}',
|
||||
AppColor.blueColor);
|
||||
},
|
||||
child: Container(
|
||||
@@ -564,7 +576,7 @@ class DriverTipWidget extends StatelessWidget {
|
||||
box.write(BoxName.tipPercentage, '0.15');
|
||||
Toast.show(
|
||||
context,
|
||||
'Tip is ${(Get.find<MapPassengerController>().totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))}',
|
||||
'${'Tip is'.tr} ${(Get.find<MapPassengerController>().totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))}',
|
||||
AppColor.blueColor);
|
||||
},
|
||||
child: Container(
|
||||
@@ -582,7 +594,7 @@ class DriverTipWidget extends StatelessWidget {
|
||||
box.write(BoxName.tipPercentage, '0.20');
|
||||
Toast.show(
|
||||
context,
|
||||
'Tip is ${(Get.find<MapPassengerController>().totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))}',
|
||||
'${'Tip is'.tr} ${(Get.find<MapPassengerController>().totalPassenger) * (double.parse(box.read(BoxName.tipPercentage.toString())))}',
|
||||
AppColor.blueColor);
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@@ -5,7 +5,6 @@ import 'package:camera/camera.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:google_mlkit_text_recognition/google_mlkit_text_recognition.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/constant/credential.dart';
|
||||
import 'package:SEFER/constant/links.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
import 'package:path_provider/path_provider.dart' as path_provider;
|
||||
@@ -47,7 +46,7 @@ class CameraClassController extends GetxController {
|
||||
title: 'Camera Access Denied.'.tr,
|
||||
middleText: '',
|
||||
confirm:
|
||||
MyElevatedButton(title: 'Open Settings', onPressed: () {}),
|
||||
MyElevatedButton(title: 'Open Settings'.tr, onPressed: () {}),
|
||||
);
|
||||
break;
|
||||
default:
|
||||
@@ -72,7 +71,7 @@ class CameraClassController extends GetxController {
|
||||
await capturedImage.saveTo(imagePath);
|
||||
await uploadImage(File(capturedImage.path));
|
||||
|
||||
extractByAPI(AppLink.server + '/card_image/' + box.read(BoxName.driverID));
|
||||
extractByAPI('${AppLink.server}/card_image/' + box.read(BoxName.driverID));
|
||||
}
|
||||
|
||||
Future extractByAPI(String imgUrl) async {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import 'dart:convert';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:SEFER/env/env.dart';
|
||||
@@ -41,15 +43,17 @@ class CRUD {
|
||||
}
|
||||
}
|
||||
|
||||
Future<dynamic> getAgora({
|
||||
Future<dynamic> getAgoraToken({
|
||||
required String channelName,
|
||||
required String uid,
|
||||
}) async {
|
||||
var res = await http
|
||||
.get(Uri.parse('http://localhost:8080/token?channelName=$channelName'));
|
||||
var uid = box.read(BoxName.phone) ?? box.read(BoxName.phoneDriver);
|
||||
var res = await http.get(Uri.parse(
|
||||
'https://repulsive-pig-rugby-shirt.cyclic.app/token?channelName=$channelName'));
|
||||
|
||||
if (res.statusCode == 200) {
|
||||
var response = jsonDecode(res.body);
|
||||
print(await response.stream.bytesToString());
|
||||
print(await response);
|
||||
return response['token'];
|
||||
} else {
|
||||
print(res.reasonPhrase);
|
||||
|
||||
@@ -27,7 +27,7 @@ class LocationController extends GetxController {
|
||||
getLocation();
|
||||
// myLocation=getLocation();
|
||||
|
||||
totalPoints = Get.find<CaptainWalletController>().totalPoints;
|
||||
totalPoints = Get.put(CaptainWalletController()).totalPoints;
|
||||
}
|
||||
|
||||
void startLocationUpdates() async {
|
||||
@@ -36,7 +36,7 @@ class LocationController extends GetxController {
|
||||
totalPoints = Get.find<CaptainWalletController>().totalPoints;
|
||||
|
||||
// if (isActive) {
|
||||
if (double.parse(totalPoints) > -100) {
|
||||
if (double.parse(totalPoints) > -500) {
|
||||
print('total point is $totalPoints');
|
||||
await getLocation();
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class LogOutController extends GetxController {
|
||||
|
||||
Future deleteMyAccountDriver(String id) async {
|
||||
await CRUD().post(link: AppLink.removeUser, payload: {'id': id}).then(
|
||||
(value) => Get.snackbar('Deleted', 'Your Account is Deleted',
|
||||
(value) => Get.snackbar('Deleted'.tr, 'Your Account is Deleted',
|
||||
backgroundColor: AppColor.redColor));
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'package:get/get.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:SEFER/constant/api_key.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/info.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
@@ -15,6 +14,7 @@ import 'package:SEFER/constant/table_names.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../constant/box_name.dart';
|
||||
import '../../constant/links.dart';
|
||||
import '../auth/captin/register_captin_controller.dart';
|
||||
import 'launch.dart';
|
||||
@@ -382,16 +382,16 @@ class ScanDocumentsByApi extends GetxController {
|
||||
middleText: 'if you want help you can email us here'.tr,
|
||||
middleTextStyle: AppStyle.title,
|
||||
cancel: MyElevatedButton(
|
||||
title: 'Thanks',
|
||||
title: 'Thanks'.tr,
|
||||
kolor: AppColor.greenColor,
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Email Us',
|
||||
title: 'Email Us'.tr,
|
||||
kolor: AppColor.yellowColor, //
|
||||
onPressed: () {
|
||||
launchCommunication('email', 'support@mobile-app.store',
|
||||
'Hi ${AppInformation.appName}\nI cant register in your app in face detection ');
|
||||
'${'Hi'.tr} ${AppInformation.appName}\n${'I cant register in your app in face detection '.tr}');
|
||||
Get.back();
|
||||
},
|
||||
));
|
||||
@@ -461,8 +461,7 @@ class ScanDocumentsByApi extends GetxController {
|
||||
),
|
||||
res['data']['result'].toString() == 'Different'
|
||||
? Text(
|
||||
'Be sure for take accurate images please\nYou have $times from 3 times Take Attention'
|
||||
.tr,
|
||||
'${'Be sure for take accurate images please\nYou have'.tr} $times ${'from 3 times Take Attention'.tr}',
|
||||
style: AppStyle.title,
|
||||
)
|
||||
: Text(
|
||||
@@ -519,8 +518,7 @@ class ScanDocumentsByApi extends GetxController {
|
||||
'Authorization':
|
||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
||||
});
|
||||
request.fields['driverID'] =
|
||||
'bnbn'; // box.read(BoxName.driverID).toString();
|
||||
request.fields['driverID'] = box.read(BoxName.driverID).toString();
|
||||
|
||||
var response = await request.send();
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_tts/flutter_tts.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -20,7 +21,9 @@ class TextToSpeechController extends GetxController {
|
||||
|
||||
// Function to initialize TTS engine
|
||||
Future<void> initTts() async {
|
||||
await flutterTts.setLanguage('en-US'); // Set language
|
||||
String? lang =
|
||||
WidgetsBinding.instance.platformDispatcher.locale.countryCode;
|
||||
await flutterTts.setLanguage(lang!); //'en-US' Set language
|
||||
await flutterTts.setSpeechRate(0.5); // Adjust speech rate
|
||||
await flutterTts.setVolume(1.0); // Set volume
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class HelpController extends GetxController {
|
||||
titleStyle: AppStyle.title,
|
||||
middleText: '',
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Back',
|
||||
title: 'Back'.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
Get.back();
|
||||
|
||||
@@ -56,7 +56,7 @@ class HomeCaptainController extends GetxController {
|
||||
|
||||
isActive = !isActive;
|
||||
if (isActive) {
|
||||
if (double.parse(totalPoints) > -100) {
|
||||
if (double.parse(totalPoints) > -500) {
|
||||
locationController.startLocationUpdates();
|
||||
activeStartTime = DateTime.now();
|
||||
activeTimer = Timer.periodic(const Duration(seconds: 1), (timer) {
|
||||
|
||||
@@ -44,6 +44,7 @@ class MapDriverController extends GetxController {
|
||||
late String step3;
|
||||
late String step4;
|
||||
late String passengerWalletBurc;
|
||||
late String timeOfOrder;
|
||||
late String duration;
|
||||
late String totalCost;
|
||||
late String distance;
|
||||
@@ -365,7 +366,7 @@ class MapDriverController extends GetxController {
|
||||
if (res != 'failure') {
|
||||
Get.snackbar(
|
||||
'You will get cost of your work for this trip'.tr,
|
||||
'you gain $cost \$ in your wallet',
|
||||
'${'you gain'.tr} $cost \$${' in your wallet'.tr}',
|
||||
backgroundColor: AppColor.deepPurpleAccent,
|
||||
);
|
||||
}
|
||||
@@ -733,6 +734,7 @@ class MapDriverController extends GetxController {
|
||||
step3 = Get.arguments['step3'];
|
||||
step4 = Get.arguments['step4'];
|
||||
passengerWalletBurc = Get.arguments['passengerWalletBurc'];
|
||||
timeOfOrder = Get.arguments['timeOfOrder'];
|
||||
|
||||
var coords = passengerLocation.split(',');
|
||||
var coordDestination = passengerDestination.split(',');
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
||||
import 'package:SEFER/views/home/Captin/home_captain/call_controller.dart';
|
||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||
|
||||
import '../../../../constant/box_name.dart';
|
||||
import '../../../../main.dart';
|
||||
|
||||
class CallPage extends StatelessWidget {
|
||||
@@ -15,83 +16,83 @@ class CallPage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text(''),
|
||||
),
|
||||
body: callPage());
|
||||
return MyScafolld(title: 'Call Page', isleading: true, body: [callPage()]);
|
||||
}
|
||||
}
|
||||
|
||||
GetBuilder<HomeCaptainController> callPage() {
|
||||
CallController callController = Get.put(CallController());
|
||||
Get.put(MapDriverController());
|
||||
callController.initAgoraFull();
|
||||
return GetBuilder<HomeCaptainController>(
|
||||
builder: (controller) => controller.isCallOn == false
|
||||
? Center(
|
||||
child: Container(
|
||||
height: 100,
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
// FirebaseMessagesController()
|
||||
// .sendNotificationToPassengerToken(
|
||||
// 'Call Income'.tr,
|
||||
// 'You have call from driver ${box.read(BoxName.nameDriver)}',
|
||||
// // Get.find<MapDriverController>().tokenPassenger,
|
||||
// '',
|
||||
// [],
|
||||
// );
|
||||
await callController.initAgoraFull();
|
||||
callController.join();
|
||||
},
|
||||
child: Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle, color: AppColor.greenColor),
|
||||
child: const Icon(
|
||||
Icons.phone,
|
||||
size: 35,
|
||||
color: AppColor.secondaryColor,
|
||||
)),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(callController.status),
|
||||
Text(
|
||||
'passenger name'), //Get.find<MapDriverController>().passengerId.toString()),
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Call End'.tr,
|
||||
'Call End',
|
||||
Get.find<MapDriverController>().tokenPassenger,
|
||||
[],
|
||||
);
|
||||
callController.leave();
|
||||
},
|
||||
child: Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle, color: AppColor.redColor),
|
||||
child: const Icon(
|
||||
Icons.phone_disabled_sharp,
|
||||
size: 35,
|
||||
color: AppColor.secondaryColor,
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
// ignore: prefer_const_constructors
|
||||
builder: (controller) => Positioned(
|
||||
top: Get.height * .2,
|
||||
child: Container(
|
||||
height: 100, width: Get.width,
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
// await callController.initAgoraFull();
|
||||
// callController.join();
|
||||
FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||
'Call Income',
|
||||
'You have call from driver ${box.read(BoxName.nameDriver)}',
|
||||
Get.find<MapDriverController>().tokenPassenger,
|
||||
[
|
||||
callController.token,
|
||||
callController.channelName,
|
||||
callController.uid.toString(),
|
||||
callController.remoteUid.toString(),
|
||||
],
|
||||
);
|
||||
callController.join();
|
||||
},
|
||||
child: Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle, color: AppColor.greenColor),
|
||||
child: const Icon(
|
||||
Icons.phone,
|
||||
size: 35,
|
||||
color: AppColor.secondaryColor,
|
||||
)),
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
Column(
|
||||
children: [
|
||||
Text(callController.status),
|
||||
Text(Get.find<MapDriverController>().name.toString()),
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||
'Call End'.tr,
|
||||
'Call End',
|
||||
Get.find<MapDriverController>().tokenPassenger,
|
||||
[],
|
||||
);
|
||||
callController.leave();
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle, color: AppColor.redColor),
|
||||
child: const Icon(
|
||||
Icons.phone_disabled_sharp,
|
||||
size: 35,
|
||||
color: AppColor.secondaryColor,
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
// ignore: prefer_const_constructors
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -25,29 +25,29 @@ class ConnectWidget extends StatelessWidget {
|
||||
builder: (homeCaptainController) => int.parse(
|
||||
orderRequestController.countRefuse) >
|
||||
3 ||
|
||||
double.parse(captainWalletController.totalPoints) < -100
|
||||
double.parse(captainWalletController.totalPoints) < -500
|
||||
? CupertinoButton(
|
||||
onPressed: () {
|
||||
Get.defaultDialog(
|
||||
// backgroundColor: CupertinoColors.destructiveRed,
|
||||
barrierDismissible: false,
|
||||
title: double.parse(captainWalletController.totalPoints) <
|
||||
-100
|
||||
-500
|
||||
? 'You dont have Points'.tr
|
||||
: 'You Are Stopped For this Day !'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
content: Text(
|
||||
double.parse(captainWalletController.totalPoints) < -100
|
||||
? 'You will be charge your Account'.tr
|
||||
double.parse(captainWalletController.totalPoints) < -500
|
||||
? 'You must be recharge your Account'.tr
|
||||
: 'You Refused 3 Rides this Day that is the reason \nSee you Tomorrow!'
|
||||
.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
confirm:
|
||||
double.parse(captainWalletController.totalPoints) <
|
||||
-100
|
||||
-500
|
||||
? MyElevatedButton(
|
||||
title: 'Charge your Account'.tr,
|
||||
title: 'Recharge my Account'.tr,
|
||||
onPressed: () {
|
||||
homeCaptainController
|
||||
.goToWalletFromConnect();
|
||||
|
||||
@@ -432,7 +432,7 @@ class MapPassengerController extends GetxController {
|
||||
|
||||
// Format the message.
|
||||
String message =
|
||||
'Hi! This is ${box.read(BoxName.name)}.\n I am using ${box.read(AppInformation.appName)} to ride with $firstName as the driver. $firstName \nis driving a $model\n with license plate $licensePlate.\n I am currently located at $passengerLocation.\n If you need to reach me, please contact the driver directly at\n\n $driverPhone.';
|
||||
'${'${'Hi! This is'.tr} ${box.read(BoxName.name)}.\n${' I am using'.tr}'} ${box.read(AppInformation.appName)}${' to ride with'.tr} $firstName${' as the driver.'.tr} $firstName \n${'is driving a '.tr}$model\n${' with license plate '.tr}$licensePlate.\n${' I am currently located at '.tr}$passengerLocation.\n${' If you need to reach me, please contact the driver directly at'.tr}\n\n $driverPhone.';
|
||||
|
||||
// Launch the URL to send the SMS.
|
||||
launchCommunication('whatsapp', to, message);
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/links.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/functions/crud.dart';
|
||||
import 'package:SEFER/views/home/map_page_passenger.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
|
||||
class PromosController extends GetxController {
|
||||
|
||||
@@ -172,7 +172,7 @@ class MyTranslation extends Translations {
|
||||
" KM": " كيلومتر",
|
||||
"Duration of Trip is ": "مدة الرحلة هي ",
|
||||
" Minutes": " دقائق",
|
||||
"Apply Order": "تطبيق الطلب",
|
||||
"Apply Order": "قبول الطلب",
|
||||
"Refuse Order": "رفض الطلب",
|
||||
"Rate Captain": "تقييم الكابتن",
|
||||
"Enter your Note": "أدخل ملاحظتك",
|
||||
@@ -187,10 +187,387 @@ class MyTranslation extends Translations {
|
||||
"get_a_ride": "مع سفر، يمكنك الحصول على رحلة إلى وجهتك في دقائق.",
|
||||
"safe_and_comfortable": "استمتع برحلة آمنة ومريحة.",
|
||||
"committed_to_safety":
|
||||
"تلتزم سفر بالسلامة، ويتم فحص جميع قباطننا بعناية وفحص خلفيتهم."
|
||||
|
||||
///
|
||||
// 'Saved Sucssefully':
|
||||
"تلتزم سفر بالسلامة، ويتم فحص جميع قباطننا بعناية وفحص خلفيتهم.",
|
||||
"Driver Applied the Ride for You": "طلب السائق الرحلة لك",
|
||||
"Show latest promo": "اظهر آخر عرض ترويجي",
|
||||
"Cancel Trip": "إلغاء الرحلة",
|
||||
"Passenger Cancel Trip": "الراكب ألغى الرحلة",
|
||||
"Please stay on the picked point.":
|
||||
"الرجاء البقاء في النقطة المحددة.",
|
||||
"Trip is Begin": "بدء الرحلة",
|
||||
"Hi ,I will go now": "مرحبا، سأذهب الآن",
|
||||
"Passenger come to you": "الراكب في طريقه اليك",
|
||||
"Hi ,I Arrive your site": "مرحبا، وصلت مكانك",
|
||||
"Driver Finish Trip": "السائق انهى الرحلة",
|
||||
"you will pay to Driver": "ستدفع للسائق",
|
||||
"Driver Cancel Your Trip": "السائق ألغى رحلتك",
|
||||
"you will pay to Driver you will be pay the cost of driver time look to your SEFER Wallet":
|
||||
"ستدفع للسائق تكلفة وقته تفقد محفظتك في سيفر",
|
||||
"I will go now": "سأذهب الآن",
|
||||
"You Have Tips": "لديك زيادة مال",
|
||||
" tips\nTotal is": "زيادة مال\nالمجموع هو",
|
||||
"No,I want": "لا، أريد",
|
||||
"Your fee is ": "أجرك هو",
|
||||
"Do you want to pay Tips for this Driver":
|
||||
"هل تريد دفع زيادة مال لهذا السائق؟",
|
||||
"Tip is ": "زيادة المال هي",
|
||||
"Tip is": "زيادة المال هي",
|
||||
"Camera Access Denied.": "تم رفض الوصول إلى الكاميرا.",
|
||||
"Open Settings": "افتح الإعدادات",
|
||||
"GPS Required Allow !.": "تمكن الـ GPS مطلوب!",
|
||||
"Your Account is Deleted": "تم حذف حسابك",
|
||||
"Are you sure to delete your account?": "هل أنت متأكد من حذف حسابك؟",
|
||||
"Your data will be erased after 2 weeks\nAnd you will can't return to use app after 1 month ":
|
||||
"سيتم مسح بياناتك بعد أسبوعين\nولن تستطيع استخدام التطبيق مرة أخرى بعد شهر",
|
||||
"Enter Your First Name": "أدخل اسمك الأول",
|
||||
"Are you Sure to LogOut?": "هل أنت متأكد من تسجيل الخروج؟",
|
||||
"Email Wrong": "البريد الإلكتروني خاطئ",
|
||||
"Email you inserted is Wrong.": "البريد الإلكتروني الذي أدخلته خطأ.",
|
||||
"You have finished all times ": "لقد استنفذت كل المحاولات ",
|
||||
"if you want help you can email us here":
|
||||
"إذا كنت تريد المساعدة يمكنك إرسال بريد إلكتروني إلينا هنا",
|
||||
"Thanks": "شكرا",
|
||||
"Email Us": "ارسل لنا بريد الكتروني",
|
||||
"I cant register in your app in face detection ":
|
||||
"لا أستطيع التسجيل في تطبيقكم بسبب الكشف عن الوجه",
|
||||
"Hi": "مرحبا",
|
||||
"No face detected": "لم يتم الكشف عن أي وجه",
|
||||
"Image detecting result is ": "نتيجة الكشف عن الصورة هي",
|
||||
"from 3 times Take Attention": "من 3 محاولات انتبه",
|
||||
"Be sure for take accurate images please\nYou have":
|
||||
"الرجاء التأكد من التقاط صور دقيقة\nلديك",
|
||||
"image verified": "الصورة موثقة",
|
||||
"Next": "التالي",
|
||||
"There is no help Question here": "لا توجد أسئلة هنا",
|
||||
"Call End": "انتهاء المكالمة",
|
||||
"You dont have Points": "ليس لديك نقاط",
|
||||
"You Are Stopped For this Day !": "تم توقيفك لهذا اليوم!",
|
||||
"You must be charge your Account": "يجب اعاده شحن رصيد النقاط",
|
||||
"You Refused 3 Rides this Day that is the reason \nSee you Tomorrow!":
|
||||
"رفضت 3 رحلات هذا اليوم وهذا السبب\nلقائنا غدا!",
|
||||
'Recharge my Account': "ادفع رسوم من حسابي",
|
||||
"Ok , See you Tomorrow": "حسناً، لقائنا غداً",
|
||||
"You are Stopped": "تم توقيفك",
|
||||
"Connected": "متصل",
|
||||
"Not Connected": "غير متصل",
|
||||
"Your are far from passenger location": "أنت بعيد عن مكان الراكب",
|
||||
"go to your passenger location before\nPassenger cancel trip":
|
||||
"اذهب إلى مكان الراكب قبل أن\nيلغي الراكب الرحلة",
|
||||
"You will get cost of your work for this trip":
|
||||
"ستحصل على تكاليف عملك لهذه الرحلة",
|
||||
" in your wallet": "في محفظتك",
|
||||
"you gain": "ربحت",
|
||||
"Order Cancelled": "تم إلغاء الطلب",
|
||||
"Order Cancelled by Passenger": "تم إلغاء الطلب من قبل الراكب",
|
||||
"Success": "نجاح",
|
||||
"Feedback data saved successfully": "تم حفظ بيانات التعليقات بنجاح",
|
||||
"No Promo for today .": "لا يوجد عرض ترويجي اليوم.",
|
||||
"Select your destination": "اختر وجهتك",
|
||||
"Search for your Start point": "بحث عن نقطة بدايتك",
|
||||
"Search for waypoint": "بحث عن نقطة الوجهة",
|
||||
"Current Location": "الموقع الحالي",
|
||||
"Add Location 1": "إضافة الموقع 1",
|
||||
'You must Verify email !.': "يجب التحقق من البريد الإلكتروني!",
|
||||
'Cropper': "القاصة",
|
||||
'Saved Sucssefully': "تم الحفظ بنجاح",
|
||||
'Select Date': "اختر التاريخ",
|
||||
'Birth Date': "تاريخ الميلاد",
|
||||
'Ok': "موافق",
|
||||
'token updated': "تم تحديث الرمز",
|
||||
'Add Location 2': "إضافة الموقع 2",
|
||||
'Add Location 3': "إضافة الموقع 3",
|
||||
'Add Location 4': "إضافة الموقع 4",
|
||||
'Waiting for your location': "في انتظار موقعك",
|
||||
'Search for your destination': "بحث عن وجهتك",
|
||||
'Hi! This is': "مرحبا! هذا",
|
||||
' I am using': "أنا أستخدم",
|
||||
' to ride with': "للركوب مع",
|
||||
' as the driver.': "كسائق.",
|
||||
'is driving a ': "يقود",
|
||||
' with license plate ': "بلوحة ترخيص",
|
||||
' I am currently located at ': "أنا حاليا في",
|
||||
' If you need to reach me, please contact the driver directly at':
|
||||
"إذا كنت تحتاج إلى التواصل معي، يرجى التواصل مع السائق مباشرة على",
|
||||
'No Car or Driver Found in your area.':
|
||||
"لم يتم العثور على سيارة أو سائق في منطقتك.",
|
||||
'Please Try anther time ': "الرجاء إعادة المحاولة",
|
||||
'There no Driver Aplly your order sorry for that ':
|
||||
"لا يوجد سائق قدم طلبك، نعتذر عن ذلك",
|
||||
'Trip Cancelled': "تم إلغاء الرحلة",
|
||||
'The Driver Will be in your location soon .':
|
||||
"سيكون السائق قريبا في موقعك.",
|
||||
'The distance less than 500 meter.': "المسافة أقل من 500 متر.",
|
||||
'Promo End !': "انتهاء العرض!",
|
||||
'There is no notification yet': "لا توجد إشعارات بعد",
|
||||
'Use Touch ID or Face ID to confirm payment':
|
||||
"استخدم Touch ID أو Face ID لتأكيد الدفع",
|
||||
"Contact us for any questions on your order.":
|
||||
"تواصل معنا لأي استفسارات حول طلبك.",
|
||||
'Pyament Cancelled .': "تم إلغاء الدفع.",
|
||||
'type here': "اكتب هنا",
|
||||
'Scan Driver License': "استخراج رخصة القيادة",
|
||||
'Please put your licence in these border':
|
||||
"الرجاء وضع رخصتك ضمن هذا الحدود",
|
||||
'Camera not initialized yet': "الكاميرا لم تُثبت بعد",
|
||||
'Take Image': "إلتقاط الصورة",
|
||||
'AI Page': "صفحة الذكاء الاصطناعي",
|
||||
'Take Picture Of ID Card': "إلتقاط صورة لبطاقة الهوية",
|
||||
'Take Picture Of Driver License Card':
|
||||
"إلتقاط صورة لبطاقة رخصة القيادة",
|
||||
'We are process picture please wait ':
|
||||
"نقوم بمعالجة الصورة الرجاء الإنتظار",
|
||||
'There is no data yet.': "لا توجد بيانات بعد.",
|
||||
'Name :': "الإسم:",
|
||||
'Drivers License Class: ': "فئة رخصة القيادة:",
|
||||
'Document Number: ': "رقم المستند:",
|
||||
'Address: ': "العنوان:",
|
||||
'Height: ': "الطول:",
|
||||
'Expiry Date: ': "تاريخ الإنتهاء:",
|
||||
'Date of Birth: ': "تاريخ الميلاد:",
|
||||
'You can\'t continue with us .\nYou should renew Driver license':
|
||||
"لايمكنك الإستمرار معنا. يجب تجديد رخصة القيادة",
|
||||
'Detect Your Face ': "الكشف عن وجهك",
|
||||
'Go to next step\nscan Car License.':
|
||||
"إذهب إلى الخطوة التالية\nاستخراج رخصة السيارة.",
|
||||
'Name in arabic': "الإسم باللغة العربية",
|
||||
'Drivers License Class': "فئة رخصة القيادة",
|
||||
'National Number': "الرقم القومي",
|
||||
'Address': "العنوان",
|
||||
'Date of Birth': "تاريخ الميلاد",
|
||||
'Age': "العمر",
|
||||
'Expiry Date': "تاريخ الإنتهاء",
|
||||
'Lets check Car license ': "دعونا نتحقق من رخصة السيارة ",
|
||||
'Color': "اللون",
|
||||
'Car Kind': "نوع السيارة",
|
||||
'Year': "السنة",
|
||||
'Car Plate': "لوحة السيارة",
|
||||
'Lets check License Back Face': "دعونا نتحقق من الوجه الخلفي للرخصة",
|
||||
'Car License Card': "بطاقة رخصة السيارة",
|
||||
'No image selected yet': "لم يتم إختيار أي صورة بعد",
|
||||
'Made :': "الصناعة:",
|
||||
'model :': "النموذج:",
|
||||
'VIN :': "رقم الشاصي:",
|
||||
'year :': "السنة:",
|
||||
'Login Driver': "تسجيل دخول السائق",
|
||||
'Password must br at least 6 character.':
|
||||
"كلمة المرور يجب أن تكون على الأقل 6 أحرف.",
|
||||
'if you don\'t have account': "إذا لم يكن لديك حساب",
|
||||
'Register as Driver': "التسجيل كسائق",
|
||||
'Privacy Notice': "إخطار الخصوصية",
|
||||
'By selecting "I Agree" below, I have reviewed and agree to the Terms of Use and acknowledge the ':
|
||||
"بإختياري' أوافق' أدناه، قمت بمراجعة والموافقة على شروط الإستخدام والإعتراف بـ",
|
||||
'. I am at least 18 years of age.':
|
||||
". أنا بالغ عمري على الأقل 18 سنة.",
|
||||
'Log Out Page': "صفحة تسجيل الخروج",
|
||||
'Log Off': "تسجيل الخروج",
|
||||
'Register Driver': "تسجيل سائق جديد",
|
||||
'Verify Email For Driver': "التحقق من البريد الإلكتروني للسائق",
|
||||
'Admin DashBoard': "لوحة تحكم المدير",
|
||||
'Your name': "إسمك",
|
||||
'Your password': "كلمة المرور الخاصة بك",
|
||||
'title': "العنوان",
|
||||
'If You Want be Driver Click Here.':
|
||||
"إذا كنت تريد أن تكون سائقًا انقر هنا.",
|
||||
'Enter your City': "أدخل مدينتك",
|
||||
'History Page': "صفحة التاريخ",
|
||||
'This Trip Cancelled': "تم إلغاء هذه الرحلة",
|
||||
'Trip Detail': "تفاصيل الرحلة",
|
||||
'Trip on Map Click here': "ضغط هنا لعرض الرحلة على الخريطة",
|
||||
'Order ID': "رقم الطلب",
|
||||
'Price is': "السعر هو",
|
||||
'Distance is': "المسافة هي",
|
||||
'Times of Trip': "أوقات الرحلة",
|
||||
'Time to Passenger is': "وقت التحرك هو ",
|
||||
'TimeStart is': "وقت البداية هو",
|
||||
'Time Finish is': "وقت الإنتهاء هو",
|
||||
'Passenger Name is': "إسم الراكب هو",
|
||||
'Status is': "الحالة هي",
|
||||
'Call Income': "مكالمة واردة",
|
||||
'You have call from driver': "لديك مكالمة من السائق",
|
||||
'joined': "انضم",
|
||||
'Call left': "مكالمة خارجة",
|
||||
'Wallet': "المحفظة",
|
||||
'History of Trip': "تاريخ الرحلات",
|
||||
'Helping Center': "مركز المساعدة",
|
||||
'Voice Calling': "الإتصال الصوتي",
|
||||
'Helping Page': "صفحة المساعدة",
|
||||
'If you need any help or have question this is right site to do that and your welcome':
|
||||
"إذا كنت تحتاج أي مساعدة أو لديك أسئلة هذه الصفحة المكان المناسب لذلك وأهلاً بك",
|
||||
'Enter your Question here': "أدخل سؤالك هنا",
|
||||
'Question': "السؤال",
|
||||
'Submit Question': "طرح السؤال",
|
||||
'Please enter your Question.': "الرجاء إدخال سؤالك.",
|
||||
'Help Details': "تفاصيل المساعدة",
|
||||
'No Response yet.': "لا يوجد رد بعد.",
|
||||
' You Earn today is ': " ما حصلت عليه اليوم هو",
|
||||
' You Have in': "لديك في",
|
||||
'Total points is ': "إجمالي النقاط هو",
|
||||
'Total Connection Duration:': "إجمالي مدة الإتصال:",
|
||||
' H and': "ساعة و",
|
||||
'm': "دقيقة",
|
||||
'Hello this is Driver': "مرحبا هذا السائق",
|
||||
'Is the Passenger in your Car ?': "هل الراكب في سيارتك؟",
|
||||
'don\'t start trip if not ': "لا تبدأ الرحلة إذا لم يكن",
|
||||
'No ,still Waiting.': "لا، مازالت في الإنتظار.",
|
||||
'I arrive you': "وصلت إليك",
|
||||
'I Arrive your site': "وصلت إلى موقعك",
|
||||
'You are not in near to passenger location':
|
||||
"أنت غير قريب من موقع الراكب",
|
||||
'please go to picker location exactly':
|
||||
"الرجاء الذهاب إلى موقع الراكب بالضبط",
|
||||
'You Can Cancel Trip And get Cost of Trip From':
|
||||
"يمكنك إلغاء الرحلة والحصول على تكلفتها من",
|
||||
'Are you sure to cancel?': "هل أنت متأكد من الإلغاء؟",
|
||||
'Yes': 'نعم',
|
||||
'Insert Emergincy Number': "أدخل رقم الطوارئ",
|
||||
'Insert': "إدراج",
|
||||
" My current location is:": "موقعي الحالي هو:",
|
||||
" \nand I have a trip on": "\nولدي رحلة على",
|
||||
"App \nwith Passenger ": "التطبيق\nمع الراكب ",
|
||||
'You will be pay the cost to driver or we will get it from you on next trip':
|
||||
"ستدفع التكلفة للسائق أو سنحصل عليها منك في الرحلة القادمة",
|
||||
'Trip has Steps': "الرحلة تتكون من خطوات",
|
||||
'Distance from Passenger to destination is ':
|
||||
"المسافة من الراكب إلى الوجهة هي ",
|
||||
'Cost Of Trip IS ': "تكلفة الرحلة هي ",
|
||||
'Accept Order': "قبول الطلب",
|
||||
'rejct your order.': "رفض طلبك.",
|
||||
'Bottom Bar Example': "مثال لشريط الأسفل",
|
||||
'Statistics': "الإحصائيات",
|
||||
'Scan Id': "مسح الهوية",
|
||||
'Camera not initilaized yet': "الكاميرا لم تُثبت بعد",
|
||||
'Scan ID MklGoogle': "مسح هوية MklGoogle",
|
||||
'Language': "اللغة",
|
||||
'Your trip cost is': "تكلفة رحلتك هي",
|
||||
'But you have a negative salary of': "لكن لديك راتب سلبي بقيمة",
|
||||
' in your': "في",
|
||||
' wallet due to a previous trip.': "المحفظة بسبب رحلة سابقة.",
|
||||
'Promo Code': "كود ترويجي",
|
||||
'Your trip distance is': "مسافة رحلتك هي",
|
||||
'Enter promo code': "أدخل كود ترويجي",
|
||||
'You have promo!': "لديك عرض ترويجي!",
|
||||
'Cost Duration': "تكلفة المدة",
|
||||
'Duration is': "المدة هي",
|
||||
'Leave': "مغادرة",
|
||||
'Join': "الانضمام",
|
||||
'You Should be select reason.': "يجب أن تختار السبب.",
|
||||
' \$': " دينار ",
|
||||
'Waiting for Driver ...': "في انتظار السائق...",
|
||||
'Latest Recent Trip': "آخر رحلة حديثة",
|
||||
'from your list': "من قائمتك",
|
||||
'Do you want to change Work location': "هل تريد تغيير موقع العمل؟",
|
||||
'Do you want to change Home location': "هل تريد تغيير موقع المنزل؟",
|
||||
'We Are Sorry That we dont have cars in your Location!':
|
||||
"نعتذر لعدم وجود سيارات في موقعك!",
|
||||
'Choose from Map': "اختر من الخريطة",
|
||||
'To Work': "إلى العمل",
|
||||
'Work Saved': "تم حفظ العمل",
|
||||
'To Home': "إلى المنزل",
|
||||
'Home Saved': "تم حفظ المنزل",
|
||||
"Click here point": "انقر هنا نقطة",
|
||||
'No Car in your site. Sorry!': "لا توجد سيارة في موقعك. آسف!",
|
||||
'Nearest Car for you about ': "أقرب سيارة لك حوالي ",
|
||||
'N/A': "غير متوفر",
|
||||
'From :': "من:",
|
||||
'Get Details of Trip': "الحصول على تفاصيل الرحلة",
|
||||
"If you want add stop click here": "إذا أردت إضافة وقفة انقر هنا",
|
||||
'Driver': "السائق",
|
||||
"Where you want go ": "إلى أين تريد الذهاب ",
|
||||
'My Card': "بطاقتي",
|
||||
'Card Number': "رقم البطاقة",
|
||||
'Hi, Where to ': "مرحبا، إلى أين ",
|
||||
"Pick your destination from Map": "حدد وجهتك من الخريطة",
|
||||
'Add Stops': "إضافة المحطات",
|
||||
'Get Direction': "الحصول على الإرشادات",
|
||||
'Add Location': "إضافة الموقع",
|
||||
"Switch Rider": "تبديل الراكب",
|
||||
'You will arrive to your destination after timer end.':
|
||||
"سوف تصل إلى وجهتك بعد انتهاء العداد.",
|
||||
'You can cancel trip': "يمكنك إلغاء الرحلة",
|
||||
'The driver waitting you in picked location .':
|
||||
"السائق ينتظرك في الموقع المحدد.",
|
||||
'10\$ and get 3% discount': "10 دينار والحصول على خصم 3%",
|
||||
'20\$ and get 4% discount': "20 دينار والحصول على خصم 4%",
|
||||
'40\$ and get 6% discount': "40 دينار والحصول على خصم 6%",
|
||||
'100\$ and get 9% discount': "100 دولار والحصول على خصم 9%",
|
||||
'Pay with Your': "الدفع باستخدام",
|
||||
'Pay with Credit Card': "الدفع ببطاقة ائتمان",
|
||||
'Payment History': "تاريخ المدفوعات",
|
||||
'Show Promos to Charge': "إظهار العروض للشحن",
|
||||
'Point': "نقطة",
|
||||
'Driver Wallet': "محفظة السائق",
|
||||
'Total Points is': "إجمالي النقاط هو",
|
||||
'Total Budget from trips is ': "إجمالي الميزانية من الرحلات هو ",
|
||||
'Total Amount:': "المبلغ الإجمالي:",
|
||||
'Total Budget from trips by\nCredit card is ':
|
||||
"الميزانية الإجمالية من الرحلات باستخدام\nبطاقة الائتمان هي ",
|
||||
'This amount for all trip I get from Passengers':
|
||||
"هذا المبلغ الذي حصلت عليه من جميع الرحلات من الركاب",
|
||||
'Pay from my budget': "الدفع من ميزانيتي",
|
||||
'This amount for all trip I get from Passengers and Collected For me in':
|
||||
"هذا المبلغ الذي حصلت عليه من جميع الرحلات من الركاب وتم جمعه لي في",
|
||||
'You can buy points from your budget': "يمكنك شراء نقاط من ميزانيتك",
|
||||
'insert amount': "إدراج المبلغ",
|
||||
'You can buy Points to let you online\nby this list below':
|
||||
"يمكنك شراء النقاط للبقاء على وضع الاتصال\nمن خلال القائمة أدناه",
|
||||
'Create Wallet to recive your money': "إنشاء محفظة لاستلام أموالك",
|
||||
'Enter your feedback here': "أدخل تعليقاتك هنا",
|
||||
'Please enter your feedback.': "الرجاء إدخال تعليقاتك.",
|
||||
'Feedback': "تعليق",
|
||||
'Submit ': "تقديم",
|
||||
'Click here to Show it in Map': "انقر هنا لعرضه على الخريطة",
|
||||
'Canceled': "تم الإلغاء",
|
||||
'Type your Email': "اكتب بريدك الإلكتروني",
|
||||
'No I want': "لا أريد",
|
||||
'Email is': "البريد الإلكتروني هو",
|
||||
'Phone Number is': "رقم الهاتف هو",
|
||||
'Date of Birth is': "تاريخ الميلاد هو",
|
||||
'Sex is ': "الجنس هو ",
|
||||
'Car Details': "تفاصيل السيارة",
|
||||
'VIN is': "رقم الشاصي هو",
|
||||
'Color is ': "اللون هو ",
|
||||
'Make is ': "الصانع هو",
|
||||
'Model is': "النموذج هو",
|
||||
'Year is': "السنة هي",
|
||||
'Expiration Date ': "تاريخ انتهاء الصلاحية ",
|
||||
'Edit Your data': "تعديل بياناتك",
|
||||
'write vin for your car': "اكتب رقم الشاصي لسيارتك",
|
||||
'VIN': "رقم الشاصي",
|
||||
'write Color for your car': "اكتب لون سيارتك",
|
||||
'write Make for your car': "اكتب صانع سيارتك",
|
||||
'Make': "الصانع",
|
||||
'write Model for your car': "اكتب نموذج سيارتك",
|
||||
'Model': "النموذج",
|
||||
'write Year for your car': "اكتب سنة سيارتك",
|
||||
'Expiration Date': "تاريخ انتهاء الصلاحية",
|
||||
'write Expiration Date for your car':
|
||||
"اكتب تاريخ انتهاء صلاحية سيارتك",
|
||||
'Tariffs': "التعرفه",
|
||||
'Minimum fare': "الحد الأدنى للأجرة",
|
||||
'Maximum fare': "الحد الأقصى للأجرة",
|
||||
'JOD': "د.أ",
|
||||
'Flag-down fee': "رسوم التشغيل",
|
||||
'Including Tax': "بما في ذلك الضرائب",
|
||||
'BookingFee': "رسوم الحجز",
|
||||
'Morning': "الصباح",
|
||||
'from 07:30 till 10:30 (Thursday, Friday, Saturday, Monday)':
|
||||
"من 07:30 إلى 10:30 (يوم الخميس، الجمعة، السبت، الإثنين)",
|
||||
'Evening': "المساء",
|
||||
'from 12:00 till 15:00 (Thursday, Friday, Saturday, Monday)':
|
||||
"من 12:00 إلى 15:00 (يوم الخميس، الجمعة، السبت، الإثنين)",
|
||||
'Night': "الليل",
|
||||
'from 23:59 till 05:30': "من 23:59 إلى 05:30",
|
||||
'Rate Driver': "تقييم السائق",
|
||||
'Ride Summaries': "ملخصات الرحلات",
|
||||
'Average of Hours of': "متوسط ساعات",
|
||||
' is ON for this month': "في هذا الشهر",
|
||||
'Days': "أيام",
|
||||
'Total Hours on month': "إجمالي الساعات في الشهر",
|
||||
'Counts of Hours on days': "عدد ساعات الأيام",
|
||||
'OrderId': 'رقم الرحله',
|
||||
'created time': "وقت الرحله",
|
||||
'Map Passenger': 'خارطه الراكب',
|
||||
'Your Budget less than needed': 'القيمه المدخله اقل من رصيدك',
|
||||
},
|
||||
"tr": {
|
||||
"Choose Language": "Dil Seçin",
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'dart:convert';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/constant/table_names.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../constant/box_name.dart';
|
||||
|
||||
31
lib/controller/payment/driver_payment_controller.dart
Normal file
31
lib/controller/payment/driver_payment_controller.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'dart:convert';
|
||||
|
||||
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';
|
||||
|
||||
class DriverWalletHistoryController extends GetxController {
|
||||
bool isLoading = false;
|
||||
List archive = [];
|
||||
|
||||
getArchivePayment() async {
|
||||
isLoading = true;
|
||||
update();
|
||||
var res = await CRUD().get(
|
||||
link: AppLink.getWalletByDriver,
|
||||
payload: {'driver_id': box.read(BoxName.driverID)});
|
||||
|
||||
archive = jsonDecode(res)['message'];
|
||||
print(archive);
|
||||
isLoading = false;
|
||||
update();
|
||||
}
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
getArchivePayment();
|
||||
super.onInit();
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ class PaymentController extends GetxController {
|
||||
// applePay: const PaymentSheetApplePay(merchantCountryCode: 'US'),
|
||||
// googlePay: const PaymentSheetGooglePay(merchantCountryCode: 'US'),
|
||||
paymentIntentClientSecret: clientSecret,
|
||||
merchantDisplayName: 'Sefer',
|
||||
merchantDisplayName: AppInformation.appName,
|
||||
billingDetails: BillingDetails(
|
||||
name: box.read(BoxName.nameDriver) == null
|
||||
? box.read(BoxName.name).toString()
|
||||
@@ -178,7 +178,7 @@ class PaymentController extends GetxController {
|
||||
: box.read(BoxName.phoneDriver).toString(),
|
||||
address: const Address(
|
||||
city: 'city',
|
||||
country: 'United States',
|
||||
country: 'Jordan', //'United States'
|
||||
line1: '',
|
||||
line2: '',
|
||||
postalCode: '12345',
|
||||
@@ -251,8 +251,8 @@ class PaymentController extends GetxController {
|
||||
"AWj9MdPaA5Djpx8gOkvBn2qhP-3KvfB6W-l8USTsm19Xi2NhkNkE9QzosOvTPTsKjCMNffgpqStUA1-x",
|
||||
secretKey:
|
||||
"EKkasSl9O61lrfrbaJfXp1B-CIs2Rv71J0WPouxxugi38DsWaMhWpovJxN2ftYPQ0l6v9eoBvnyWkemp",
|
||||
returnURL: "https://mobile-app.store",
|
||||
cancelURL: "https://mobile-app.store/cancel",
|
||||
returnURL: AppInformation.website,
|
||||
cancelURL: "${AppInformation.website}/cancel",
|
||||
transactions: [
|
||||
{
|
||||
"amount": {
|
||||
@@ -294,7 +294,7 @@ class PaymentController extends GetxController {
|
||||
}
|
||||
}
|
||||
],
|
||||
note: "Contact us for any questions on your order.",
|
||||
note: "Contact us for any questions on your order.".tr,
|
||||
onSuccess: (Map params) async {
|
||||
print("onSuccess: $params");
|
||||
addPassengerWallet();
|
||||
@@ -423,7 +423,7 @@ class PaymentController extends GetxController {
|
||||
|
||||
Future<String> createTransactionToCaptain(
|
||||
String amount, String account) async {
|
||||
String url = 'https://api.stripe.com//v1/transfers';
|
||||
String url = 'https://api.stripe.com/v1/transfers';
|
||||
|
||||
final body = {
|
||||
'amount': amount, //amount
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:http/http.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/constant/links.dart';
|
||||
import 'package:SEFER/controller/functions/crud.dart';
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
@@ -49,6 +50,19 @@ class RateController extends GetxController {
|
||||
'rating': selectedRateItemId.toString(),
|
||||
'comment': comment.text,
|
||||
});
|
||||
await CRUD()
|
||||
.post(link: AppLink.sendEmailToPassengerForTripDetails, payload: {
|
||||
'startLocation':
|
||||
Get.find<MapDriverController>().latLngpassengerLocation.toString(),
|
||||
'endLocation': Get.find<MapDriverController>()
|
||||
.latLngPassengerDestination
|
||||
.toString(),
|
||||
'name': Get.find<MapDriverController>().name.toString(),
|
||||
'timeOfTrip': Get.find<MapDriverController>().duration.toString(),
|
||||
'fee': Get.find<MapDriverController>().timeOfOrder.toString(),
|
||||
'duration': Get.find<MapDriverController>().duration.toString(),
|
||||
'phone': Get.find<MapDriverController>().phone.toString(),
|
||||
});
|
||||
// homeCaptainController.isActive = true;
|
||||
// update();
|
||||
// homeCaptainController.getPaymentToday();
|
||||
|
||||
Reference in New Issue
Block a user