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(
|
||||
latLngPassengerDestination.latitude,
|
||||
latLngPassengerDestination.longitude,
|
||||
|
||||
@@ -271,6 +271,12 @@ class MapPassengerController extends GetxController {
|
||||
coordinatesWithoutEmpty[i + 1].toString(),
|
||||
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.remainingTimeTimerRideBegin > 60
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
title: 'End Ride'.tr,
|
||||
@@ -86,12 +86,19 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
},
|
||||
kolor: AppColor.redColor,
|
||||
),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Text(
|
||||
mapDriverController.carType,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
mapDriverController.remainingTimeTimerRideBegin < 60
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
title: 'End Ride'.tr,
|
||||
@@ -100,10 +107,17 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
},
|
||||
kolor: AppColor.redColor,
|
||||
),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Text(
|
||||
mapDriverController.carType,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
mapDriverController.carType != 'Comfort' ||
|
||||
mapDriverController.carType != 'Comfort' &&
|
||||
mapDriverController.carType != 'Mashwari'
|
||||
? Stack(
|
||||
children: [
|
||||
@@ -130,13 +144,6 @@ GetBuilder<MapDriverController> driverEndRideBar() {
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Text(
|
||||
mapDriverController.carType,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
))
|
||||
|
||||
@@ -177,12 +177,12 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
controller.driverToken);
|
||||
Get.back();
|
||||
},
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.all(10),
|
||||
child: Container(
|
||||
decoration:
|
||||
AppStyle.boxDecoration1,
|
||||
child: Container(
|
||||
decoration:
|
||||
AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.all(10),
|
||||
child: Text(
|
||||
'Hello, I\'m at the agreed-upon location'
|
||||
.tr,
|
||||
@@ -201,12 +201,12 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
controller.driverToken);
|
||||
Get.back();
|
||||
},
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.all(10),
|
||||
child: Container(
|
||||
decoration:
|
||||
AppStyle.boxDecoration1,
|
||||
child: Container(
|
||||
decoration:
|
||||
AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.all(10),
|
||||
child: Text(
|
||||
'My location is correct. You can search for me using the navigation app'
|
||||
.tr,
|
||||
@@ -225,12 +225,12 @@ class ApplyOrderWidget extends StatelessWidget {
|
||||
controller.driverToken);
|
||||
Get.back();
|
||||
},
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.all(10),
|
||||
child: Container(
|
||||
decoration:
|
||||
AppStyle.boxDecoration1,
|
||||
child: Container(
|
||||
decoration:
|
||||
AppStyle.boxDecoration1,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.all(10),
|
||||
child: Text(
|
||||
'I\'m waiting for you'.tr,
|
||||
style: AppStyle.title,
|
||||
|
||||
@@ -36,6 +36,28 @@ class RideBeginPassenger extends StatelessWidget {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
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(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
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(
|
||||
children: [
|
||||
// StreamCounter(),
|
||||
|
||||
Reference in New Issue
Block a user