6/1/1
This commit is contained in:
@@ -41,7 +41,7 @@ class HomeCaptain extends StatelessWidget {
|
||||
style: AppStyle.title,
|
||||
))),
|
||||
IconButton(
|
||||
// onPressed: () => box.remove(BoxName.periods),
|
||||
// onPressed: () => Get.find<OrderRequestController>().getSQL(),
|
||||
onPressed: () => sql.deleteAllData(TableName.driverOrdersRefuse),
|
||||
icon: const Icon(Icons.remove)),
|
||||
// GetBuilder<OrderRequestController>(
|
||||
|
||||
@@ -7,23 +7,22 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||
|
||||
import '../../../../../constant/box_name.dart';
|
||||
import '../../../../../controller/functions/call_controller.dart';
|
||||
import '../../../../../main.dart';
|
||||
|
||||
class CallPage extends StatelessWidget {
|
||||
const CallPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MyScafolld(title: 'Call Page', isleading: true, body: [callPage()]);
|
||||
return MyScafolld(
|
||||
title: 'Call Page'.tr, isleading: true, body: [callPage()]);
|
||||
}
|
||||
}
|
||||
|
||||
GetBuilder<HomeCaptainController> callPage() {
|
||||
CallController callController = Get.put(CallController());
|
||||
Get.put(MapDriverController());
|
||||
callController.initAgoraFull();
|
||||
// callController.join();
|
||||
return GetBuilder<HomeCaptainController>(
|
||||
builder: (controller) => Positioned(
|
||||
top: Get.height * .2,
|
||||
@@ -35,19 +34,6 @@ GetBuilder<HomeCaptainController> callPage() {
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
// await callController.initAgoraFull();
|
||||
// callController.join();
|
||||
FirebaseMessagesController().sendNotificationToPassengerToken(
|
||||
'Call Income',
|
||||
'You have call from driver ${box.read(BoxName.nameDriver)}',
|
||||
Get.find<MapDriverController>().tokenPassenger,
|
||||
[
|
||||
callController.token,
|
||||
callController.channelName,
|
||||
callController.uid.toString(),
|
||||
callController.remoteUid.toString(),
|
||||
],
|
||||
);
|
||||
callController.join();
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@@ -123,12 +123,12 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
controller.hours > 1
|
||||
? '⌚️ ${controller.hours}h ${controller.minutes}m' // Ride Duration with emoji
|
||||
: '⌚️ ${controller.minutes}m', // Short ride duration
|
||||
style: AppStyle.title,
|
||||
style: AppStyle.number,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 16.0), // Add spacing between sections
|
||||
width: 10.0), // Add spacing between sections
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
width: Get.width * .22,
|
||||
@@ -136,7 +136,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Text(
|
||||
' ${controller.distance} km', // Distance with emoji
|
||||
style: AppStyle.title,
|
||||
style: AppStyle.number,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -166,11 +166,11 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Row(
|
||||
children: [
|
||||
Text('Total Cost is '.tr,
|
||||
Text("cost is ".tr,
|
||||
style: AppStyle.title),
|
||||
Text(
|
||||
controller.totalPassenger.toString(),
|
||||
style: AppStyle.title,
|
||||
style: AppStyle.number,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -181,7 +181,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
||||
width: Get.width * .4,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Text(controller.carType,
|
||||
child: Text(controller.carType.tr,
|
||||
style: AppStyle.title),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -99,7 +99,7 @@ class SosConnect extends StatelessWidget {
|
||||
} else {
|
||||
launchCommunication(
|
||||
'whatsapp',
|
||||
'+02${box.read(BoxName.sosPhoneDriver)}', //todo add number from driver
|
||||
'+2${box.read(BoxName.sosPhoneDriver)}', //todo add number from driver
|
||||
"${"Hello this is Driver".tr} ${box.read(BoxName.nameDriver)}.${" My current location is:".tr} https://www.google.com/maps/place/${Get.find<LocationController>().myLocation.latitude},${Get.find<LocationController>().myLocation.longitude}${" \nand I have a trip on".tr} ${AppInformation.appName} ${"App \nwith Passenger ".tr}${mapDriverController.passengerName}");
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user