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

View File

@@ -304,8 +304,16 @@ class MapPage extends StatelessWidget {
return Center( return Center(
child: Container( child: Container(
decoration: AppStyle.boxDecoration, decoration: AppStyle.boxDecoration,
height: 100, // height: 100,
width: 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 { } else {