2/25/1
This commit is contained in:
@@ -8,10 +8,13 @@ import 'package:SEFER/views/widgets/mycircular.dart';
|
||||
|
||||
import '../../../../constant/colors.dart';
|
||||
import '../../../../constant/info.dart';
|
||||
import '../../../../constant/links.dart';
|
||||
import '../../../../constant/style.dart';
|
||||
import '../../../../constant/table_names.dart';
|
||||
import '../../../../controller/functions/crud.dart';
|
||||
import '../../../../controller/functions/location_controller.dart';
|
||||
import '../../../../controller/home/captin/home_captain_controller.dart';
|
||||
import '../../../../controller/home/captin/map_driver_controller.dart';
|
||||
import '../../../../controller/home/captin/order_request_controller.dart';
|
||||
import '../../../../controller/home/captin/widget/call_page.dart';
|
||||
import '../../../../controller/home/captin/widget/connect.dart';
|
||||
@@ -119,7 +122,7 @@ class HomeCaptain extends StatelessWidget {
|
||||
builder: (homeCaptainController) => Container(
|
||||
decoration: AppStyle.boxDecoration,
|
||||
width: Get.width * .8,
|
||||
height: 80,
|
||||
height: 104,
|
||||
child: Center(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@@ -195,12 +198,31 @@ class HomeCaptain extends StatelessWidget {
|
||||
// border: Border.all(),
|
||||
// borderRadius: BorderRadius.circular(15)),
|
||||
// child: IconButton(
|
||||
// onPressed: () {
|
||||
// Get.to(
|
||||
// () => const DriverCallPage(),
|
||||
// );
|
||||
// onPressed: () async {
|
||||
// CRUD().sendEmail(AppLink.sendEmailToPassengerForTripDetails, {
|
||||
// 'startLocation': Get.find<MapDriverController>()
|
||||
// .passengerLocation
|
||||
// .toString(),
|
||||
// 'endLocation': Get.find<MapDriverController>()
|
||||
// .passengerDestination
|
||||
// .toString(),
|
||||
// 'name': Get.find<MapDriverController>().name.toString(),
|
||||
// 'timeOfTrip':
|
||||
// Get.find<MapDriverController>().timeOfOrder.toString(),
|
||||
// 'fee': Get.find<MapDriverController>()
|
||||
// .totalPassenger
|
||||
// .toString(),
|
||||
// 'duration':
|
||||
// Get.find<MapDriverController>().duration.toString(),
|
||||
// 'phone': Get.find<MapDriverController>().phone.toString(),
|
||||
// 'email': Get.find<MapDriverController>().email.toString(),
|
||||
// });
|
||||
// },
|
||||
// icon: const Icon(Fontisto.phone),
|
||||
// icon: const Icon(
|
||||
// MaterialCommunityIcons.map_marker_radius,
|
||||
// size: 45,
|
||||
// color: AppColor.blueColor,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import 'package:SEFER/constant/colors.dart';
|
||||
import 'package:SEFER/constant/style.dart';
|
||||
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
@@ -41,8 +43,9 @@ class GoogleMapApp extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.map,
|
||||
MaterialCommunityIcons.map_marker_radius,
|
||||
size: 45,
|
||||
color: AppColor.blueColor,
|
||||
),
|
||||
)),
|
||||
)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -227,6 +227,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
'Distance': myList[5].toString(),
|
||||
'name': myList[8].toString(),
|
||||
'phone': myList[10].toString(),
|
||||
'email': myList[28].toString(),
|
||||
'WalletChecked': myList[13].toString(),
|
||||
'tokenPassenger': myList[9].toString(),
|
||||
'direction':
|
||||
@@ -247,6 +248,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
'step4': myList[25].toString(),
|
||||
'passengerWalletBurc': myList[26].toString(),
|
||||
'timeOfOrder': DateTime.now().toString(),
|
||||
'totalPassenger': myList[2].toString(),
|
||||
});
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user