4/2/8
This commit is contained in:
@@ -91,6 +91,7 @@ class MapDriverController extends GetxController {
|
||||
late LatLng myLocation;
|
||||
int remainingTimeTimerRideBegin = 60;
|
||||
String stringRemainingTimeRideBegin = '';
|
||||
String stringRemainingTimeRideBegin1 = '';
|
||||
double progressTimerRideBegin = 0;
|
||||
late Timer timer;
|
||||
String? mapAPIKEY;
|
||||
@@ -104,7 +105,9 @@ class MapDriverController extends GetxController {
|
||||
myLocation = myLocation;
|
||||
mapController = controller;
|
||||
controller.getVisibleRegion();
|
||||
|
||||
controller.animateCamera(
|
||||
CameraUpdate.newLatLng(Get.find<LocationController>().myLocation),
|
||||
);
|
||||
// Set up a timer or interval to trigger the marker update every 3 seconds.
|
||||
timer = Timer.periodic(const Duration(seconds: 1), (_) {
|
||||
updateMarker();
|
||||
@@ -603,7 +606,10 @@ class MapDriverController extends GetxController {
|
||||
int seconds = remainingTimeTimerRideBegin % 60;
|
||||
stringRemainingTimeRideBegin =
|
||||
'$minutes:${seconds.toString().padLeft(2, '0')}';
|
||||
|
||||
int minutes1 = (rideTimerFromBegin / 60).floor();
|
||||
int seconds1 = rideTimerFromBegin % 60;
|
||||
stringRemainingTimeRideBegin1 =
|
||||
'$minutes1:${seconds1.toString().padLeft(2, '0')}';
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user