1/25/1
This commit is contained in:
@@ -36,7 +36,7 @@ class HistoryDetailsPage extends StatelessWidget {
|
||||
String mapUrl =
|
||||
'https://www.google.com/maps/dir/${res['start_location']}/${res['end_location']}/';
|
||||
print(mapUrl);
|
||||
launchUrl1(mapUrl);
|
||||
showInBrowser(mapUrl);
|
||||
},
|
||||
child: Text(
|
||||
'Trip on Map Click here'.tr,
|
||||
|
||||
@@ -42,7 +42,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
String mapUrl =
|
||||
'https://www.google.com/maps/dir/${myList[0]}/${myList[1]}/';
|
||||
print(mapUrl);
|
||||
launchUrl1(mapUrl);
|
||||
showInBrowser(mapUrl);
|
||||
},
|
||||
icon: const Icon(Icons.map),
|
||||
label: myList[20].toString() == 'haveSteps'
|
||||
|
||||
@@ -81,7 +81,7 @@ GetBuilder<MapPassengerController> buttomSheetMapPage() {
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
Text(
|
||||
'${'You trip distance is'.tr} ${controller.distance} KM',
|
||||
'${'Your trip distance is'.tr} ${controller.distance.toStringAsFixed(2)} KM',
|
||||
style: AppStyle.subtitle,
|
||||
)
|
||||
],
|
||||
|
||||
@@ -39,6 +39,7 @@ class RideBeginPassenger extends StatelessWidget {
|
||||
),
|
||||
Stack(
|
||||
children: [
|
||||
// StreamCounter(),
|
||||
LinearProgressIndicator(
|
||||
backgroundColor: AppColor.accentColor,
|
||||
color: controller.remainingTimeTimerRideBegin < 60
|
||||
@@ -200,3 +201,39 @@ class RideBeginPassenger extends StatelessWidget {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class StreamCounter extends StatelessWidget {
|
||||
const StreamCounter({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
// Build the UI based on the timer value
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(MapPassengerController());
|
||||
return GetBuilder<MapPassengerController>(builder: (controller) {
|
||||
return StreamBuilder<int>(
|
||||
initialData: 0,
|
||||
stream: controller.timerController.stream,
|
||||
builder: (context, snapshot) {
|
||||
// Calculate the remaining time based on the current tick
|
||||
final remainingTime = controller.durationToRide - snapshot.data!;
|
||||
|
||||
// Format the remaining time as a string
|
||||
final formattedRemainingTime =
|
||||
'${(remainingTime / 60).floor()}:${(remainingTime % 60).toString().padLeft(2, '0')}';
|
||||
|
||||
// Return the UI widgets based on the remaining time
|
||||
return Column(
|
||||
children: [
|
||||
Text(formattedRemainingTime),
|
||||
// ElevatedButton(
|
||||
// onPressed: () {
|
||||
// // Handle button press here
|
||||
// },
|
||||
// ),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ class OrderHistory extends StatelessWidget {
|
||||
String mapUrl =
|
||||
'https://www.google.com/maps/dir/${rides['start_location']}/${rides['end_location']}/';
|
||||
// print(mapUrl);
|
||||
launchUrl1(mapUrl);
|
||||
showInBrowser(mapUrl);
|
||||
},
|
||||
child: Text(
|
||||
'Click here to Show it in Map',
|
||||
|
||||
Reference in New Issue
Block a user