This commit is contained in:
Hamza-Ayed
2024-03-21 02:09:52 +03:00
parent ad062d9ad7
commit 045f7e20f0
46 changed files with 2767 additions and 877 deletions

View File

@@ -1,4 +1,3 @@
import 'package:SEFER/controller/functions/location_controller.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_font_icons/flutter_font_icons.dart';
@@ -10,12 +9,10 @@ import 'package:SEFER/controller/firebase/firbase_messge.dart';
import 'package:SEFER/controller/home/captin/map_driver_controller.dart';
import 'package:SEFER/main.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../../../constant/style.dart';
import '../../../../controller/functions/launch.dart';
import '../../../../controller/home/captin/widget/call_page.dart';
import 'google_map_app.dart';
class PassengerInfoWindow extends StatelessWidget {
const PassengerInfoWindow({
@@ -83,7 +80,7 @@ class PassengerInfoWindow extends StatelessWidget {
true;
launchCommunication(
'email',
controller.phone
controller.passengerPhone
.toString(),
'${'Hello this is Driver'.tr} ${box.read(BoxName.nameDriver)}');
},
@@ -155,7 +152,7 @@ class PassengerInfoWindow extends StatelessWidget {
Text('Name of the Passenger is '.tr,
style: AppStyle.title),
Text(
controller.name.toString(),
controller.passengerName.toString(),
style: AppStyle.title,
),
],
@@ -353,49 +350,49 @@ class PassengerInfoWindow extends StatelessWidget {
),
],
)
: controller.remainingTimeToShowPassengerInfoWindowFromDriver > 0 //
? Positioned(
bottom: Get.height * .2,
left: 15,
child: Container(
decoration: AppStyle.boxDecoration,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
Stack(
alignment: Alignment.center,
children: [
const CircularProgressIndicator(
backgroundColor: AppColor.redColor,
strokeWidth: 10,
color: AppColor.redColor,
value: 1,
),
CircularProgressIndicator(
value: controller.progress,
// Set the color based on the "isNearEnd" condition
color: AppColor.yellowColor,
),
Text(
'${controller.remainingTimeToShowPassengerInfoWindowFromDriver}',
style: AppStyle.number,
),
],
),
const SizedBox(
width: 10,
),
Text(
'Please Wait If passenger want To Cancel!'.tr,
style: AppStyle.title,
),
],
),
),
),
)
: const SizedBox(),
// : controller.remainingTimeToShowPassengerInfoWindowFromDriver > 0 //
// ? Positioned(
// bottom: Get.height * .2,
// left: 15,
// child: Container(
// decoration: AppStyle.boxDecoration,
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: Row(
// children: [
// Stack(
// alignment: Alignment.center,
// children: [
// const CircularProgressIndicator(
// backgroundColor: AppColor.redColor,
// strokeWidth: 10,
// color: AppColor.redColor,
// value: 1,
// ),
// CircularProgressIndicator(
// value: controller.progress,
// // Set the color based on the "isNearEnd" condition
// color: AppColor.yellowColor,
// ),
// Text(
// '${controller.remainingTimeToShowPassengerInfoWindowFromDriver}',
// style: AppStyle.number,
// ),
// ],
// ),
// const SizedBox(
// width: 10,
// ),
// Text(
// 'Please Wait If passenger want To Cancel!'.tr,
// style: AppStyle.title,
// ),
// ],
// ),
// ),
// ),
// )
: const SizedBox(),
);
}
}

View File

@@ -100,7 +100,7 @@ class SosConnect extends StatelessWidget {
launchCommunication(
'whatsapp',
'+962${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.name}");
"${"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}");
}
},
child: const Icon(