4/3/5
This commit is contained in:
@@ -130,7 +130,7 @@ class FirebaseMessagesController extends GetxController {
|
||||
// var myPoints = jsonDecode(points) as List<dynamic>;
|
||||
driverToken = myList[14].toString();
|
||||
// This is for location using and uploading status
|
||||
Get.find<HomeCaptainController>().rideId = 'rideId';
|
||||
Get.find<HomeCaptainController>().changeRideId();
|
||||
update();
|
||||
// print('driverToken==============$driverToken');
|
||||
Get.to(() => OrderRequestPage(), arguments: {
|
||||
|
||||
@@ -55,15 +55,6 @@ class LocationController extends GetxController {
|
||||
print('total point is $totalPoints');
|
||||
|
||||
await getLocation();
|
||||
// Animate camera to user location (optional)
|
||||
// if (Get.find<HomeCaptainController>().rideId == 'rideId') {
|
||||
// Get.find<MapDriverController>()
|
||||
// .mapController!
|
||||
// .animateCamera(CameraUpdate.newLatLng(LatLng(
|
||||
// Get.find<LocationController>().myLocation.latitude,
|
||||
// Get.find<LocationController>().myLocation.longitude,
|
||||
// )));
|
||||
// }
|
||||
|
||||
// if (box.read(BoxName.driverID) != null) {
|
||||
await CRUD()
|
||||
@@ -80,6 +71,15 @@ class LocationController extends GetxController {
|
||||
: totalDistance.toStringAsFixed(1),
|
||||
'status': box.read(BoxName.statusDriverLocation).toString()
|
||||
});
|
||||
// Animate camera to user location (optional)
|
||||
if (Get.find<HomeCaptainController>().rideId == 'rideId') {
|
||||
Get.find<MapDriverController>()
|
||||
.mapController!
|
||||
.animateCamera(CameraUpdate.newLatLng(LatLng(
|
||||
Get.find<LocationController>().myLocation.latitude,
|
||||
Get.find<LocationController>().myLocation.longitude,
|
||||
)));
|
||||
}
|
||||
Get.find<HomeCaptainController>()
|
||||
.mapHomeCaptainController
|
||||
.animateCamera(CameraUpdate.newLatLng(LatLng(
|
||||
|
||||
@@ -60,6 +60,11 @@ class HomeCaptainController extends GetxController {
|
||||
Get.to(() => WaletCaptain());
|
||||
}
|
||||
|
||||
void changeRideId() {
|
||||
rideId = 'rideId';
|
||||
update();
|
||||
}
|
||||
|
||||
String stringActiveDuration = '';
|
||||
void onButtonSelected() {
|
||||
// totalPoints = Get.find<CaptainWalletController>().totalPoints;
|
||||
|
||||
Reference in New Issue
Block a user