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