2/25/1
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
class BoxName {
|
class BoxName {
|
||||||
static const String driverID = "driverID";
|
static const String driverID = "driverID";
|
||||||
|
static const String countryCode = "countryCode";
|
||||||
|
|
||||||
static const String lang = "lang";
|
static const String lang = "lang";
|
||||||
static const String statusDriverLocation = "statusDriverLocation";
|
static const String statusDriverLocation = "statusDriverLocation";
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ class AppLink {
|
|||||||
|
|
||||||
////////////////emails ============//
|
////////////////emails ============//
|
||||||
static String sendEmailToPassengerForTripDetails =
|
static String sendEmailToPassengerForTripDetails =
|
||||||
"$ride/rate/emailToPassengerTripDetail.php";
|
"$ride/rides/emailToPassengerTripDetail.php";
|
||||||
|
|
||||||
// ===========================================
|
// ===========================================
|
||||||
static String pathImage = "$server/upload/types/";
|
static String pathImage = "$server/upload/types/";
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:SEFER/constant/box_name.dart';
|
import 'package:SEFER/constant/box_name.dart';
|
||||||
|
import 'package:SEFER/constant/links.dart';
|
||||||
import 'package:SEFER/main.dart';
|
import 'package:SEFER/main.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:SEFER/env/env.dart';
|
import 'package:SEFER/env/env.dart';
|
||||||
|
|
||||||
import '../../constant/api_key.dart';
|
import '../../constant/api_key.dart';
|
||||||
|
import '../home/captin/map_driver_controller.dart';
|
||||||
|
|
||||||
class CRUD {
|
class CRUD {
|
||||||
Future<dynamic> get({
|
Future<dynamic> get({
|
||||||
@@ -189,6 +191,28 @@ class CRUD {
|
|||||||
return (jsonData['status']);
|
return (jsonData['status']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sendEmail(
|
||||||
|
String link,
|
||||||
|
Map<String, String>? payload,
|
||||||
|
) async {
|
||||||
|
var headers = {
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
'Authorization':
|
||||||
|
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
||||||
|
};
|
||||||
|
var request = http.Request('POST', Uri.parse(link));
|
||||||
|
request.bodyFields = payload!;
|
||||||
|
request.headers.addAll(headers);
|
||||||
|
|
||||||
|
http.StreamedResponse response = await request.send();
|
||||||
|
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
print(await response.stream.bytesToString());
|
||||||
|
} else {
|
||||||
|
print(response.reasonPhrase);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<dynamic> postFromDialogue({
|
Future<dynamic> postFromDialogue({
|
||||||
required String link,
|
required String link,
|
||||||
Map<String, dynamic>? payload,
|
Map<String, dynamic>? payload,
|
||||||
|
|||||||
@@ -101,6 +101,12 @@ class LogOutController extends GetxController {
|
|||||||
box.remove(BoxName.phone);
|
box.remove(BoxName.phone);
|
||||||
box.remove(BoxName.tokenFCM);
|
box.remove(BoxName.tokenFCM);
|
||||||
box.remove(BoxName.tokens);
|
box.remove(BoxName.tokens);
|
||||||
|
box.remove(BoxName.addHome);
|
||||||
|
box.remove(BoxName.addWork);
|
||||||
|
box.remove(BoxName.agreeTerms);
|
||||||
|
box.remove(BoxName.apiKeyRun);
|
||||||
|
box.remove(BoxName.countryCode);
|
||||||
|
box.remove(BoxName.accountIdStripeConnect);
|
||||||
Get.offAll(OnBoardingPage());
|
Get.offAll(OnBoardingPage());
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ class HomeCaptainController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
GoogleMapController? mapHomeCaptaiController;
|
late GoogleMapController mapHomeCaptaiController;
|
||||||
void onMapCreated(GoogleMapController controller) {
|
void onMapCreated(GoogleMapController controller) {
|
||||||
mapHomeCaptaiController = controller;
|
mapHomeCaptaiController = controller;
|
||||||
controller.getVisibleRegion();
|
controller.getVisibleRegion();
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ class MapDriverController extends GetxController {
|
|||||||
late String totalCost;
|
late String totalCost;
|
||||||
late String distance;
|
late String distance;
|
||||||
late String name;
|
late String name;
|
||||||
|
late String email;
|
||||||
|
late String totalPassenger;
|
||||||
late String phone;
|
late String phone;
|
||||||
late String rideId;
|
late String rideId;
|
||||||
late String isHaveSteps;
|
late String isHaveSteps;
|
||||||
@@ -69,7 +71,7 @@ class MapDriverController extends GetxController {
|
|||||||
bool isdriverWaitTimeEnd = false;
|
bool isdriverWaitTimeEnd = false;
|
||||||
bool isRideFinished = false;
|
bool isRideFinished = false;
|
||||||
bool isRideStarted = false;
|
bool isRideStarted = false;
|
||||||
double passengerInfoWindow = Get.height * .35;
|
double passengerInfoWindow = Get.height * .39;
|
||||||
double driverEndPage = 100;
|
double driverEndPage = 100;
|
||||||
double progress = 0;
|
double progress = 0;
|
||||||
double progressToPassenger = 0;
|
double progressToPassenger = 0;
|
||||||
@@ -406,11 +408,11 @@ class MapDriverController extends GetxController {
|
|||||||
}
|
}
|
||||||
print('passengerWalletBurc bef ${double.parse(passengerWalletBurc)}');
|
print('passengerWalletBurc bef ${double.parse(passengerWalletBurc)}');
|
||||||
if (double.parse(passengerWalletBurc) < 0) {
|
if (double.parse(passengerWalletBurc) < 0) {
|
||||||
print('passengerWalletBurc aft ${double.parse(passengerWalletBurc)}');
|
|
||||||
await CRUD().post(link: AppLink.addPassengersWallet, payload: {
|
await CRUD().post(link: AppLink.addPassengersWallet, payload: {
|
||||||
'passenger_id': passengerId,
|
'passenger_id': passengerId,
|
||||||
'balance': ((-1) * double.parse(passengerWalletBurc)).toString()
|
'balance': ((-1) * double.parse(passengerWalletBurc)).toString()
|
||||||
});
|
});
|
||||||
|
print('passengerWalletBurc aft ${double.parse(passengerWalletBurc)}');
|
||||||
}
|
}
|
||||||
Future.delayed(const Duration(milliseconds: 300));
|
Future.delayed(const Duration(milliseconds: 300));
|
||||||
FirebaseMessagesController().sendNotificationToPassengerToken(
|
FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||||
@@ -718,6 +720,8 @@ class MapDriverController extends GetxController {
|
|||||||
driverId = Get.arguments['driverId'];
|
driverId = Get.arguments['driverId'];
|
||||||
distance = Get.arguments['Distance'];
|
distance = Get.arguments['Distance'];
|
||||||
name = Get.arguments['name'];
|
name = Get.arguments['name'];
|
||||||
|
email = Get.arguments['email'];
|
||||||
|
totalPassenger = Get.arguments['totalPassenger'];
|
||||||
phone = Get.arguments['phone'];
|
phone = Get.arguments['phone'];
|
||||||
walletChecked = Get.arguments['WalletChecked'];
|
walletChecked = Get.arguments['WalletChecked'];
|
||||||
tokenPassenger = Get.arguments['tokenPassenger'];
|
tokenPassenger = Get.arguments['tokenPassenger'];
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import 'package:geolocator/geolocator.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||||
import 'package:google_polyline_algorithm/google_polyline_algorithm.dart';
|
import 'package:google_polyline_algorithm/google_polyline_algorithm.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
import 'package:location/location.dart';
|
import 'package:location/location.dart';
|
||||||
import 'package:SEFER/constant/colors.dart';
|
import 'package:SEFER/constant/colors.dart';
|
||||||
import 'package:SEFER/constant/style.dart';
|
import 'package:SEFER/constant/style.dart';
|
||||||
@@ -120,6 +121,9 @@ class MapPassengerController extends GetxController {
|
|||||||
bool rideConfirm = false;
|
bool rideConfirm = false;
|
||||||
bool isMarkersShown = false;
|
bool isMarkersShown = false;
|
||||||
bool isMainBottomMenuMap = true;
|
bool isMainBottomMenuMap = true;
|
||||||
|
late Timer markerReloadingTimer2;
|
||||||
|
late Timer markerReloadingTimer1;
|
||||||
|
late int duration1;
|
||||||
bool isWayPointSheet = false;
|
bool isWayPointSheet = false;
|
||||||
bool isWayPointStopsSheet = false;
|
bool isWayPointStopsSheet = false;
|
||||||
bool isWayPointStopsSheetUtilGetMap = false;
|
bool isWayPointStopsSheetUtilGetMap = false;
|
||||||
@@ -516,7 +520,13 @@ class MapPassengerController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
late String arrivalTime;
|
||||||
void rideIsBeginPassengerTimer() async {
|
void rideIsBeginPassengerTimer() async {
|
||||||
|
// Calculate arrival time considering current time and duration
|
||||||
|
DateTime now = DateTime.now();
|
||||||
|
DateTime arrivalTime1 = now.add(Duration(seconds: durationToRide));
|
||||||
|
arrivalTime = DateFormat('hh:mm').format(arrivalTime1);
|
||||||
|
|
||||||
for (int i = 0; i <= durationToRide; i++) {
|
for (int i = 0; i <= durationToRide; i++) {
|
||||||
await Future.delayed(const Duration(seconds: 1));
|
await Future.delayed(const Duration(seconds: 1));
|
||||||
progressTimerRideBegin = i / durationToRide;
|
progressTimerRideBegin = i / durationToRide;
|
||||||
@@ -762,6 +772,7 @@ class MapPassengerController extends GetxController {
|
|||||||
? double.parse(box.read(BoxName.passengerWalletTotal))
|
? double.parse(box.read(BoxName.passengerWalletTotal))
|
||||||
.toStringAsFixed(2)
|
.toStringAsFixed(2)
|
||||||
: '0',
|
: '0',
|
||||||
|
box.read(BoxName.email).toString(),
|
||||||
];
|
];
|
||||||
FirebaseMessagesController().sendNotificationToDriverMAP(
|
FirebaseMessagesController().sendNotificationToDriverMAP(
|
||||||
'Order',
|
'Order',
|
||||||
@@ -1022,6 +1033,8 @@ class MapPassengerController extends GetxController {
|
|||||||
"order_id": rideId.toString(), // Convert to String
|
"order_id": rideId.toString(), // Convert to String
|
||||||
"status": 'Cancel'
|
"status": 'Cancel'
|
||||||
});
|
});
|
||||||
|
FirebaseMessagesController().sendNotificationToDriverMAP(
|
||||||
|
'Cancel Trip', 'Trip Cancelled'.tr, driverToken, []);
|
||||||
}
|
}
|
||||||
rideConfirm = false;
|
rideConfirm = false;
|
||||||
shouldFetch = false;
|
shouldFetch = false;
|
||||||
@@ -1407,9 +1420,6 @@ class MapPassengerController extends GetxController {
|
|||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
|
|
||||||
late Timer markerReloadingTimer2;
|
|
||||||
late Timer markerReloadingTimer1;
|
|
||||||
late int duration1;
|
|
||||||
void startMarkerReloading() {
|
void startMarkerReloading() {
|
||||||
int reloadCount = 0;
|
int reloadCount = 0;
|
||||||
|
|
||||||
@@ -1461,7 +1471,9 @@ class MapPassengerController extends GetxController {
|
|||||||
|
|
||||||
getNearestDriverByPassengerLocation() async {
|
getNearestDriverByPassengerLocation() async {
|
||||||
if (polyLines.isEmpty || data.isEmpty) {
|
if (polyLines.isEmpty || data.isEmpty) {
|
||||||
if (rideConfirm == false) {
|
return null; // Early return if data is empty
|
||||||
|
}
|
||||||
|
if (!rideConfirm) {
|
||||||
double nearestDistance = double.infinity;
|
double nearestDistance = double.infinity;
|
||||||
if (dataCarsLocationByPassenger != 'failure') {
|
if (dataCarsLocationByPassenger != 'failure') {
|
||||||
if (dataCarsLocationByPassenger['message'].length > 0) {
|
if (dataCarsLocationByPassenger['message'].length > 0) {
|
||||||
@@ -1476,8 +1488,7 @@ class MapPassengerController extends GetxController {
|
|||||||
// Make API request to get exact distance and duration
|
// Make API request to get exact distance and duration
|
||||||
String apiUrl =
|
String apiUrl =
|
||||||
'${AppLink.googleMapsLink}distancematrix/json?destinations=${carLocation['latitude']},${carLocation['longitude']}&origins=${passengerLocation.latitude},${passengerLocation.longitude}&units=metric&key=${AK.mapAPIKEY}';
|
'${AppLink.googleMapsLink}distancematrix/json?destinations=${carLocation['latitude']},${carLocation['longitude']}&origins=${passengerLocation.latitude},${passengerLocation.longitude}&units=metric&key=${AK.mapAPIKEY}';
|
||||||
var response =
|
var response = await CRUD().getGoogleApi(link: apiUrl, payload: {});
|
||||||
await CRUD().getGoogleApi(link: apiUrl, payload: {});
|
|
||||||
if (response['status'] == "OK") {
|
if (response['status'] == "OK") {
|
||||||
var data = response;
|
var data = response;
|
||||||
// Extract distance and duration from the response and handle accordingly
|
// Extract distance and duration from the response and handle accordingly
|
||||||
@@ -1520,7 +1531,6 @@ class MapPassengerController extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//print(nearestCar!.distance);
|
//print(nearestCar!.distance);
|
||||||
//print(nearestCar!.duration);
|
//print(nearestCar!.duration);
|
||||||
//print(nearestCar!.latitude);
|
//print(nearestCar!.latitude);
|
||||||
@@ -1537,7 +1547,8 @@ class MapPassengerController extends GetxController {
|
|||||||
driverCarsLocationToPassengerAfterApplied.last.longitude,
|
driverCarsLocationToPassengerAfterApplied.last.longitude,
|
||||||
);
|
);
|
||||||
if (distance > 500) {
|
if (distance > 500) {
|
||||||
cancelRide();
|
isCancelRidePageShown = true;
|
||||||
|
update();
|
||||||
} else {
|
} else {
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'The Driver Will be in your location soon .'.tr,
|
title: 'The Driver Will be in your location soon .'.tr,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class SplashScreenController extends GetxController
|
|||||||
|
|
||||||
animationController = AnimationController(
|
animationController = AnimationController(
|
||||||
vsync: this,
|
vsync: this,
|
||||||
duration: const Duration(seconds: 7),
|
duration: const Duration(seconds: 4),
|
||||||
);
|
);
|
||||||
|
|
||||||
zoomInAnimation = Tween<double>(begin: 1.0, end: 1.5).animate(
|
zoomInAnimation = Tween<double>(begin: 1.0, end: 1.5).animate(
|
||||||
@@ -45,7 +45,7 @@ class SplashScreenController extends GetxController
|
|||||||
}
|
}
|
||||||
|
|
||||||
void startTimer() {
|
void startTimer() {
|
||||||
Timer(const Duration(seconds: 7), () {
|
Timer(const Duration(seconds: 4), () {
|
||||||
box.read(BoxName.onBoarding) == null
|
box.read(BoxName.onBoarding) == null
|
||||||
? Get.off(() => OnBoardingPage())
|
? Get.off(() => OnBoardingPage())
|
||||||
: box.read(BoxName.email) != null
|
: box.read(BoxName.email) != null
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ class MyTranslation extends Translations {
|
|||||||
"My Wallet": "محفظتي",
|
"My Wallet": "محفظتي",
|
||||||
"Tariff": "تعرفة",
|
"Tariff": "تعرفة",
|
||||||
"Settings": "الإعدادات",
|
"Settings": "الإعدادات",
|
||||||
"Feed Back": "التغذية الراجعة",
|
"Feed Back": "اقتراحات",
|
||||||
"Promos": "العروض الترويجية",
|
"Promos": "العروض الترويجية",
|
||||||
"Please enter a valid 16-digit card number":
|
"Please enter a valid 16-digit card number":
|
||||||
"الرجاء إدخال رقم بطاقة صالح مكون من 16 رقمًا",
|
"الرجاء إدخال رقم بطاقة صالح مكون من 16 رقمًا",
|
||||||
@@ -438,6 +438,14 @@ class MyTranslation extends Translations {
|
|||||||
'Camera not initilaized yet': "الكاميرا لم تُثبت بعد",
|
'Camera not initilaized yet': "الكاميرا لم تُثبت بعد",
|
||||||
'Scan ID MklGoogle': "مسح هوية MklGoogle",
|
'Scan ID MklGoogle': "مسح هوية MklGoogle",
|
||||||
'Language': "اللغة",
|
'Language': "اللغة",
|
||||||
|
"Jordan": "الأردن",
|
||||||
|
"USA": "الولايات المتحدة الأمريكية",
|
||||||
|
"Egypt": "مصر",
|
||||||
|
"Turkey": "تركيا",
|
||||||
|
"Saudi Arabia": "المملكة العربية السعودية",
|
||||||
|
"Qatar": "قطر",
|
||||||
|
"Bahrain": "البحرين",
|
||||||
|
"Kuwait": "الكويت",
|
||||||
'Your trip cost is': "تكلفة رحلتك هي",
|
'Your trip cost is': "تكلفة رحلتك هي",
|
||||||
'But you have a negative salary of': "لكن لديك راتب سلبي بقيمة",
|
'But you have a negative salary of': "لكن لديك راتب سلبي بقيمة",
|
||||||
' in your': "في",
|
' in your': "في",
|
||||||
@@ -558,7 +566,11 @@ class MyTranslation extends Translations {
|
|||||||
'Night': "الليل",
|
'Night': "الليل",
|
||||||
'from 23:59 till 05:30': "من 23:59 إلى 05:30",
|
'from 23:59 till 05:30': "من 23:59 إلى 05:30",
|
||||||
'Rate Driver': "تقييم السائق",
|
'Rate Driver': "تقييم السائق",
|
||||||
|
'Total Cost is ': ' صافي الربح ',
|
||||||
|
'Write note': 'اكتب ملاحظه',
|
||||||
|
'Time to arrive': 'وقت الوصول',
|
||||||
'Ride Summaries': "ملخصات الرحلات",
|
'Ride Summaries': "ملخصات الرحلات",
|
||||||
|
'Total Cost': "المبلغ الاجمالي",
|
||||||
'Average of Hours of': "متوسط ساعات",
|
'Average of Hours of': "متوسط ساعات",
|
||||||
' is ON for this month': "في هذا الشهر",
|
' is ON for this month': "في هذا الشهر",
|
||||||
'Days': "أيام",
|
'Days': "أيام",
|
||||||
|
|||||||
@@ -29,6 +29,14 @@ class ProfileController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String? selectedCountry;
|
||||||
|
|
||||||
|
void setCountry(String? country) {
|
||||||
|
selectedCountry = country;
|
||||||
|
// box.write(BoxName.countryCode, country);
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
updateColumn(Map<String, dynamic> payload) async {
|
updateColumn(Map<String, dynamic> payload) async {
|
||||||
isloading = true;
|
isloading = true;
|
||||||
update();
|
update();
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ class RateController extends GetxController {
|
|||||||
void addRateToPassenger() async {
|
void addRateToPassenger() async {
|
||||||
// HomeCaptainController homeCaptainController =
|
// HomeCaptainController homeCaptainController =
|
||||||
// Get.find<HomeCaptainController>();
|
// Get.find<HomeCaptainController>();
|
||||||
|
// Get.put(MapDriverController());
|
||||||
if (selectedRateItemId < 1) {
|
if (selectedRateItemId < 1) {
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'You Should choose rate figure'.tr,
|
title: 'You Should choose rate figure'.tr,
|
||||||
@@ -50,18 +51,17 @@ class RateController extends GetxController {
|
|||||||
'rating': selectedRateItemId.toString(),
|
'rating': selectedRateItemId.toString(),
|
||||||
'comment': comment.text,
|
'comment': comment.text,
|
||||||
});
|
});
|
||||||
await CRUD()
|
await CRUD().sendEmail(AppLink.sendEmailToPassengerForTripDetails, {
|
||||||
.post(link: AppLink.sendEmailToPassengerForTripDetails, payload: {
|
|
||||||
'startLocation':
|
'startLocation':
|
||||||
Get.find<MapDriverController>().latLngpassengerLocation.toString(),
|
Get.find<MapDriverController>().passengerLocation.toString(),
|
||||||
'endLocation': Get.find<MapDriverController>()
|
'endLocation':
|
||||||
.latLngPassengerDestination
|
Get.find<MapDriverController>().passengerDestination.toString(),
|
||||||
.toString(),
|
|
||||||
'name': Get.find<MapDriverController>().name.toString(),
|
'name': Get.find<MapDriverController>().name.toString(),
|
||||||
'timeOfTrip': Get.find<MapDriverController>().duration.toString(),
|
'timeOfTrip': Get.find<MapDriverController>().timeOfOrder.toString(),
|
||||||
'fee': Get.find<MapDriverController>().timeOfOrder.toString(),
|
'fee': Get.find<MapDriverController>().totalPassenger.toString(),
|
||||||
'duration': Get.find<MapDriverController>().duration.toString(),
|
'duration': Get.find<MapDriverController>().duration.toString(),
|
||||||
'phone': Get.find<MapDriverController>().phone.toString(),
|
'phone': Get.find<MapDriverController>().phone.toString(),
|
||||||
|
'email': Get.find<MapDriverController>().email.toString(),
|
||||||
});
|
});
|
||||||
// homeCaptainController.isActive = true;
|
// homeCaptainController.isActive = true;
|
||||||
// update();
|
// update();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:SEFER/constant/box_name.dart';
|
||||||
import 'package:firebase_core/firebase_core.dart';
|
import 'package:firebase_core/firebase_core.dart';
|
||||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -41,7 +42,8 @@ void main() async {
|
|||||||
// Get.put(DriverCallController());
|
// Get.put(DriverCallController());
|
||||||
await AC().gAK();
|
await AC().gAK();
|
||||||
print(
|
print(
|
||||||
'local is t ${WidgetsBinding.instance.platformDispatcher.locale.countryCode}');
|
'local is ${WidgetsBinding.instance.platformDispatcher.locale.countryCode}');
|
||||||
|
|
||||||
print(Get.deviceLocale!.countryCode);
|
print(Get.deviceLocale!.countryCode);
|
||||||
Stripe.publishableKey = AK.publishableKey;
|
Stripe.publishableKey = AK.publishableKey;
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ class OnBoardingPage extends StatelessWidget {
|
|||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
child: const CustomSliderOnBoarding(),
|
|
||||||
height: Get.height * .7,
|
height: Get.height * .7,
|
||||||
|
child: const CustomSliderOnBoarding(),
|
||||||
),
|
),
|
||||||
const CustomDotControllerOnBoarding(),
|
const CustomDotControllerOnBoarding(),
|
||||||
// const Spacer(flex: 2),
|
// const Spacer(flex: 2),
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import 'package:SEFER/views/widgets/my_textField.dart';
|
|||||||
|
|
||||||
import '../../constant/info.dart';
|
import '../../constant/info.dart';
|
||||||
import '../../controller/auth/login_controller.dart';
|
import '../../controller/auth/login_controller.dart';
|
||||||
|
import '../home/profile/passenger_profile_page.dart';
|
||||||
import '../widgets/mycircular.dart';
|
import '../widgets/mycircular.dart';
|
||||||
import 'register_page.dart';
|
import 'register_page.dart';
|
||||||
|
|
||||||
@@ -72,6 +73,8 @@ class LoginPage extends StatelessWidget {
|
|||||||
body: [
|
body: [
|
||||||
if (box.read(BoxName.agreeTerms) != 'agreed')
|
if (box.read(BoxName.agreeTerms) != 'agreed')
|
||||||
agreedPage()
|
agreedPage()
|
||||||
|
else if (box.read(BoxName.countryCode) == null)
|
||||||
|
CountryPicker()
|
||||||
else
|
else
|
||||||
SingleChildScrollView(
|
SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -231,7 +234,10 @@ class LoginPage extends StatelessWidget {
|
|||||||
displayFullTextOnTap: true,
|
displayFullTextOnTap: true,
|
||||||
stopPauseOnTap: true,
|
stopPauseOnTap: true,
|
||||||
),
|
),
|
||||||
const Spacer(),
|
// const Spacer(),
|
||||||
|
const SizedBox(
|
||||||
|
height: 40,
|
||||||
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => Get.to(LoginCaptin()),
|
onTap: () => Get.to(LoginCaptin()),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|||||||
@@ -8,10 +8,13 @@ import 'package:SEFER/views/widgets/mycircular.dart';
|
|||||||
|
|
||||||
import '../../../../constant/colors.dart';
|
import '../../../../constant/colors.dart';
|
||||||
import '../../../../constant/info.dart';
|
import '../../../../constant/info.dart';
|
||||||
|
import '../../../../constant/links.dart';
|
||||||
import '../../../../constant/style.dart';
|
import '../../../../constant/style.dart';
|
||||||
import '../../../../constant/table_names.dart';
|
import '../../../../constant/table_names.dart';
|
||||||
|
import '../../../../controller/functions/crud.dart';
|
||||||
import '../../../../controller/functions/location_controller.dart';
|
import '../../../../controller/functions/location_controller.dart';
|
||||||
import '../../../../controller/home/captin/home_captain_controller.dart';
|
import '../../../../controller/home/captin/home_captain_controller.dart';
|
||||||
|
import '../../../../controller/home/captin/map_driver_controller.dart';
|
||||||
import '../../../../controller/home/captin/order_request_controller.dart';
|
import '../../../../controller/home/captin/order_request_controller.dart';
|
||||||
import '../../../../controller/home/captin/widget/call_page.dart';
|
import '../../../../controller/home/captin/widget/call_page.dart';
|
||||||
import '../../../../controller/home/captin/widget/connect.dart';
|
import '../../../../controller/home/captin/widget/connect.dart';
|
||||||
@@ -119,7 +122,7 @@ class HomeCaptain extends StatelessWidget {
|
|||||||
builder: (homeCaptainController) => Container(
|
builder: (homeCaptainController) => Container(
|
||||||
decoration: AppStyle.boxDecoration,
|
decoration: AppStyle.boxDecoration,
|
||||||
width: Get.width * .8,
|
width: Get.width * .8,
|
||||||
height: 80,
|
height: 104,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
@@ -195,12 +198,31 @@ class HomeCaptain extends StatelessWidget {
|
|||||||
// border: Border.all(),
|
// border: Border.all(),
|
||||||
// borderRadius: BorderRadius.circular(15)),
|
// borderRadius: BorderRadius.circular(15)),
|
||||||
// child: IconButton(
|
// child: IconButton(
|
||||||
// onPressed: () {
|
// onPressed: () async {
|
||||||
// Get.to(
|
// CRUD().sendEmail(AppLink.sendEmailToPassengerForTripDetails, {
|
||||||
// () => const DriverCallPage(),
|
// 'startLocation': Get.find<MapDriverController>()
|
||||||
// );
|
// .passengerLocation
|
||||||
|
// .toString(),
|
||||||
|
// 'endLocation': Get.find<MapDriverController>()
|
||||||
|
// .passengerDestination
|
||||||
|
// .toString(),
|
||||||
|
// 'name': Get.find<MapDriverController>().name.toString(),
|
||||||
|
// 'timeOfTrip':
|
||||||
|
// Get.find<MapDriverController>().timeOfOrder.toString(),
|
||||||
|
// 'fee': Get.find<MapDriverController>()
|
||||||
|
// .totalPassenger
|
||||||
|
// .toString(),
|
||||||
|
// 'duration':
|
||||||
|
// Get.find<MapDriverController>().duration.toString(),
|
||||||
|
// 'phone': Get.find<MapDriverController>().phone.toString(),
|
||||||
|
// 'email': Get.find<MapDriverController>().email.toString(),
|
||||||
|
// });
|
||||||
// },
|
// },
|
||||||
// icon: const Icon(Fontisto.phone),
|
// icon: const Icon(
|
||||||
|
// MaterialCommunityIcons.map_marker_radius,
|
||||||
|
// size: 45,
|
||||||
|
// color: AppColor.blueColor,
|
||||||
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
import 'package:SEFER/constant/colors.dart';
|
||||||
import 'package:SEFER/constant/style.dart';
|
import 'package:SEFER/constant/style.dart';
|
||||||
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
@@ -41,8 +43,9 @@ class GoogleMapApp extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
Icons.map,
|
MaterialCommunityIcons.map_marker_radius,
|
||||||
size: 45,
|
size: 45,
|
||||||
|
color: AppColor.blueColor,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:SEFER/constant/box_name.dart';
|
import 'package:SEFER/constant/box_name.dart';
|
||||||
import 'package:SEFER/constant/colors.dart';
|
import 'package:SEFER/constant/colors.dart';
|
||||||
@@ -25,12 +26,12 @@ class PassengerInfoWindow extends StatelessWidget {
|
|||||||
? Stack(
|
? Stack(
|
||||||
children: [
|
children: [
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 50,
|
bottom: 5,
|
||||||
// left: 8,
|
// left: 8,
|
||||||
child: AnimatedContainer(
|
child: AnimatedContainer(
|
||||||
duration: const Duration(milliseconds: 300),
|
duration: const Duration(milliseconds: 300),
|
||||||
height: controller.passengerInfoWindow,
|
height: controller.passengerInfoWindow,
|
||||||
width: Get.width * .96,
|
width: Get.width * .99,
|
||||||
decoration: AppStyle.boxDecoration,
|
decoration: AppStyle.boxDecoration,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
@@ -39,10 +40,56 @@ class PassengerInfoWindow extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
DefaultTextStyle(
|
DefaultTextStyle(
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
child: Text(
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
'Go to passenger Location now'.tr,
|
'Go to passenger Location now'.tr,
|
||||||
style: AppStyle.title
|
style: AppStyle.title
|
||||||
.copyWith(color: AppColor.greenColor),
|
.copyWith(color: AppColor.greenColor),
|
||||||
|
),
|
||||||
|
controller.isRideBegin
|
||||||
|
? const SizedBox()
|
||||||
|
: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
controller.isSocialPressed =
|
||||||
|
true;
|
||||||
|
await controller
|
||||||
|
.driverCallPassenger();
|
||||||
|
Get.to(
|
||||||
|
() => const CallPage());
|
||||||
|
// launchCommunication('phone',
|
||||||
|
// controller.phone.toString(), '');
|
||||||
|
},
|
||||||
|
child: const Icon(
|
||||||
|
Icons.phone,
|
||||||
|
color: AppColor.blueColor,
|
||||||
|
)),
|
||||||
|
const SizedBox(
|
||||||
|
width: 25,
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
controller.isSocialPressed =
|
||||||
|
true;
|
||||||
|
launchCommunication(
|
||||||
|
'email',
|
||||||
|
controller.phone
|
||||||
|
.toString(),
|
||||||
|
'${'Hello this is Driver'.tr} ${box.read(BoxName.nameDriver)}');
|
||||||
|
},
|
||||||
|
child: const Icon(
|
||||||
|
Icons.email,
|
||||||
|
color: AppColor.redColor,
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
// AnimatedTextKit(
|
// AnimatedTextKit(
|
||||||
// animatedTexts: [
|
// animatedTexts: [
|
||||||
@@ -64,9 +111,10 @@ class PassengerInfoWindow extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text('Duration of the Ride is '.tr,
|
Text(
|
||||||
style: AppStyle.title),
|
controller.hours > 1
|
||||||
Text('${controller.duration} ${'Minute'.tr}',
|
? '${'${'Your Ride Duration is '.tr}${controller.hours}${' H and'.tr}'} ${controller.minutes} m'
|
||||||
|
: '${'Your Ride Duration is '.tr} ${controller.minutes} ${'m'.tr}',
|
||||||
style: AppStyle.title),
|
style: AppStyle.title),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -90,69 +138,23 @@ class PassengerInfoWindow extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
controller.isRideBegin
|
Card(
|
||||||
? const SizedBox()
|
elevation: 5,
|
||||||
: Row(
|
color: AppColor.greenColor,
|
||||||
mainAxisAlignment:
|
child: Padding(
|
||||||
MainAxisAlignment.spaceAround,
|
padding: const EdgeInsets.all(4),
|
||||||
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
IconButton(
|
Text('Total Cost is '.tr,
|
||||||
onPressed: () async {
|
style: AppStyle.title),
|
||||||
controller.isSocialPressed = true;
|
Text(
|
||||||
await controller
|
controller.totalPassenger.toString(),
|
||||||
.driverCallPassenger();
|
style: AppStyle.title,
|
||||||
Get.to(() => const CallPage());
|
),
|
||||||
// launchCommunication('phone',
|
|
||||||
// controller.phone.toString(), '');
|
|
||||||
},
|
|
||||||
icon: const Icon(
|
|
||||||
Icons.phone,
|
|
||||||
color: AppColor.blueColor,
|
|
||||||
)),
|
|
||||||
// IconButton(
|
|
||||||
// onPressed: () async {
|
|
||||||
// controller.isSocialPressed = true;
|
|
||||||
// await controller
|
|
||||||
// .driverCallPassenger();
|
|
||||||
|
|
||||||
// launchCommunication(
|
|
||||||
// 'whatsapp',
|
|
||||||
// controller.phone.toString(),
|
|
||||||
// '${'Hello this is Driver'.tr} ${box.read(BoxName.nameDriver)}');
|
|
||||||
// },
|
|
||||||
// icon: const Icon(
|
|
||||||
// FontAwesome.whatsapp,
|
|
||||||
// color: AppColor.greenColor,
|
|
||||||
// )),
|
|
||||||
// IconButton(
|
|
||||||
// onPressed: () async {
|
|
||||||
// controller.isSocialPressed = true;
|
|
||||||
// await controller
|
|
||||||
// .driverCallPassenger();
|
|
||||||
|
|
||||||
// launchCommunication(
|
|
||||||
// 'sms',
|
|
||||||
// controller.phone.toString(),
|
|
||||||
// '${'Hello this is Driver'.tr} ${box.read(BoxName.nameDriver)}');
|
|
||||||
// },
|
|
||||||
// icon: const Icon(
|
|
||||||
// Icons.sms_rounded,
|
|
||||||
// color: AppColor.blueColor,
|
|
||||||
// )),
|
|
||||||
IconButton(
|
|
||||||
onPressed: () {
|
|
||||||
controller.isSocialPressed = true;
|
|
||||||
launchCommunication(
|
|
||||||
'email',
|
|
||||||
controller.phone.toString(),
|
|
||||||
'${'Hello this is Driver'.tr} ${box.read(BoxName.nameDriver)}');
|
|
||||||
},
|
|
||||||
icon: const Icon(
|
|
||||||
Icons.email,
|
|
||||||
color: AppColor.redColor,
|
|
||||||
)),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
controller.remainingTimeToPassenger != 0
|
controller.remainingTimeToPassenger != 0
|
||||||
? Stack(
|
? Stack(
|
||||||
children: [
|
children: [
|
||||||
@@ -331,7 +333,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
|||||||
)
|
)
|
||||||
: controller.remainingTimeToShowPassengerInfoWindowFromDriver > 0 //
|
: controller.remainingTimeToShowPassengerInfoWindowFromDriver > 0 //
|
||||||
? Positioned(
|
? Positioned(
|
||||||
bottom: Get.height * .3,
|
bottom: Get.height * .2,
|
||||||
left: 15,
|
left: 15,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: AppStyle.boxDecoration,
|
decoration: AppStyle.boxDecoration,
|
||||||
|
|||||||
@@ -227,6 +227,7 @@ class OrderRequestPage extends StatelessWidget {
|
|||||||
'Distance': myList[5].toString(),
|
'Distance': myList[5].toString(),
|
||||||
'name': myList[8].toString(),
|
'name': myList[8].toString(),
|
||||||
'phone': myList[10].toString(),
|
'phone': myList[10].toString(),
|
||||||
|
'email': myList[28].toString(),
|
||||||
'WalletChecked': myList[13].toString(),
|
'WalletChecked': myList[13].toString(),
|
||||||
'tokenPassenger': myList[9].toString(),
|
'tokenPassenger': myList[9].toString(),
|
||||||
'direction':
|
'direction':
|
||||||
@@ -247,6 +248,7 @@ class OrderRequestPage extends StatelessWidget {
|
|||||||
'step4': myList[25].toString(),
|
'step4': myList[25].toString(),
|
||||||
'passengerWalletBurc': myList[26].toString(),
|
'passengerWalletBurc': myList[26].toString(),
|
||||||
'timeOfOrder': DateTime.now().toString(),
|
'timeOfOrder': DateTime.now().toString(),
|
||||||
|
'totalPassenger': myList[2].toString(),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:SEFER/views/home/profile/feed_back_page.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -31,11 +32,58 @@ class RideBeginPassenger extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'You will arrive to your destination after timer end.'.tr,
|
// 'You will arrive to your destination after timer end.'.tr,
|
||||||
|
'Time to arrive'.tr,
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
),
|
),
|
||||||
|
Text(
|
||||||
|
controller.arrivalTime,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'Total Cost'.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
controller.totalPassenger.toStringAsFixed(2),
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Text('Write note'.tr),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
Get.to(
|
||||||
|
() => FeedBackPage(),
|
||||||
|
transition: Transition.downToUp,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.note_add,
|
||||||
|
color: AppColor.redColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
Stack(
|
Stack(
|
||||||
children: [
|
children: [
|
||||||
// StreamCounter(),
|
// StreamCounter(),
|
||||||
@@ -44,7 +92,7 @@ class RideBeginPassenger extends StatelessWidget {
|
|||||||
color: controller.remainingTimeTimerRideBegin < 60
|
color: controller.remainingTimeTimerRideBegin < 60
|
||||||
? AppColor.redColor
|
? AppColor.redColor
|
||||||
: AppColor.greenColor,
|
: AppColor.greenColor,
|
||||||
minHeight: 45,
|
minHeight: 25,
|
||||||
borderRadius: BorderRadius.circular(15),
|
borderRadius: BorderRadius.circular(15),
|
||||||
value: controller.progressTimerRideBegin.toDouble(),
|
value: controller.progressTimerRideBegin.toDouble(),
|
||||||
),
|
),
|
||||||
@@ -133,7 +181,7 @@ class RideBeginPassenger extends StatelessWidget {
|
|||||||
phoneNumber = phoneNumber.replaceAll('0', '');
|
phoneNumber = phoneNumber.replaceAll('0', '');
|
||||||
print(phoneNumber); // Output: 798583061
|
print(phoneNumber); // Output: 798583061
|
||||||
var phone =
|
var phone =
|
||||||
'+962${box.read(BoxName.sosPhonePassenger)}';
|
'+${box.read(BoxName.countryCode)}${box.read(BoxName.sosPhonePassenger)}';
|
||||||
controller.sendWhatsapp(phone);
|
controller.sendWhatsapp(phone);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,9 +12,11 @@ GetBuilder<MapPassengerController> timerForCancelTripFromPassenger() {
|
|||||||
|
|
||||||
return controller.remainingTime > 0 && controller.remainingTime != 25
|
return controller.remainingTime > 0 && controller.remainingTime != 25
|
||||||
? Positioned(
|
? Positioned(
|
||||||
bottom: Get.height * .35,
|
bottom: 5,
|
||||||
left: Get.width * .05,
|
left: 10,
|
||||||
|
right: 10,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
height: 180,
|
||||||
decoration: AppStyle.boxDecoration,
|
decoration: AppStyle.boxDecoration,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class TimerToPassengerFromDriver extends StatelessWidget {
|
|||||||
60
|
60
|
||||||
? AppColor.redColor
|
? AppColor.redColor
|
||||||
: AppColor.greenColor,
|
: AppColor.greenColor,
|
||||||
minHeight: 50,
|
minHeight: 25,
|
||||||
borderRadius: BorderRadius.circular(15),
|
borderRadius: BorderRadius.circular(15),
|
||||||
value: controller
|
value: controller
|
||||||
.progressTimerToPassengerFromDriverAfterApplied
|
.progressTimerToPassengerFromDriverAfterApplied
|
||||||
@@ -64,6 +64,13 @@ class TimerToPassengerFromDriver extends StatelessWidget {
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.phone,
|
||||||
|
color: AppColor.blueColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
controller.remainingTimeToPassengerFromDriverAfterApplied < 60
|
controller.remainingTimeToPassengerFromDriverAfterApplied < 60
|
||||||
? MyElevatedButton(
|
? MyElevatedButton(
|
||||||
title: 'You can cancel trip'.tr,
|
title: 'You can cancel trip'.tr,
|
||||||
|
|||||||
@@ -298,3 +298,52 @@ class EducationDegreePicker extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class CountryPicker extends StatelessWidget {
|
||||||
|
final ProfileController controller = Get.put(ProfileController());
|
||||||
|
|
||||||
|
final List<String> countryOptions = [
|
||||||
|
'Jordan'.tr,
|
||||||
|
'USA'.tr,
|
||||||
|
'Egypt'.tr,
|
||||||
|
'Turkey'.tr,
|
||||||
|
'Saudi Arabia'.tr,
|
||||||
|
'Qatar'.tr,
|
||||||
|
'Bahrain'.tr,
|
||||||
|
'Kuwait'.tr,
|
||||||
|
];
|
||||||
|
|
||||||
|
CountryPicker({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 300,
|
||||||
|
child: CupertinoPicker(
|
||||||
|
itemExtent: 32,
|
||||||
|
onSelectedItemChanged: (int index) {
|
||||||
|
controller.setCountry(countryOptions[index]);
|
||||||
|
},
|
||||||
|
children: List.generate(
|
||||||
|
countryOptions.length,
|
||||||
|
(index) => Center(
|
||||||
|
child: Text(
|
||||||
|
countryOptions[index],
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MyElevatedButton(
|
||||||
|
title: controller.selectedCountry.toString(),
|
||||||
|
onPressed: () {
|
||||||
|
box.write(
|
||||||
|
BoxName.countryCode, controller.selectedCountry.toString());
|
||||||
|
})
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user