From e3a63e18fca670841600ca8267e5411b101e723c Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Mon, 1 Jan 2024 00:56:25 +0300 Subject: [PATCH] 1/1/1 --- assets/images/brand.png | Bin 1778 -> 2696 bytes assets/images/car.png | Bin 1387 -> 9665 bytes .../home/captin/duration_controller .dart | 61 ++-- .../home/captin/map_driver_controller.dart | 53 +++- .../captin/widget/left_menu_map_captain.dart | 2 +- .../home/map_passenger_controller.dart | 121 ++++---- .../model/driver/rides_summary_model.dart | 12 + lib/views/Rate/ride_calculate_driver.dart | 287 ++++++++++++------ .../google_driver_map_page.dart | 12 + .../orderCaptin/order_request_page.dart | 31 +- .../buttom_sheet_map_show.dart | 142 ++++----- .../google_map_passenger_widget.dart | 4 +- .../home/profile/passenger_profile_page.dart | 4 +- 13 files changed, 437 insertions(+), 292 deletions(-) create mode 100644 lib/models/model/driver/rides_summary_model.dart diff --git a/assets/images/brand.png b/assets/images/brand.png index 887d8a7c6f5320c98407aff2156256967c62df4f..92827208d1d19723ad7ebe0a52177fc26f6d17e3 100644 GIT binary patch literal 2696 zcmb_ec~}z%7LOJvAhO(e6(cB7AlHNtGC)?sO%b^d>#8%!T!aTHMJRz4Et&S`;<<=I$d}-Wc&aB^m!L>E3t?I^ z7nJ-TLQk8`s`NLK;EkekAv{BbL_vb4B}yH8B&@Myh^wQ5GKY#cUZ6KuF)MLhC6P$d zJPAgIP9cNj3M6W~4DljFAPT8c&Ov5Rz*|5cIRc>wmjzG&8j%VRX&6ECR5MNVe5>$N zp+Q_0%ygx5VIG|bK~z_wE04w{GAS@ZWV-WQX>?Z@03hZJ)*F}iko;i`2%CDqjn1UH zQW;FTJ7vaaTKS$!lvK$P=*nUNGnT)~el`CuZJtZlyHe-U`hRM)Y}Qw$>+$uMA4F_j%$dTO{8W(az4^n8!Rc9% z%A=%G5z7aXBtxF$`QrbTm8*!JleA{yC~WU zH&&r>*nDA0%eM8E>eVJzH2@%o!UZMVyDfFws?-(-j7(1XS?Lv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$1na(H+co}Zto9kEy};OZ*qBxr~Ts%zm3psTyPo7H~u z^76u@?`dgivFbscq6iy;Xb<2Fv)QbSjg7Ip@A*#8PvIWNhld9!DJg--$VgV>oY2rv zNK8zGrluxxrJoQH5kb1~KX~Cbq_eXVRJVcp`g&ILb&g~-8X+Ym1^WB@X_Ms)j1`TB zh6d8z)z!snIA9|q1a^;)k5>i;23U=A`uh5m_V#vmXHQ2*hmw(zA?;eiy|rLh6Fo)U zwzAr1-6!gZDT9N9q)R5)g{NPfPCYz4@I_FLB&f#P7fW1Z-QC?;3m>`} zf`<)wuz(yNAH&wx7RAoh)fKhl;X`a}ETpHWLsV20{cd)47K)0BbTI^#2%)(aQdwE4 zL`O%{g>^r<3wiWMySB>F1bCCMty!MH{4DD=8_79%OHCkLq~9J$hVR9QDKg zGOnddup^n7nRL%{6&Dw?-txh&n`@n)pEK#_oSmIfsjm7|%AlJe+NnDaTA#lv*m>gv z(MIuC4bfw!QC*u#%@7%#!aW}!AE~^*zo$|LEk-n*A_yC@va&)YCWsKi-04FYY3w06hYb$OxLw(R0Iro+yWrKG9sF5ZES47>FFuS zBAlF@kPhTm4B6S)p>lC?5w^FtLEV$U)YKF-H#gHsh_-pM1y5ee%F3X%wUstirKP3h zRtpOY)Q)oj2@VdnrW(1qxk^t@4{P~Aoq?G2HEnHeN`8L6Rgb!hWG(y%j|d)% zYM@Kt8I~gsAH$x~BP!z4j)L}V};jaDBQy-[].obs; - late AnimationController animationController; - - @override - void onInit() { - super.onInit(); - fetchData(); - animationController = AnimationController( - vsync: this, - duration: const Duration( - milliseconds: 500), // Adjust the animation duration as needed - ); - animationController.forward(); // Start the animation - } - - @override - void onClose() { - animationController.dispose(); - super.onClose(); - } - - Map jsonData = {}; +class DurationController extends GetxController { + final data = DurationData; + // late AnimationController animationController; + late List rideData; + Map jsonData1 = {}; bool isLoading = false; String totalDurationToday = ''; + var chartData; + + @override + void onInit() async { + super.onInit(); + await fetchData(); + } + Future fetchData() async { isLoading = true; update(); // Notify the observers about the loading state change @@ -41,13 +31,22 @@ class DurationController extends GetxController link: AppLink.getTotalDriverDuration, payload: {'driver_id': box.read(BoxName.driverID)}, ); - - jsonData = jsonDecode(res); - - final parsedData = parseData(jsonData['message']); - data.value = parsedData; - + jsonData1 = jsonDecode(res); + var jsonResponse = jsonDecode(res) as Map; isLoading = false; + // print(jsonResponse); + final List jsonData = jsonResponse['message']; + rideData = jsonData.map((item) { + return MonthlyDataModel.fromJson(item); + }).toList(); + final List spots = rideData + .map((data) => FlSpot( + data.day.toDouble(), + data.totalDuration.toDouble(), + )) + .toList(); + chartData = spots; + update(); // Notify the observers about the data and loading state change } diff --git a/lib/controller/home/captin/map_driver_controller.dart b/lib/controller/home/captin/map_driver_controller.dart index 06686c6..af1fafd 100644 --- a/lib/controller/home/captin/map_driver_controller.dart +++ b/lib/controller/home/captin/map_driver_controller.dart @@ -21,12 +21,16 @@ import '../../functions/location_controller.dart'; class MapDriverController extends GetxController { bool isLoading = true; List data = []; + List dataDestination = []; LatLngBounds? boundsData; BitmapDescriptor carIcon = BitmapDescriptor.defaultMarker; final List polylineCoordinates = []; + final List polylineCoordinatesDestination = []; List polyLines = []; + List polyLinesDestination = []; Set markers = {}; late String passengerLocation; + late String passengerDestination; late String duration; late String distance; late String name; @@ -46,7 +50,7 @@ class MapDriverController extends GetxController { bool isBtnRideBegin = false; bool isRideFinished = false; bool isRideStarted = false; - double passengerInfoWindow = Get.height * .32; + double passengerInfoWindow = Get.height * .35; double progress = 0; double progressToPassenger = 0; bool isRideBegin = false; @@ -69,12 +73,12 @@ class MapDriverController extends GetxController { mapController = controller; controller.getVisibleRegion(); controller.animateCamera( - CameraUpdate.newLatLngZoom(myLocation, 15), + CameraUpdate.newLatLngZoom(myLocation, 17), ); update(); // Set up a timer or interval to trigger the marker update every 3 seconds. - timer = Timer.periodic(const Duration(seconds: 3), (_) { + timer = Timer.periodic(const Duration(seconds: 2), (_) { updateMarker(); }); } @@ -111,7 +115,9 @@ class MapDriverController extends GetxController { void clearPolyline() { polyLines = []; + polyLinesDestination = []; polylineCoordinates.clear(); + polylineCoordinatesDestination.clear(); update(); } @@ -371,6 +377,45 @@ class MapDriverController extends GetxController { } } + getMapDestination(String origin, destination) async { + var url = + ('${AppLink.googleMapsLink}directions/json?&language=en&avoid=tolls|ferries&destination=$destination&origin=$origin&key=${AK.mapAPIKEY}'); + + var response = await CRUD().getGoogleApi(link: url, payload: {}); + dataDestination = response['routes'][0]['legs']; + // print(data); + 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(); + polylineCoordinatesDestination.add(LatLng(lat, lng)); + } + if (polyLinesDestination.isNotEmpty) { + clearPolyline(); + var polyline = Polyline( + polylineId: PolylineId(response["routes"][0]["summary"]), + points: polylineCoordinatesDestination, + width: 10, + color: AppColor.redColor, + ); + polyLinesDestination.add(polyline); + // rideConfirm = false; + update(); + } else { + var polyline = Polyline( + polylineId: PolylineId(response["routes"][0]["summary"]), + points: polylineCoordinatesDestination, + width: 10, + color: AppColor.redColor, + ); + + polyLinesDestination.add(polyline); + // rideConfirm = false; + update(); + } + } + void changePassengerInfoWindow() { isPassengerInfoWindow = !isPassengerInfoWindow; passengerInfoWindow = isPassengerInfoWindow == true ? 200 : 0; @@ -382,6 +427,7 @@ class MapDriverController extends GetxController { mapAPIKEY = await storage.read(key: BoxName.mapAPIKEY); // Get the passenger location from the arguments. passengerLocation = Get.arguments['passengerLocation']; + passengerDestination = Get.arguments['passengerDestination']; duration = Get.arguments['Duration']; passengerId = Get.arguments['passengerId']; driverId = Get.arguments['driverId']; @@ -401,6 +447,7 @@ class MapDriverController extends GetxController { String origin = '$lat,$lng'; // Set the origin and destination coordinates for the Google Maps directions request. getMap(origin, passengerLocation); + await getMapDestination(passengerLocation, passengerDestination); addCustomCarIcon(); // updateMarker(); startTimerToShowPassengerInfoWindowFromDriver(); diff --git a/lib/controller/home/captin/widget/left_menu_map_captain.dart b/lib/controller/home/captin/widget/left_menu_map_captain.dart index 8cd6f85..5286f47 100644 --- a/lib/controller/home/captin/widget/left_menu_map_captain.dart +++ b/lib/controller/home/captin/widget/left_menu_map_captain.dart @@ -87,7 +87,7 @@ GetBuilder leftMainMenuCaptainIcons() { borderRadius: BorderRadius.circular(15)), child: IconButton( onPressed: () { - Get.to(() => const RideCalculateDriver()); + Get.to(() => RideCalculateDriver()); }, icon: const Icon(FontAwesome5.chart_bar), ), diff --git a/lib/controller/home/map_passenger_controller.dart b/lib/controller/home/map_passenger_controller.dart index 9c25f50..c642272 100644 --- a/lib/controller/home/map_passenger_controller.dart +++ b/lib/controller/home/map_passenger_controller.dart @@ -366,7 +366,7 @@ class MapPassengerController extends GetxController { ['driver_id'] .toString(), "status": "waiting", - "price_for_driver": totalDriver.toString(), + "price_for_driver": totalPassenger.toString(), "price_for_passenger": totalME.toString(), "distance": distance.toString() }).then((value) { @@ -934,69 +934,72 @@ class MapPassengerController extends GetxController { if (polyLines.isEmpty || data.isEmpty) { if (rideConfirm == false) { double nearestDistance = double.infinity; - for (var i = 0; - i < dataCarsLocationByPassenger['message'].length; - i++) { - var carLocation = dataCarsLocationByPassenger['message'][i]; + if (dataCarsLocationByPassenger['message'].length > 0) { + for (var i = 0; + i < dataCarsLocationByPassenger['message'].length; + i++) { + var carLocation = dataCarsLocationByPassenger['message'][i]; - // double distance1 = Geolocator.distanceBetween( - // mylocation.latitude, - // mylocation.longitude, - // double.parse(carLocation['latitude']), - // double.parse(carLocation['longitude']), - // ); - // if (distance1 < nearestDistance) { - // nearestDistance = distance1; - // // nearestCarLocation = carLocation; - // nearestCar = CarLocation( - // distance: distance1, - // id: carLocation['driver_id'], - // latitude: double.parse(carLocation['latitude']), - // longitude: double.parse(carLocation['longitude']), - // ); - // } - // isloading = true; - update(); - // Make API request to get exact distance and duration - String apiUrl = - '${AppLink.googleMapsLink}distancematrix/json?destinations=${carLocation['latitude']},${carLocation['longitude']}&origins=${myLocation.latitude},${myLocation.longitude}&units=metric&key=${AK.mapAPIKEY}'; - var response = await CRUD().getGoogleApi(link: apiUrl, payload: {}); - if (response['status'] == "OK") { - var data = response; - // Extract distance and duration from the response and handle accordingly - int distance1 = data['rows'][0]['elements'][0]['distance']['value']; - distanceByPassenger = - data['rows'][0]['elements'][0]['distance']['text']; - duration1 = data['rows'][0]['elements'][0]['duration']['value']; - - durationFromDriverToPassenger = - Duration(seconds: duration1.toInt()); - newTime1 = currentTime.add(durationFromDriverToPassenger); - timeFromDriverToPassenger = - newTime1.add(Duration(minutes: 2.toInt())); - durationByPassenger = - data['rows'][0]['elements'][0]['duration']['text']; + // double distance1 = Geolocator.distanceBetween( + // mylocation.latitude, + // mylocation.longitude, + // double.parse(carLocation['latitude']), + // double.parse(carLocation['longitude']), + // ); + // if (distance1 < nearestDistance) { + // nearestDistance = distance1; + // // nearestCarLocation = carLocation; + // nearestCar = CarLocation( + // distance: distance1, + // id: carLocation['driver_id'], + // latitude: double.parse(carLocation['latitude']), + // longitude: double.parse(carLocation['longitude']), + // ); + // } + // isloading = true; update(); - if (distance1 < nearestDistance) { - nearestDistance = distance1.toDouble(); + // Make API request to get exact distance and duration + String apiUrl = + '${AppLink.googleMapsLink}distancematrix/json?destinations=${carLocation['latitude']},${carLocation['longitude']}&origins=${myLocation.latitude},${myLocation.longitude}&units=metric&key=${AK.mapAPIKEY}'; + var response = await CRUD().getGoogleApi(link: apiUrl, payload: {}); + if (response['status'] == "OK") { + var data = response; + // Extract distance and duration from the response and handle accordingly + int distance1 = + data['rows'][0]['elements'][0]['distance']['value']; + distanceByPassenger = + data['rows'][0]['elements'][0]['distance']['text']; + duration1 = data['rows'][0]['elements'][0]['duration']['value']; - nearestCar = CarLocation( - distance: distance1.toDouble(), - duration: duration1.toDouble(), - id: carLocation['driver_id'], - latitude: double.parse(carLocation['latitude']), - longitude: double.parse(carLocation['longitude']), - ); - // isloading = false; + durationFromDriverToPassenger = + Duration(seconds: duration1.toInt()); + newTime1 = currentTime.add(durationFromDriverToPassenger); + timeFromDriverToPassenger = + newTime1.add(Duration(minutes: 2.toInt())); + durationByPassenger = + data['rows'][0]['elements'][0]['duration']['text']; update(); - } - } + if (distance1 < nearestDistance) { + nearestDistance = distance1.toDouble(); - // Handle the distance and duration as needed - else { - print( - 'Failed to retrieve distance and duration: ${response['status']}'); - // Handle the failure case + nearestCar = CarLocation( + distance: distance1.toDouble(), + duration: duration1.toDouble(), + id: carLocation['driver_id'], + latitude: double.parse(carLocation['latitude']), + longitude: double.parse(carLocation['longitude']), + ); + // isloading = false; + update(); + } + } + + // Handle the distance and duration as needed + else { + print( + 'Failed to retrieve distance and duration: ${response['status']}'); + // Handle the failure case + } } } } diff --git a/lib/models/model/driver/rides_summary_model.dart b/lib/models/model/driver/rides_summary_model.dart new file mode 100644 index 0000000..b3b1113 --- /dev/null +++ b/lib/models/model/driver/rides_summary_model.dart @@ -0,0 +1,12 @@ +class MonthlyDataModel { + int day; + int totalDuration; + + MonthlyDataModel({required this.day, required this.totalDuration}); + + factory MonthlyDataModel.fromJson(Map json) => + MonthlyDataModel( + day: int.parse(json['day'].toString().split('-')[2]), + totalDuration: + int.parse(json['total_duration'].toString().split(':')[0])); +} diff --git a/lib/views/Rate/ride_calculate_driver.dart b/lib/views/Rate/ride_calculate_driver.dart index 2034232..26461e1 100644 --- a/lib/views/Rate/ride_calculate_driver.dart +++ b/lib/views/Rate/ride_calculate_driver.dart @@ -1,3 +1,4 @@ +import 'package:fl_chart/fl_chart.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:ride/constant/colors.dart'; @@ -9,118 +10,204 @@ import 'package:flutter/animation.dart'; import '../../controller/home/captin/duration_controller .dart'; class RideCalculateDriver extends StatelessWidget { - const RideCalculateDriver({super.key}); + RideCalculateDriver({super.key}); + // DurationController durationController = Get.put(DurationController()); @override Widget build(BuildContext context) { + Get.put(DurationController()); return MyScafolld( - title: 'Ride Summary'.tr, - body: const [ + title: 'Ride Summaries'.tr, + body: [ Center( - child: BarChartWidget(), - ), + child: GetBuilder( + builder: (durationController) => durationController.isLoading + ? const Center(child: MyCircularProgressIndicator()) + : Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'Average of Hours of ${AppInformation.appName} is ON for this month ${durationController.jsonData1['message'][0]['day'].toString().split('-')[1]}' + .tr, + style: AppStyle.title, + textAlign: TextAlign.center, + ), + SizedBox( + height: Get.height * .4, + child: LineChart( + duration: const Duration(milliseconds: 150), + curve: Curves.ease, + LineChartData( + lineBarsData: [ + LineChartBarData( + spots: durationController.chartData, + isCurved: true, + color: Colors.deepPurpleAccent, // Custom color + barWidth: 3, // Thinner line + dotData: const FlDotData( + show: true), // Show dots on each point + belowBarData: BarAreaData( + // Add gradient fill below the line + show: true, + color: AppColor.deepPurpleAccent, + ), + isStrokeJoinRound: true, + shadow: const BoxShadow( + color: AppColor.yellowColor, + blurRadius: 4, + offset: Offset(2, 2), + ), + ), + ], + showingTooltipIndicators: const [], + titlesData: FlTitlesData( + show: true, + topTitles: AxisTitles( + axisNameWidget: Text( + 'Days', + style: AppStyle.title, + ), + axisNameSize: 30, + sideTitles: const SideTitles( + reservedSize: 30, showTitles: true)), + bottomTitles: AxisTitles( + axisNameWidget: Text( + 'Total Hours on month'.tr, + style: AppStyle.title, + ), + axisNameSize: 30, + sideTitles: const SideTitles( + reservedSize: 30, showTitles: true)), + leftTitles: AxisTitles( + axisNameWidget: Text( + 'Counts of Hours on days'.tr, + style: AppStyle.title, + ), + axisNameSize: 30, + sideTitles: const SideTitles( + reservedSize: 30, showTitles: true)), + ), + gridData: const FlGridData( + show: true, + ), + borderData: FlBorderData( + show: true, + border: const Border( + bottom: BorderSide(color: AppColor.accentColor), + left: BorderSide(color: AppColor.accentColor), + ), + ), + ), + ), + ), + ], + ), + ) + // BarChartWidget(), + ), ], isleading: true); } } -class BarChartWidget extends StatelessWidget { - const BarChartWidget({super.key}); +// class BarChartWidget extends StatelessWidget { +// const BarChartWidget({super.key}); - @override - Widget build(BuildContext context) { - final durationController = Get.put(DurationController()); - return Obx(() { - final data = durationController.data; - double maxDuration = 0; +// @override +// Widget build(BuildContext context) { +// final durationController = Get.put(DurationController()); +// return Obx(() { +// final data = durationController.data; +// double maxDuration = 0; - // Find the maximum duration to determine the maximum height of the bars - for (final entry in data) { - final durationInHours = entry.totalDuration.inHours.toDouble(); - if (durationInHours > maxDuration) { - maxDuration = durationInHours; - } - } +// // Find the maximum duration to determine the maximum height of the bars +// for (final entry in data) { +// final durationInHours = entry.totalDuration.inHours.toDouble(); +// if (durationInHours > maxDuration) { +// maxDuration = durationInHours; +// } +// } - return durationController.isLoading - ? const Center( - child: MyCircularProgressIndicator(), - ) - : Column( - children: [ - Text( - 'Average of Hours of ${AppInformation.appName} is ON for this month' - .tr, - style: AppStyle.title, - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Container( - height: Get.height * .7, - decoration: AppStyle.boxDecoration, - child: ListView.builder( - scrollDirection: Axis.horizontal, - itemCount: data.length, - itemBuilder: (context, index) { - final entry = data[index]; - final durationInHours = - entry.totalDuration.inHours.toDouble(); - final dayLabel = entry.day.day.toString(); +// return durationController.isLoading +// ? const Center( +// child: MyCircularProgressIndicator(), +// ) +// : Column( +// children: [ +// Text( +// 'Average of Hours of ${AppInformation.appName} is ON for this month' +// .tr, +// style: AppStyle.title, +// ), +// Padding( +// padding: const EdgeInsets.all(8.0), +// child: Container( +// height: Get.height * .7, +// decoration: AppStyle.boxDecoration, +// child: ListView.builder( +// scrollDirection: Axis.horizontal, +// itemCount: data.length, +// itemBuilder: (context, index) { +// final entry = data[index]; +// final durationInHours = +// entry.totalDuration.inHours.toDouble(); +// final dayLabel = entry.day.day.toString(); - return Padding( - padding: const EdgeInsets.symmetric(horizontal: 4), - child: AnimatedBuilder( - animation: durationController.animationController, - builder: (context, child) { - final animationValue = - durationController.animationController.value; - final animatedValue = - (durationInHours / maxDuration) * - animationValue; +// return Padding( +// padding: const EdgeInsets.symmetric(horizontal: 4), +// child: AnimatedBuilder( +// // animation: durationController.animationController, +// builder: (context, child) { +// final animationValue = +// durationController.animationController.value; +// final animatedValue = +// (durationInHours / maxDuration) * +// animationValue; - return Column( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Transform( - transform: Matrix4.identity() - ..setEntry(3, 2, - 0.001) // Apply perspective for a 3D effect - ..rotateX(-0.5 * - animatedValue), // Rotate around X-axis - alignment: Alignment.bottomCenter, - child: Container( - width: 20, - height: - (durationInHours / maxDuration) * 400, - color: durationInHours > 8 - ? AppColor.greenColor - : AppColor.yellowColor, - child: Center( - child: Text( - durationInHours.toStringAsFixed( - 0, - ), // Display the duration value inside the bar - style: const TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - ), - const SizedBox(height: 4), - Text(dayLabel), - ], - ); - }, - ), - ); - }, - ), - ), - ), - ], - ); - }); - } -} +// return Column( +// mainAxisAlignment: MainAxisAlignment.end, +// children: [ +// Transform( +// transform: Matrix4.identity() +// ..setEntry(3, 2, +// 0.001) // Apply perspective for a 3D effect +// ..rotateX(-0.5 * +// animatedValue), // Rotate around X-axis +// alignment: Alignment.bottomCenter, +// child: Container( +// width: 20, +// height: +// (durationInHours / maxDuration) * 400, +// color: durationInHours > 8 +// ? AppColor.greenColor +// : AppColor.yellowColor, +// child: Center( +// child: Text( +// durationInHours.toStringAsFixed( +// 0, +// ), // Display the duration value inside the bar +// style: const TextStyle( +// color: Colors.white, +// fontWeight: FontWeight.bold, +// ), +// ), +// ), +// ), +// ), +// const SizedBox(height: 4), +// Text(dayLabel), +// ], +// ); +// }, +// ), +// ); +// }, +// ), +// ), +// ), +// ], +// ); +// }); +// } +// } diff --git a/lib/views/home/Captin/mapDriverWidgets/google_driver_map_page.dart b/lib/views/home/Captin/mapDriverWidgets/google_driver_map_page.dart index 049a544..164b6f8 100644 --- a/lib/views/home/Captin/mapDriverWidgets/google_driver_map_page.dart +++ b/lib/views/home/Captin/mapDriverWidgets/google_driver_map_page.dart @@ -45,6 +45,18 @@ class GoogleDriverMap extends StatelessWidget { color: AppColor.greenColor, width: 5, ), + Polyline( + zIndex: 2, + consumeTapEvents: true, + geodesic: true, + endCap: Cap.buttCap, + startCap: Cap.buttCap, + visible: true, + polylineId: const PolylineId('route'), + points: controller.polylineCoordinatesDestination, + color: AppColor.redColor, + width: 5, + ), }, markers: { Marker( diff --git a/lib/views/home/Captin/orderCaptin/order_request_page.dart b/lib/views/home/Captin/orderCaptin/order_request_page.dart index 0af8745..79dfcab 100644 --- a/lib/views/home/Captin/orderCaptin/order_request_page.dart +++ b/lib/views/home/Captin/orderCaptin/order_request_page.dart @@ -111,25 +111,25 @@ class OrderRequestPage extends StatelessWidget { ), ), ), + // Padding( + // padding: const EdgeInsets.all(8.0), + // child: RichText( + // text: TextSpan( + // text: 'Total For You is '.tr, + // style: AppStyle.title, + // children: [ + // TextSpan( + // text: double.parse(myList[3]).toStringAsFixed(2), + // style: AppStyle.headtitle2), + // ], + // ), + // ), + // ), Padding( padding: const EdgeInsets.all(8.0), child: RichText( text: TextSpan( - text: 'Total For You is '.tr, - style: AppStyle.title, - children: [ - TextSpan( - text: double.parse(myList[3]).toStringAsFixed(2), - style: AppStyle.headtitle2), - ], - ), - ), - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: RichText( - text: TextSpan( - text: 'Distance is '.tr, + text: 'Distance from Passenger to destination is '.tr, style: AppStyle.title, children: [ TextSpan( @@ -190,6 +190,7 @@ class OrderRequestPage extends StatelessWidget { Get.back(); Get.to(() => PassengerLocationMapPage(), arguments: { 'passengerLocation': myList[0].toString(), + 'passengerDestination': myList[1].toString(), 'Duration': myList[4].toString(), 'Distance': myList[5].toString(), 'name': myList[8].toString(), diff --git a/lib/views/home/map_widget.dart/buttom_sheet_map_show.dart b/lib/views/home/map_widget.dart/buttom_sheet_map_show.dart index d174d1c..19af2eb 100644 --- a/lib/views/home/map_widget.dart/buttom_sheet_map_show.dart +++ b/lib/views/home/map_widget.dart/buttom_sheet_map_show.dart @@ -47,87 +47,71 @@ GetBuilder buttomSheetMapPage() { ], borderRadius: const BorderRadius.all( Radius.circular(15))), - child: ListView.builder( - itemCount: - controller.dataCarsLocationByPassenger.length, - itemBuilder: (BuildContext context, int index) { - return Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - SizedBox( - width: Get.width * .15, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Text(controller - .dataCarsLocationByPassenger - .toString()), - Image.asset( - 'assets/images/jeep.png', - width: 50, - fit: BoxFit.fill, - repeat: ImageRepeat.repeatX, - ), - ], + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox( + width: Get.width * .15, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + 'assets/images/jeep.png', + width: 50, + fit: BoxFit.fill, + repeat: ImageRepeat.repeatX, + ), + ), + ), + SizedBox( + width: Get.width * .55, + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.spaceEvenly, + children: [ + Text( + '${'Your Ride Duration is '.tr}${controller.duration} minutes', + style: AppStyle.subtitle, + ), + Text( + '${'You will be thier in'.tr} ${DateFormat('h:mm a').format(controller.newTime)}', + style: AppStyle.subtitle, + ), + Text( + '${'You trip distance is'.tr} ${controller.distance} KM', + style: AppStyle.subtitle, + ) + ], + ), + ), + SizedBox( + width: Get.width * .2, + child: Padding( + padding: const EdgeInsets.only( + right: 5, left: 5), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Text( + '${'Fee is'.tr} \n${controller.totalPassenger.toStringAsFixed(2)}', + style: AppStyle.subtitle, ), - ), + controller.promoTaken + ? const Icon( + Icons.filter_vintage_rounded, + color: AppColor.redColor, + ) + : const SizedBox( + height: 0, + ) + ], ), - SizedBox( - width: Get.width * .55, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - mainAxisAlignment: - MainAxisAlignment.spaceEvenly, - children: [ - Text( - '${'Your Ride Duration is '.tr}${controller.duration} minutes', - style: AppStyle.subtitle, - ), - Text( - '${'You will be thier in'.tr} ${DateFormat('h:mm a').format(controller.newTime)}', - style: AppStyle.subtitle, - ), - Text( - '${'You trip distance is'.tr} ${controller.distance} KM', - style: AppStyle.subtitle, - ) - ], - ), - ), - SizedBox( - width: Get.width * .2, - child: Padding( - padding: const EdgeInsets.only( - right: 5, left: 5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.center, - children: [ - Text( - '${'Fee is'.tr} \n${controller.totalPassenger.toStringAsFixed(2)}', - style: AppStyle.subtitle, - ), - controller.promoTaken - ? const Icon( - Icons - .filter_vintage_rounded, - color: AppColor.redColor, - ) - : const SizedBox( - height: 0, - ) - ], - ), - ), - ), - ], - ); - }, - ), - ), + ), + ), + ], + )), const SizedBox( height: 5, ), diff --git a/lib/views/home/map_widget.dart/google_map_passenger_widget.dart b/lib/views/home/map_widget.dart/google_map_passenger_widget.dart index a8ebbab..e05f699 100644 --- a/lib/views/home/map_widget.dart/google_map_passenger_widget.dart +++ b/lib/views/home/map_widget.dart/google_map_passenger_widget.dart @@ -151,7 +151,7 @@ class GoogleMapPassengerWidget extends StatelessWidget { markerId: MarkerId('MyLocation'.tr), position: controller.newStartPointLocation, draggable: true, - icon: controller.markerIcon, + icon: controller.tripIcon, infoWindow: const InfoWindow( title: 'Time', // snippet: controller.durationFromDriverToPassenger @@ -166,7 +166,7 @@ class GoogleMapPassengerWidget extends StatelessWidget { markerId: MarkerId('Destination'.tr), position: controller.newMyLocation, draggable: true, - icon: controller.markerIcon, + icon: controller.tripIcon, infoWindow: const InfoWindow( title: 'Time', // snippet: controller.durationFromDriverToPassenger diff --git a/lib/views/home/profile/passenger_profile_page.dart b/lib/views/home/profile/passenger_profile_page.dart index 68b8f01..5c5cc67 100644 --- a/lib/views/home/profile/passenger_profile_page.dart +++ b/lib/views/home/profile/passenger_profile_page.dart @@ -187,7 +187,7 @@ class PassengerProfilePage extends StatelessWidget { )), Positioned( left: 70, - bottom: 240, + bottom: 100, right: 70, child: MyElevatedButton( title: 'Sign Out'.tr, @@ -197,7 +197,7 @@ class PassengerProfilePage extends StatelessWidget { ), Positioned( left: 70, - bottom: 140, + bottom: 10, right: 70, child: MyElevatedButton( title: 'Delete My Account'.tr,