2/25/1
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
@@ -25,12 +26,12 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
? Stack(
|
||||
children: [
|
||||
Positioned(
|
||||
bottom: 50,
|
||||
bottom: 5,
|
||||
// left: 8,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 300),
|
||||
height: controller.passengerInfoWindow,
|
||||
width: Get.width * .96,
|
||||
width: Get.width * .99,
|
||||
decoration: AppStyle.boxDecoration,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
@@ -39,10 +40,56 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
children: [
|
||||
DefaultTextStyle(
|
||||
style: AppStyle.title,
|
||||
child: Text(
|
||||
'Go to passenger Location now'.tr,
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Go to passenger Location now'.tr,
|
||||
style: AppStyle.title
|
||||
.copyWith(color: AppColor.greenColor),
|
||||
),
|
||||
controller.isRideBegin
|
||||
? const SizedBox()
|
||||
: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
controller.isSocialPressed =
|
||||
true;
|
||||
await controller
|
||||
.driverCallPassenger();
|
||||
Get.to(
|
||||
() => const CallPage());
|
||||
// launchCommunication('phone',
|
||||
// controller.phone.toString(), '');
|
||||
},
|
||||
child: const Icon(
|
||||
Icons.phone,
|
||||
color: AppColor.blueColor,
|
||||
)),
|
||||
const SizedBox(
|
||||
width: 25,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
controller.isSocialPressed =
|
||||
true;
|
||||
launchCommunication(
|
||||
'email',
|
||||
controller.phone
|
||||
.toString(),
|
||||
'${'Hello this is Driver'.tr} ${box.read(BoxName.nameDriver)}');
|
||||
},
|
||||
child: const Icon(
|
||||
Icons.email,
|
||||
color: AppColor.redColor,
|
||||
)),
|
||||
],
|
||||
),
|
||||
],
|
||||
)
|
||||
// AnimatedTextKit(
|
||||
// animatedTexts: [
|
||||
@@ -64,9 +111,10 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text('Duration of the Ride is '.tr,
|
||||
style: AppStyle.title),
|
||||
Text('${controller.duration} ${'Minute'.tr}',
|
||||
Text(
|
||||
controller.hours > 1
|
||||
? '${'${'Your Ride Duration is '.tr}${controller.hours}${' H and'.tr}'} ${controller.minutes} m'
|
||||
: '${'Your Ride Duration is '.tr} ${controller.minutes} ${'m'.tr}',
|
||||
style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
@@ -90,69 +138,23 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
controller.isRideBegin
|
||||
? const SizedBox()
|
||||
: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
controller.isSocialPressed = true;
|
||||
await controller
|
||||
.driverCallPassenger();
|
||||
Get.to(() => const CallPage());
|
||||
// launchCommunication('phone',
|
||||
// controller.phone.toString(), '');
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.phone,
|
||||
color: AppColor.blueColor,
|
||||
)),
|
||||
// IconButton(
|
||||
// onPressed: () async {
|
||||
// controller.isSocialPressed = true;
|
||||
// await controller
|
||||
// .driverCallPassenger();
|
||||
|
||||
// launchCommunication(
|
||||
// 'whatsapp',
|
||||
// controller.phone.toString(),
|
||||
// '${'Hello this is Driver'.tr} ${box.read(BoxName.nameDriver)}');
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// FontAwesome.whatsapp,
|
||||
// color: AppColor.greenColor,
|
||||
// )),
|
||||
// IconButton(
|
||||
// onPressed: () async {
|
||||
// controller.isSocialPressed = true;
|
||||
// await controller
|
||||
// .driverCallPassenger();
|
||||
|
||||
// launchCommunication(
|
||||
// 'sms',
|
||||
// controller.phone.toString(),
|
||||
// '${'Hello this is Driver'.tr} ${box.read(BoxName.nameDriver)}');
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// Icons.sms_rounded,
|
||||
// color: AppColor.blueColor,
|
||||
// )),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
controller.isSocialPressed = true;
|
||||
launchCommunication(
|
||||
'email',
|
||||
controller.phone.toString(),
|
||||
'${'Hello this is Driver'.tr} ${box.read(BoxName.nameDriver)}');
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.email,
|
||||
color: AppColor.redColor,
|
||||
)),
|
||||
],
|
||||
),
|
||||
Card(
|
||||
elevation: 5,
|
||||
color: AppColor.greenColor,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Row(
|
||||
children: [
|
||||
Text('Total Cost is '.tr,
|
||||
style: AppStyle.title),
|
||||
Text(
|
||||
controller.totalPassenger.toString(),
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
controller.remainingTimeToPassenger != 0
|
||||
? Stack(
|
||||
children: [
|
||||
@@ -331,7 +333,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
)
|
||||
: controller.remainingTimeToShowPassengerInfoWindowFromDriver > 0 //
|
||||
? Positioned(
|
||||
bottom: Get.height * .3,
|
||||
bottom: Get.height * .2,
|
||||
left: 15,
|
||||
child: Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
|
||||
Reference in New Issue
Block a user