4/11/1
This commit is contained in:
@@ -413,7 +413,25 @@ class MapDriverController extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void finishRideFromDriver() async {
|
void finishRideFromDriver() {
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: 'Are you sure to exit ride ?'.tr,
|
||||||
|
titleStyle: AppStyle.title,
|
||||||
|
middleText: '',
|
||||||
|
confirm: MyElevatedButton(
|
||||||
|
title: 'Ok'.tr,
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
finishRideFromDriver1();
|
||||||
|
}),
|
||||||
|
cancel: MyElevatedButton(
|
||||||
|
title: 'Cancel'.tr,
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
void finishRideFromDriver1() async {
|
||||||
double distanceToDestination = Geolocator.distanceBetween(
|
double distanceToDestination = Geolocator.distanceBetween(
|
||||||
latLngPassengerDestination.latitude,
|
latLngPassengerDestination.latitude,
|
||||||
latLngPassengerDestination.longitude,
|
latLngPassengerDestination.longitude,
|
||||||
|
|||||||
@@ -271,6 +271,12 @@ class MapPassengerController extends GetxController {
|
|||||||
coordinatesWithoutEmpty[i + 1].toString(),
|
coordinatesWithoutEmpty[i + 1].toString(),
|
||||||
i,
|
i,
|
||||||
);
|
);
|
||||||
|
if (i == 0) {
|
||||||
|
startNameAddress = data[0]['start_address'];
|
||||||
|
}
|
||||||
|
if (i == coordinatesWithoutEmpty.length) {
|
||||||
|
endNameAddress = data[0]['end_address'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
|||||||
mapDriverController.carType == 'Comfort') &&
|
mapDriverController.carType == 'Comfort') &&
|
||||||
mapDriverController.remainingTimeTimerRideBegin > 60
|
mapDriverController.remainingTimeTimerRideBegin > 60
|
||||||
? Row(
|
? Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
MyElevatedButton(
|
MyElevatedButton(
|
||||||
title: 'End Ride'.tr,
|
title: 'End Ride'.tr,
|
||||||
@@ -86,12 +86,19 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
|||||||
},
|
},
|
||||||
kolor: AppColor.redColor,
|
kolor: AppColor.redColor,
|
||||||
),
|
),
|
||||||
|
Container(
|
||||||
|
decoration: AppStyle.boxDecoration1,
|
||||||
|
child: Text(
|
||||||
|
mapDriverController.carType,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
mapDriverController.remainingTimeTimerRideBegin < 60
|
mapDriverController.remainingTimeTimerRideBegin < 60
|
||||||
? Row(
|
? Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
MyElevatedButton(
|
MyElevatedButton(
|
||||||
title: 'End Ride'.tr,
|
title: 'End Ride'.tr,
|
||||||
@@ -100,10 +107,17 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
|||||||
},
|
},
|
||||||
kolor: AppColor.redColor,
|
kolor: AppColor.redColor,
|
||||||
),
|
),
|
||||||
|
Container(
|
||||||
|
decoration: AppStyle.boxDecoration1,
|
||||||
|
child: Text(
|
||||||
|
mapDriverController.carType,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
mapDriverController.carType != 'Comfort' ||
|
mapDriverController.carType != 'Comfort' &&
|
||||||
mapDriverController.carType != 'Mashwari'
|
mapDriverController.carType != 'Mashwari'
|
||||||
? Stack(
|
? Stack(
|
||||||
children: [
|
children: [
|
||||||
@@ -130,13 +144,6 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
Container(
|
|
||||||
decoration: AppStyle.boxDecoration1,
|
|
||||||
child: Text(
|
|
||||||
mapDriverController.carType,
|
|
||||||
style: AppStyle.title,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -177,12 +177,12 @@ class ApplyOrderWidget extends StatelessWidget {
|
|||||||
controller.driverToken);
|
controller.driverToken);
|
||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.all(10),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration:
|
decoration:
|
||||||
AppStyle.boxDecoration1,
|
AppStyle.boxDecoration1,
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.all(10),
|
||||||
child: Text(
|
child: Text(
|
||||||
'Hello, I\'m at the agreed-upon location'
|
'Hello, I\'m at the agreed-upon location'
|
||||||
.tr,
|
.tr,
|
||||||
@@ -201,12 +201,12 @@ class ApplyOrderWidget extends StatelessWidget {
|
|||||||
controller.driverToken);
|
controller.driverToken);
|
||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.all(10),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration:
|
decoration:
|
||||||
AppStyle.boxDecoration1,
|
AppStyle.boxDecoration1,
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.all(10),
|
||||||
child: Text(
|
child: Text(
|
||||||
'My location is correct. You can search for me using the navigation app'
|
'My location is correct. You can search for me using the navigation app'
|
||||||
.tr,
|
.tr,
|
||||||
@@ -225,12 +225,12 @@ class ApplyOrderWidget extends StatelessWidget {
|
|||||||
controller.driverToken);
|
controller.driverToken);
|
||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
child: Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.all(10),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration:
|
decoration:
|
||||||
AppStyle.boxDecoration1,
|
AppStyle.boxDecoration1,
|
||||||
|
child: Padding(
|
||||||
|
padding:
|
||||||
|
const EdgeInsets.all(10),
|
||||||
child: Text(
|
child: Text(
|
||||||
'I\'m waiting for you'.tr,
|
'I\'m waiting for you'.tr,
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
|
|||||||
@@ -36,6 +36,28 @@ class RideBeginPassenger extends StatelessWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
CircleAvatar(
|
||||||
|
radius: 30,
|
||||||
|
backgroundImage: NetworkImage(
|
||||||
|
'https://ride.mobile-app.store/portrate_captain_image/${controller.driverId}.jpg'),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
controller.firstName,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'${controller.driverRate} 📈',
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
@@ -107,28 +129,6 @@ class RideBeginPassenger extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
CircleAvatar(
|
|
||||||
radius: 30,
|
|
||||||
backgroundImage: NetworkImage(
|
|
||||||
'https://ride.mobile-app.store/portrate_captain_image/${controller.driverId}.jpg'),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
controller.firstName,
|
|
||||||
style: AppStyle.title,
|
|
||||||
),
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'${controller.driverRate} 📈',
|
|
||||||
style: AppStyle.title,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Stack(
|
Stack(
|
||||||
children: [
|
children: [
|
||||||
// StreamCounter(),
|
// StreamCounter(),
|
||||||
|
|||||||
Reference in New Issue
Block a user