2/7/1
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:animated_text_kit/animated_text_kit.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/box_name.dart';
|
||||
import 'package:ride/constant/colors.dart';
|
||||
@@ -25,11 +26,11 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
children: [
|
||||
Positioned(
|
||||
bottom: 50,
|
||||
left: 8,
|
||||
// left: 8,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
height: controller.passengerInfoWindow,
|
||||
width: Get.width * .8,
|
||||
width: Get.width * .96,
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
@@ -112,7 +113,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
'${'Hello this is Captain'.tr} ${box.read(BoxName.nameDriver)}');
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.whatshot,
|
||||
FontAwesome.whatsapp,
|
||||
color: AppColor.greenColor,
|
||||
)),
|
||||
IconButton(
|
||||
@@ -137,16 +138,6 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
Icons.email,
|
||||
color: AppColor.redColor,
|
||||
)),
|
||||
IconButton(
|
||||
onPressed: () =>
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Hi',
|
||||
'body',
|
||||
controller.tokenPassenger,
|
||||
[]),
|
||||
icon:
|
||||
const Icon(Icons.notification_add))
|
||||
],
|
||||
),
|
||||
controller.remainingTimeToPassenger != 0
|
||||
@@ -175,12 +166,92 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
)
|
||||
: controller.isRideBegin
|
||||
? const SizedBox()
|
||||
: MyElevatedButton(
|
||||
title: 'Start the Ride'.tr,
|
||||
kolor: AppColor.greenColor,
|
||||
onPressed: () {
|
||||
controller.startRideFromDriver();
|
||||
}),
|
||||
: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
MyElevatedButton(
|
||||
title: 'Start the Ride'.tr,
|
||||
kolor: AppColor.greenColor,
|
||||
onPressed: () {
|
||||
Get.defaultDialog(
|
||||
title:
|
||||
'Is the Passenger in your Car ?'
|
||||
.tr,
|
||||
middleText:
|
||||
'don\'t start trip if not '
|
||||
.tr,
|
||||
confirm: MyElevatedButton(
|
||||
title: 'OK'.tr,
|
||||
onPressed: () {
|
||||
controller
|
||||
.startRideFromDriver();
|
||||
Get.back();
|
||||
}),
|
||||
cancel: MyElevatedButton(
|
||||
title:
|
||||
'No ,still Waiting.'
|
||||
.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
}));
|
||||
}),
|
||||
controller.isArrivedSend
|
||||
? MyElevatedButton(
|
||||
title: 'I arrive you'.tr,
|
||||
kolor: AppColor.yellowColor,
|
||||
onPressed: () {
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Hi ,I Arrive your site'
|
||||
.tr,
|
||||
'I Arrive your site'
|
||||
.tr,
|
||||
controller
|
||||
.tokenPassenger,
|
||||
[]);
|
||||
controller
|
||||
.startTimerToShowDriverWaitPassengerDuration();
|
||||
controller.isArrivedSend =
|
||||
false;
|
||||
})
|
||||
: const SizedBox(),
|
||||
],
|
||||
),
|
||||
controller.remainingTimeInPassengerLocatioWait <
|
||||
300
|
||||
? Stack(
|
||||
children: [
|
||||
LinearProgressIndicator(
|
||||
backgroundColor:
|
||||
AppColor.accentColor,
|
||||
color: controller
|
||||
.remainingTimeInPassengerLocatioWait <
|
||||
60
|
||||
? AppColor.redColor
|
||||
: AppColor.greenColor,
|
||||
minHeight: 50,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
15),
|
||||
value: controller
|
||||
.progressInPassengerLocationFromDriver
|
||||
.toDouble(),
|
||||
),
|
||||
Center(
|
||||
child: Text(
|
||||
controller
|
||||
.stringRemainingTimeWaitingPassenger,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
: const SizedBox(),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -24,6 +24,9 @@ class OrderRequestPage extends StatelessWidget {
|
||||
final myListString = arguments['myListString'];
|
||||
final myList = arguments['DriverList'];
|
||||
final body = arguments['body'];
|
||||
Duration durationToAdd = Duration(seconds: int.parse(myList[4]));
|
||||
int hours = durationToAdd.inHours;
|
||||
int minutes = (durationToAdd.inMinutes % 60).round();
|
||||
orderRequestController.startTimer(myList[6].toString(), body.toString());
|
||||
return MyScafolld(
|
||||
title: 'Order Request Page'.tr,
|
||||
@@ -167,8 +170,10 @@ class OrderRequestPage extends StatelessWidget {
|
||||
style: AppStyle.title,
|
||||
children: [
|
||||
TextSpan(
|
||||
text: myList[4].toString(),
|
||||
style: AppStyle.headTitle2),
|
||||
text: hours > 1
|
||||
? '${'Your Ride Duration is '.tr}$hours H and $minutes m'
|
||||
: '${'Your Ride Duration is '.tr} $minutes m',
|
||||
style: AppStyle.title),
|
||||
TextSpan(text: ' Minutes'.tr, style: AppStyle.title),
|
||||
]),
|
||||
),
|
||||
|
||||
@@ -30,6 +30,7 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(15),
|
||||
@@ -288,6 +289,7 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
controller.currentLocationToFormPlaces =
|
||||
false;
|
||||
controller.placesDestination = [];
|
||||
// controller.isCancelRidePageShown = true;
|
||||
controller.clearPlacesStart();
|
||||
controller.clearPlacesDestination();
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class PointsPageForRider extends StatelessWidget {
|
||||
left: 2,
|
||||
right: 2,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 800),
|
||||
duration: const Duration(milliseconds: 300),
|
||||
height: controller.wayPointSheetHeight,
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: ListView(
|
||||
|
||||
@@ -3,8 +3,8 @@ import 'package:get/get.dart';
|
||||
import 'package:ride/constant/box_name.dart';
|
||||
import 'package:ride/constant/colors.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
import 'package:ride/controller/home/map_passenger_controller.dart';
|
||||
import 'package:ride/controller/home/payment/captain_wallet_controller.dart';
|
||||
import 'package:ride/controller/home/payment/credit_card_controller.dart';
|
||||
import 'package:ride/controller/payment/payment_controller.dart';
|
||||
import 'package:ride/main.dart';
|
||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||
@@ -19,6 +19,7 @@ class WaletCaptain extends StatelessWidget {
|
||||
Get.put(CaptainWalletController());
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Get.put(MapPassengerController());
|
||||
return MyScafolld(
|
||||
title: 'Captain Wallet'.tr,
|
||||
body: [
|
||||
|
||||
Reference in New Issue
Block a user