This commit is contained in:
Hamza-Ayed
2024-01-19 15:17:18 +03:00
parent 7af7e71b30
commit ec7f2de651
7 changed files with 84 additions and 116 deletions

View File

@@ -27,6 +27,7 @@ class HomeCaptainController extends GetxController {
String totalMoneyInSEFER = '0';
String totalDurationToday = '0';
Timer? timer;
late LatLng myLocation;
String totalPoints = '0';
String countRefuse = '0';
bool mapType = false;
@@ -146,7 +147,7 @@ class HomeCaptainController extends GetxController {
mapHomeCaptaiController = controller;
controller.getVisibleRegion();
controller.animateCamera(
CameraUpdate.newLatLng(locationController.myLocation),
CameraUpdate.newLatLng(Get.find<LocationController>().myLocation),
);
update();
}
@@ -181,6 +182,8 @@ class HomeCaptainController extends GetxController {
@override
void onInit() async {
await addToken();
// await Get.find<LocationController>().getLocation();
onButtonSelected();
getPaymentToday();
getAllPayment();
@@ -188,6 +191,7 @@ class HomeCaptainController extends GetxController {
onMapCreated(mapHomeCaptaiController!);
getRefusedOrderByCaptain();
totalPoints = Get.find<CaptainWalletController>().totalPoints;
// LocationController().getLocation();
super.onInit();
}