2/4/1
This commit is contained in:
@@ -93,6 +93,8 @@ class MapPassengerController extends GetxController {
|
||||
double mainBottomMenuMapHeight = Get.height * .2;
|
||||
double wayPointSheetHeight = 0;
|
||||
bool startLocationFromMap = false;
|
||||
bool workLocationFromMap = false;
|
||||
bool homeLocationFromMap = false;
|
||||
bool startLocationFromMap0 = false;
|
||||
bool startLocationFromMap1 = false;
|
||||
bool startLocationFromMap2 = false;
|
||||
@@ -161,7 +163,7 @@ class MapPassengerController extends GetxController {
|
||||
List<String> currentLocationStringAll = [];
|
||||
List<String> hintTextwayPointStringAll = [];
|
||||
var placesCoordinate = <String>[];
|
||||
String hintTextDestinationPoint = 'Search for your destination'.tr;
|
||||
String hintTextDestinationPoint = 'Select your destination'.tr;
|
||||
late String rideId;
|
||||
bool noCarString = false;
|
||||
bool isCashSelectedBeforeConfirmRide = false;
|
||||
@@ -218,6 +220,7 @@ class MapPassengerController extends GetxController {
|
||||
durationToRide = 0;
|
||||
distanceOfDestnation = 0;
|
||||
wayPointSheetHeight = 0;
|
||||
haveSteps = true;
|
||||
for (var i = 0; i < Get.find<WayPointController>().wayPoints.length; i++) {
|
||||
if (placesCoordinate[i + 1].toString() != '') {
|
||||
await getMapPoints(
|
||||
@@ -346,6 +349,16 @@ class MapPassengerController extends GetxController {
|
||||
}
|
||||
}
|
||||
|
||||
void convertHintTextDestinationNewPlacesFromRecent(
|
||||
List recentLocations, int index) {
|
||||
hintTextDestinationPoint = recentLocations[index]['name'];
|
||||
double lat = recentLocations[index]['latitude'];
|
||||
double lng = recentLocations[index]['longitude'];
|
||||
newMyLocation = LatLng(lat, lng);
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
// final mainBottomMenuMap = GlobalKey<AnimatedContainer>();
|
||||
void changeBottomSheetShown() {
|
||||
isBottomSheetShown = !isBottomSheetShown;
|
||||
@@ -486,10 +499,10 @@ class MapPassengerController extends GetxController {
|
||||
'passenger_id': box.read(BoxName.passengerID).toString(),
|
||||
'balance': ((-1) * totalPassenger).toString()
|
||||
});
|
||||
Get.to(() => RateCaptainFromPassenger(), arguments: {
|
||||
'driverId': driverId.toString(),
|
||||
'rideId': rideId.toString(),
|
||||
});
|
||||
// Get.to(() => RateCaptainFromPassenger(), arguments: {
|
||||
// 'driverId': driverId.toString(),
|
||||
// 'rideId': rideId.toString(),
|
||||
// });
|
||||
}
|
||||
|
||||
void getBeginRideFromDriver() async {
|
||||
@@ -634,7 +647,7 @@ class MapPassengerController extends GetxController {
|
||||
'${data[0]["end_location"]['lat']},${data[0]["end_location"]['lng']}',
|
||||
totalPassenger.toString(),
|
||||
totalDriver.toString(),
|
||||
duration.toString(),
|
||||
durationToRide.toString(),
|
||||
distance.toString(),
|
||||
dataCarsLocationByPassenger['message'][carsOrder]['driver_id']
|
||||
.toString(),
|
||||
@@ -985,7 +998,7 @@ class MapPassengerController extends GetxController {
|
||||
} else {
|
||||
isMainBottomMenuMap = !isMainBottomMenuMap;
|
||||
mainBottomMenuMapHeight =
|
||||
isMainBottomMenuMap == true ? Get.height * .2 : Get.height * .6;
|
||||
isMainBottomMenuMap == true ? Get.height * .2 : Get.height * .5;
|
||||
isWayPointSheet = false;
|
||||
if (heightMenuBool == true) {
|
||||
getDrawerMenu();
|
||||
@@ -1499,10 +1512,10 @@ class MapPassengerController extends GetxController {
|
||||
|
||||
double distanceOfDestnation = 0;
|
||||
bool haveSteps = false;
|
||||
late LatLng latestPosition;
|
||||
late LatLng latestPosition = LatLng(0, 0);
|
||||
getMapPoints(String originSteps, String destinationSteps, int index) async {
|
||||
isWayPointStopsSheetUtilGetMap = false;
|
||||
haveSteps = true;
|
||||
// haveSteps = true;
|
||||
await getCarsLocationByPassenger();
|
||||
// isLoading = true;
|
||||
update();
|
||||
@@ -1521,9 +1534,11 @@ class MapPassengerController extends GetxController {
|
||||
final points =
|
||||
decodePolyline(response["routes"][0]["overview_polyline"]["points"]);
|
||||
for (int i = 0; i < points.length; i++) {
|
||||
double lat = points[i][0].toDouble();
|
||||
double lng = points[i][1].toDouble();
|
||||
polylineCoordinatesPointsAll[index].add(LatLng(lat, lng));
|
||||
if (points[i][0].toString() != '') {
|
||||
double lat = points[i][0].toDouble();
|
||||
double lng = points[i][1].toDouble();
|
||||
polylineCoordinatesPointsAll[index].add(LatLng(lat, lng));
|
||||
}
|
||||
}
|
||||
// Define the northeast and southwest coordinates
|
||||
|
||||
|
||||
Reference in New Issue
Block a user