This commit is contained in:
Hamza-Ayed
2024-01-18 00:49:00 +03:00
parent 358bb904ab
commit 7af7e71b30
17 changed files with 1028 additions and 269 deletions

View File

@@ -71,7 +71,9 @@ GetBuilder<MapPassengerController> buttomSheetMapPage() {
MainAxisAlignment.spaceEvenly,
children: [
Text(
'${'Your Ride Duration is '.tr}${controller.duration} minutes',
controller.hours > 1
? '${'Your Ride Duration is '.tr}${controller.hours} H and ${controller.minutes} m'
: '${'Your Ride Duration is '.tr} ${controller.minutes} m',
style: AppStyle.subtitle,
),
Text(

View File

@@ -57,18 +57,28 @@ class PointsPageForRider extends StatelessWidget {
controller.clearPolyline();
controller.isWayPointStopsSheetUtilGetMap =
false;
mapPassengerController.durationToRide = 0;
for (var i = 0;
i < wayPointController.wayPoints.length;
i++) {
mapPassengerController.getMapPoints(
mapPassengerController.placesCoordinate[i]
.toString(),
mapPassengerController
.placesCoordinate[i + 1]
.toString(),
i,
);
if (mapPassengerController
.placesCoordinate[i + 1]
.toString() !=
'') {
mapPassengerController.getMapPoints(
mapPassengerController
.placesCoordinate[i]
.toString(),
mapPassengerController
.placesCoordinate[i + 1]
.toString(),
i,
);
}
}
controller.bottomSheet();
controller.showBottomSheet1();
},
child: const Text('Get Map'),
)

View File

@@ -74,8 +74,9 @@ class RideBeginPassenger extends StatelessWidget {
.phone, // Set the keyboard type to phone
validator: (value) {
if (value!.isEmpty ||
value.length < 10) {
return 'Please enter a phone number';
value.length != 10) {
return 'Please enter a valid phone number'
.tr;
}
// Add additional validation if needed
return null;