10/3/1
This commit is contained in:
@@ -178,7 +178,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
box.read(BoxName.tokenDriver).toString(),
|
||||
];
|
||||
// print(bodyToPassenger);
|
||||
FirebasMessagesController()
|
||||
FirebaseMessagesController()
|
||||
.sendNotificanToPassengerToken(
|
||||
'Apply Ride',
|
||||
arguments['DriverList'][9].toString(),
|
||||
@@ -187,7 +187,9 @@ class OrderRequestPage extends StatelessWidget {
|
||||
bodyToPassenger,
|
||||
);
|
||||
Get.back();
|
||||
Get.to(() => PassengerLocationDirection());
|
||||
Get.to(() => PassengerLocationDirection(), arguments: {
|
||||
'passengerLocation': myList[0].toString(),
|
||||
});
|
||||
},
|
||||
),
|
||||
GetBuilder<OrderRequestController>(
|
||||
@@ -222,7 +224,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
orderRequestController.refuseOrder(
|
||||
myList[6].toString(), body.toString());
|
||||
|
||||
FirebasMessagesController()
|
||||
FirebaseMessagesController()
|
||||
.sendNotificanToPassengerToken(
|
||||
'Refused Ride',
|
||||
arguments['DriverList'][9].toString(),
|
||||
|
||||
@@ -4,30 +4,65 @@ import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:ride/controller/home/captin/map_dirction.dart';
|
||||
import 'package:ride/views/widgets/my_scafold.dart';
|
||||
|
||||
import '../../constant/colors.dart';
|
||||
import '../../controller/functions/location_controller.dart';
|
||||
import '../widgets/mycircular.dart';
|
||||
import '../home/map_widget.dart/passenger_info_window.dart';
|
||||
import '../home/map_widget.dart/timer_to_passenger_from_driver.dart';
|
||||
|
||||
class PassengerLocationDirection extends StatelessWidget {
|
||||
PassengerLocationDirection({super.key});
|
||||
// final LocationController locationController = Get.put(LocationController());
|
||||
// final MapDirection mapDirection = Get.find<MapDirection>();
|
||||
final LocationController locationController = Get.put(LocationController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(LocationController());
|
||||
Get.put(MapDirection());
|
||||
|
||||
// mapDirection.getMap();//todo get this argument
|
||||
return MyScafolld(
|
||||
title: 'Map'.tr,
|
||||
body: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: GetBuilder<LocationController>(
|
||||
builder: (controller) => GoogleMap(
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: controller.myLocation,
|
||||
zoom: 15,
|
||||
),
|
||||
)),
|
||||
)
|
||||
child: GetBuilder<MapDirection>(
|
||||
builder: (controller) => GoogleMap(
|
||||
initialCameraPosition: CameraPosition(
|
||||
target: locationController.myLocation,
|
||||
zoom: 15,
|
||||
),
|
||||
polylines: {
|
||||
Polyline(
|
||||
zIndex: 2,
|
||||
consumeTapEvents: true,
|
||||
geodesic: true,
|
||||
endCap: Cap.buttCap,
|
||||
startCap: Cap.buttCap,
|
||||
visible: true,
|
||||
polylineId: const PolylineId('route'),
|
||||
points: controller.polylineCoordinates,
|
||||
color: AppColor.greenColor,
|
||||
width: 5,
|
||||
),
|
||||
},
|
||||
markers: {
|
||||
Marker(
|
||||
markerId: MarkerId('MyLocation'.tr),
|
||||
position: locationController.myLocation,
|
||||
draggable: true,
|
||||
icon: controller.carIcon,
|
||||
infoWindow: const InfoWindow(
|
||||
title: 'Time',
|
||||
// snippet: controller.durationFromDriverToPassenger
|
||||
// .toString(),
|
||||
),
|
||||
),
|
||||
},
|
||||
onCameraMove: (cameraPosition) {
|
||||
controller.updateMarker();
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
// const TimerToPassengerFromDriver(),
|
||||
const PassengerInfoWindow()
|
||||
],
|
||||
isleading: true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user