This commit is contained in:
Hamza-Ayed
2023-09-23 23:06:02 +03:00
parent 92b0713811
commit ebcc644d8c
2 changed files with 17 additions and 4 deletions

View File

@@ -222,7 +222,10 @@ class MapController extends GetxController {
await Future.delayed(const Duration(seconds: 1));
progress = i / durationTimer;
remainingTime = durationTimer - i;
if (remainingTime == 0) {
rideConfirm = false;
update();
}
update();
}
timerEnded();
@@ -353,12 +356,14 @@ class MapController extends GetxController {
data = [];
changeCancelRidePageShow();
rideConfirm = false;
shouldFetch = false;
update();
} else {
clearPlaces();
clearpolyline();
data = [];
rideConfirm = false;
shouldFetch = false;
changeCancelRidePageShow();
remainingTime = 25;
update();
@@ -624,7 +629,7 @@ class MapController extends GetxController {
newTime1 = currentTime.add(durationfromDriverToPassenger);
duratioByPassenger =
data['rows'][0]['elements'][0]['duration']['text'];
update();
if (distance1 < nearestDistance) {
nearestDistance = distance1.toDouble();

View File

@@ -304,8 +304,16 @@ class MapPage extends StatelessWidget {
return Center(
child: Container(
decoration: AppStyle.boxDecoration,
height: 100,
width: 100,
// height: 100,
// width: 100,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'You Can cancel Ride After Captain did not come in the time'
.tr,
style: AppStyle.subtitle,
),
),
),
);
} else {