2/16/1
This commit is contained in:
@@ -241,7 +241,8 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
),
|
||||
controller.remainingTimeInPassengerLocatioWait <
|
||||
300 &&
|
||||
controller.remainingTimeInPassengerLocatioWait !=
|
||||
controller
|
||||
.remainingTimeInPassengerLocatioWait !=
|
||||
0
|
||||
? Stack(
|
||||
children: [
|
||||
@@ -272,8 +273,9 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
)
|
||||
: controller.isdriverWaitTimeEnd
|
||||
? MyElevatedButton(
|
||||
title:
|
||||
'You Can Cancel Trip And get Cost of Trip From ${AppInformation.appName}'
|
||||
title: 'You Can Cancel Trip And get Cost of Trip From'
|
||||
.tr +
|
||||
' ${AppInformation.appName}'
|
||||
.tr,
|
||||
kolor: AppColor
|
||||
.deepPurpleAccent,
|
||||
|
||||
@@ -223,7 +223,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
'passengerLocation': myList[0].toString(),
|
||||
'passengerDestination': myList[1].toString(),
|
||||
'Duration': myList[4].toString(),
|
||||
'totalCost': myList[2].toString(),
|
||||
'totalCost': myList[26].toString(),
|
||||
'Distance': myList[5].toString(),
|
||||
'name': myList[8].toString(),
|
||||
'phone': myList[10].toString(),
|
||||
@@ -236,7 +236,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
'passengerId': myList[7].toString(),
|
||||
'driverId': myList[18].toString(),
|
||||
'durationOfRideValue': myList[19].toString(),
|
||||
'paymentAmount': myList[3].toString(),
|
||||
'paymentAmount': myList[2].toString(),
|
||||
'paymentMethod':
|
||||
myList[13].toString() == 'true' ? 'visa' : 'cash',
|
||||
'isHaveSteps': myList[20].toString(),
|
||||
@@ -245,6 +245,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
'step2': myList[23].toString(),
|
||||
'step3': myList[24].toString(),
|
||||
'step4': myList[25].toString(),
|
||||
'passengerWalletBurc': myList[26].toString(),
|
||||
});
|
||||
},
|
||||
),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/constant/info.dart';
|
||||
import 'package:SEFER/controller/payment/payment_controller.dart';
|
||||
|
||||
@@ -4,7 +4,6 @@ import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/controller/profile/profile_controller.dart';
|
||||
import 'package:SEFER/main.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../constant/style.dart';
|
||||
@@ -26,7 +25,7 @@ class RideBeginPassenger extends StatelessWidget {
|
||||
bottom: 4,
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
height: 200,
|
||||
height: controller.rideTimerBegin ? 200 : 0,
|
||||
// width: 100,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/links.dart';
|
||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../../constant/box_name.dart';
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../constant/style.dart';
|
||||
import '../../../controller/firebase/firbase_messge.dart';
|
||||
import '../../../controller/functions/crud.dart';
|
||||
import '../../../controller/home/map_passenger_controller.dart';
|
||||
import '../../../main.dart';
|
||||
import 'ride_begin_passenger.dart';
|
||||
|
||||
class TimerToPassengerFromDriver extends StatelessWidget {
|
||||
const TimerToPassengerFromDriver({
|
||||
@@ -20,14 +16,20 @@ class TimerToPassengerFromDriver extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<MapPassengerController>(builder: (controller) {
|
||||
if (controller.remainingTime == 0 &&
|
||||
controller.timeToPassengerFromDriverAfterApplied > 0) {
|
||||
(controller.isDriverInPassengerWay == true ||
|
||||
controller.timeToPassengerFromDriverAfterApplied > 0)) {
|
||||
// ) {
|
||||
return Positioned(
|
||||
left: 10,
|
||||
right: 10,
|
||||
bottom: 5,
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
height: 200,
|
||||
height: controller.remainingTime == 0 &&
|
||||
(controller.isDriverInPassengerWay == true ||
|
||||
controller.timeToPassengerFromDriverAfterApplied > 0)
|
||||
? 200
|
||||
: 0,
|
||||
// width: 100,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
@@ -66,12 +68,6 @@ class TimerToPassengerFromDriver extends StatelessWidget {
|
||||
? MyElevatedButton(
|
||||
title: 'You can cancel trip'.tr,
|
||||
onPressed: () async {
|
||||
// await CRUD()
|
||||
// .post(link: AppLink.updateRides, payload: {
|
||||
// 'id': controller.rideId,
|
||||
// 'rideTimeStart': DateTime.now().toString(),
|
||||
// 'status': 'Applied'
|
||||
// });
|
||||
await controller
|
||||
.calculateDistanceBetweenPassengerAndDriverBeforecancelRide();
|
||||
})
|
||||
@@ -81,8 +77,59 @@ class TimerToPassengerFromDriver extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
);
|
||||
} else if (controller.remainingTime == 0 &&
|
||||
controller.isDriverArrivePassenger == true) {
|
||||
return Positioned(
|
||||
left: 10,
|
||||
right: 10,
|
||||
bottom: 5,
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
height: controller.remainingTime == 0 &&
|
||||
controller.isDriverArrivePassenger == true
|
||||
? 150
|
||||
: 0,
|
||||
// width: 100,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'The driver waitting you in picked location .'.tr,
|
||||
style: AppStyle.title,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
Stack(
|
||||
children: [
|
||||
LinearProgressIndicator(
|
||||
backgroundColor: AppColor.accentColor,
|
||||
color:
|
||||
controller.remainingTimeDriverWaitPassenger5Minute <
|
||||
60
|
||||
? AppColor.redColor
|
||||
: AppColor.greenColor,
|
||||
minHeight: 50,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
value: controller
|
||||
.progressTimerDriverWaitPassenger5Minute
|
||||
.toDouble(),
|
||||
),
|
||||
Center(
|
||||
child: Text(
|
||||
controller
|
||||
.stringRemainingTimeDriverWaitPassenger5Minute,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return const SizedBox();
|
||||
return const RideBeginPassenger();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user