8-28/1
This commit is contained in:
@@ -11,6 +11,7 @@ import 'package:ride/constant/box_name.dart';
|
||||
import 'package:ride/constant/credential.dart';
|
||||
import 'package:ride/constant/links.dart';
|
||||
import 'package:ride/controller/functions/crud.dart';
|
||||
import 'package:ride/controller/functions/secure_storage.dart';
|
||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
import '../../main.dart';
|
||||
import '../../models/model/locations.dart';
|
||||
@@ -55,6 +56,13 @@ class MapController extends GetxController {
|
||||
var dataCarsLocationByPassenger;
|
||||
CarLocation? nearestCar;
|
||||
late Timer markerReloadingTimer;
|
||||
|
||||
int selectedPassengerCount = 1;
|
||||
void onChangedPassengerCount(int newValue) {
|
||||
selectedPassengerCount = newValue;
|
||||
update();
|
||||
}
|
||||
|
||||
// final mainBottomMenuMap = GlobalKey<AnimatedContainer>();
|
||||
void changeButtomSheetShown() {
|
||||
isButtomSheetShown = !isButtomSheetShown;
|
||||
@@ -110,6 +118,7 @@ class MapController extends GetxController {
|
||||
changeConfirmRide() {
|
||||
rideConfirm = true;
|
||||
print('rideConfirm= $rideConfirm');
|
||||
|
||||
//TODO add ride and get ride id and details
|
||||
update();
|
||||
}
|
||||
@@ -403,7 +412,7 @@ class MapController extends GetxController {
|
||||
// longitude: double.parse(carLocation['longitude']),
|
||||
// );
|
||||
// }
|
||||
|
||||
isloading = true;
|
||||
update();
|
||||
// Make API request to get exact distance and duration
|
||||
String apiUrl =
|
||||
@@ -426,6 +435,7 @@ class MapController extends GetxController {
|
||||
latitude: double.parse(carLocation['latitude']),
|
||||
longitude: double.parse(carLocation['longitude']),
|
||||
);
|
||||
isloading = false;
|
||||
update();
|
||||
}
|
||||
}
|
||||
@@ -701,7 +711,7 @@ class MapController extends GetxController {
|
||||
}
|
||||
|
||||
List<LatLng> polylineCoordinate = [];
|
||||
|
||||
String? cardNumber;
|
||||
@override
|
||||
void onInit() async {
|
||||
await getLocation();
|
||||
@@ -710,7 +720,7 @@ class MapController extends GetxController {
|
||||
addCustomPicker();
|
||||
addCustomCarIcon();
|
||||
startMarkerReloading();
|
||||
|
||||
cardNumber = await SecureStorage().readData(BoxName.cardNumber);
|
||||
super.onInit();
|
||||
}
|
||||
}
|
||||
@@ -719,8 +729,8 @@ class CarLocation {
|
||||
final int id;
|
||||
final double latitude;
|
||||
final double longitude;
|
||||
double distance;
|
||||
double duration;
|
||||
final double distance;
|
||||
final double duration;
|
||||
|
||||
CarLocation({
|
||||
required this.id,
|
||||
|
||||
Reference in New Issue
Block a user