4/2/8
This commit is contained in:
@@ -155,14 +155,14 @@ class HomeCaptainController extends GetxController {
|
||||
update();
|
||||
}
|
||||
|
||||
late GoogleMapController mapHomeCaptaiController;
|
||||
late GoogleMapController mapHomeCaptainController;
|
||||
void onMapCreated(GoogleMapController controller) {
|
||||
mapHomeCaptaiController = controller;
|
||||
mapHomeCaptainController = controller;
|
||||
controller.getVisibleRegion();
|
||||
// Animate camera to user location (optional)
|
||||
controller.animateCamera(
|
||||
CameraUpdate.newLatLng(Get.find<LocationController>().myLocation),
|
||||
);
|
||||
update();
|
||||
}
|
||||
|
||||
void savePeriod(Duration period) {
|
||||
@@ -212,7 +212,7 @@ class HomeCaptainController extends GetxController {
|
||||
getCountRideToday();
|
||||
getAllPayment();
|
||||
startPeriodicExecution();
|
||||
onMapCreated(mapHomeCaptaiController);
|
||||
onMapCreated(mapHomeCaptainController);
|
||||
totalPoints = Get.find<CaptainWalletController>().totalPoints;
|
||||
getRefusedOrderByCaptain();
|
||||
// LocationController().getLocation();
|
||||
|
||||
@@ -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