9/27/1
This commit is contained in:
@@ -22,6 +22,7 @@ import 'map_widget.dart/map_menu_widget.dart';
|
||||
import 'map_widget.dart/menu_map_page.dart';
|
||||
import 'map_widget.dart/payment_method.page.dart';
|
||||
import 'map_widget.dart/timer_for_cancell_trip_from_passenger.dart';
|
||||
import 'map_widget.dart/timer_to_passenger_from_driver.dart';
|
||||
|
||||
class MapPage extends StatelessWidget {
|
||||
const MapPage({super.key});
|
||||
@@ -64,7 +65,7 @@ class MapPage extends StatelessWidget {
|
||||
child: Stack(
|
||||
children: [
|
||||
GetBuilder<MapController>(
|
||||
builder: (controller) => controller.isloading
|
||||
builder: (controller) => controller.isLoading
|
||||
? const MyCircularProgressIndicator()
|
||||
: GoogleMap(
|
||||
onMapCreated: controller.onMapCreated,
|
||||
@@ -83,11 +84,11 @@ class MapPage extends StatelessWidget {
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Ok'.tr,
|
||||
onPressed: () async {
|
||||
controller.clearpolyline();
|
||||
controller.clearPolyline();
|
||||
if (controller.dataCarsLocationByPassenger !=
|
||||
null) {
|
||||
await controller.getMap(
|
||||
'${controller.mylocation.latitude},${controller.mylocation.longitude}',
|
||||
'${controller.myLocation.latitude},${controller.myLocation.longitude}',
|
||||
'${argument.latitude.toString()},${argument.longitude.toString()}');
|
||||
|
||||
Get.back();
|
||||
@@ -182,11 +183,11 @@ class MapPage extends StatelessWidget {
|
||||
onTap: (argument) {
|
||||
controller.hidePlaces();
|
||||
|
||||
controller.changeButtomSheetShown();
|
||||
controller.changeBottomSheetShown();
|
||||
// controller.bottomSheet();
|
||||
},
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: controller.mylocation,
|
||||
target: controller.myLocation,
|
||||
zoom: 15,
|
||||
),
|
||||
markers: {
|
||||
@@ -206,22 +207,27 @@ class MapPage extends StatelessWidget {
|
||||
markerId: MarkerId(carLocation.toString())),
|
||||
Marker(
|
||||
markerId: MarkerId('MyLocation'.tr),
|
||||
position: controller.mylocation,
|
||||
position: controller.myLocation,
|
||||
draggable: true,
|
||||
icon: controller.markerIcon,
|
||||
infoWindow: InfoWindow(
|
||||
title: 'Time',
|
||||
snippet: controller.durationFromDriverToPassenger
|
||||
.toString(),
|
||||
),
|
||||
onDragEnd: (value) {
|
||||
print(value);
|
||||
},
|
||||
infoWindow: InfoWindow(title: 'my location'.tr),
|
||||
),
|
||||
Marker(
|
||||
markerId: MarkerId('Target'.tr),
|
||||
position: controller.mydestination,
|
||||
draggable: true,
|
||||
onDragEnd: (v) {
|
||||
print(v);
|
||||
},
|
||||
// infoWindow: InfoWindow(title: 'my location'.tr),
|
||||
),
|
||||
// Marker(
|
||||
// markerId: MarkerId('Target'.tr),
|
||||
// position: controller.myDestination,
|
||||
// draggable: true,
|
||||
// onDragEnd: (v) {
|
||||
// print(v);
|
||||
// },
|
||||
// ),
|
||||
},
|
||||
polylines: {
|
||||
Polyline(
|
||||
@@ -261,6 +267,18 @@ class MapPage extends StatelessWidget {
|
||||
// radius: 60,
|
||||
// fillColor: AppColor.primaryColor,)
|
||||
// },
|
||||
|
||||
circles: <Circle>{
|
||||
Circle(
|
||||
circleId: const CircleId('circle_id'),
|
||||
center: controller.myLocation,
|
||||
radius: 100,
|
||||
fillColor: Colors.blue.withOpacity(0.3),
|
||||
strokeColor: Colors.blue,
|
||||
strokeWidth: 2,
|
||||
),
|
||||
},
|
||||
|
||||
mapType: controller.mapType
|
||||
? MapType.satellite
|
||||
: MapType.normal,
|
||||
@@ -268,11 +286,11 @@ class MapPage extends StatelessWidget {
|
||||
// liteModeEnabled: true, tiltGesturesEnabled: false,
|
||||
|
||||
// indoorViewEnabled: true,
|
||||
trafficEnabled: controller.mapTraficON,
|
||||
trafficEnabled: controller.mapTrafficON,
|
||||
buildingsEnabled: true,
|
||||
mapToolbarEnabled: true,
|
||||
onCameraMove: (position) {
|
||||
controller.newMylocation = position.target;
|
||||
controller.newMyLocation = position.target;
|
||||
// print('my' + controller.mylocation.toString());
|
||||
// print('new' + controller.newMylocation.toString());
|
||||
},
|
||||
@@ -292,34 +310,9 @@ class MapPage extends StatelessWidget {
|
||||
const CancelRidePageShow(),
|
||||
const CashConfirmPageShown(),
|
||||
const PaymentMethodPage(),
|
||||
timerForCancellTripFromPassenger(),
|
||||
const DriverTimeArrivePassengerPage(),
|
||||
GetBuilder<MapController>(builder: (controller) {
|
||||
if (controller.remainingTime == 0
|
||||
//&&
|
||||
// controller.newTime1.isBefore(
|
||||
// controller.currentTime.add(const Duration(minutes: 2)),
|
||||
// )
|
||||
) {
|
||||
return Center(
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
// height: 100,
|
||||
// width: 100,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
'You Can cancel Ride After Captain did not come in the time'
|
||||
.tr,
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return const SizedBox();
|
||||
}
|
||||
}),
|
||||
timerForCancelTripFromPassenger(),
|
||||
// const DriverTimeArrivePassengerPage(),
|
||||
const TimerToPassengerFromDriver(),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -336,7 +329,8 @@ class CancelRidePageShow extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<MapController>(
|
||||
builder: (controller) =>
|
||||
controller.data.isNotEmpty && controller.remainingTime > 0
|
||||
(controller.data.isNotEmpty && controller.remainingTime > 0) ||
|
||||
controller.timeToPassengerFromDriverAfterApplied == 0
|
||||
? Positioned.directional(
|
||||
end: 10,
|
||||
top: 55,
|
||||
|
||||
Reference in New Issue
Block a user