3/31/5
This commit is contained in:
@@ -32,7 +32,8 @@ class OrderSpeedRequest extends StatelessWidget {
|
||||
Duration durationToAdd = Duration(seconds: int.parse(myList[4]));
|
||||
int hours = durationToAdd.inHours;
|
||||
int minutes = (durationToAdd.inMinutes % 60).round();
|
||||
orderRequestController.startTimer(myList[6].toString(), body.toString());
|
||||
orderRequestController.startTimerSpeed(
|
||||
myList[6].toString(), body.toString());
|
||||
var coords = myList[0].split(',');
|
||||
var coordDestination = myList[1].split(',');
|
||||
BitmapDescriptor startIcon = BitmapDescriptor.defaultMarker;
|
||||
@@ -373,7 +374,8 @@ class OrderSpeedRequest extends StatelessWidget {
|
||||
});
|
||||
// .then((value) {
|
||||
var json = jsonDecode(res);
|
||||
if (res == "failure") {
|
||||
print('res $json');
|
||||
if (json['status'] == "failure") {
|
||||
Get.defaultDialog(
|
||||
title:
|
||||
"This ride is already taken by another driver."
|
||||
@@ -440,19 +442,19 @@ class OrderSpeedRequest extends StatelessWidget {
|
||||
),
|
||||
GetBuilder<OrderRequestController>(
|
||||
builder: (timerController) {
|
||||
final isNearEnd = timerController.remainingTime <=
|
||||
final isNearEnd = timerController.remainingTimeSpeed <=
|
||||
5; // Define a threshold for "near end"
|
||||
|
||||
return Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
CircularProgressIndicator(
|
||||
value: timerController.progress,
|
||||
value: timerController.progressSpeed,
|
||||
// Set the color based on the "isNearEnd" condition
|
||||
color: isNearEnd ? Colors.red : Colors.blue,
|
||||
),
|
||||
Text(
|
||||
'${timerController.remainingTime}',
|
||||
'${timerController.remainingTimeSpeed}',
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user