This commit is contained in:
Hamza-Ayed
2023-10-10 02:54:11 +03:00
parent 54e948e93b
commit b61ce6ab2e
25 changed files with 437 additions and 168 deletions

View File

@@ -4,7 +4,7 @@ import 'package:get/get.dart';
import 'package:ride/constant/box_name.dart';
import 'package:ride/constant/colors.dart';
import 'package:ride/controller/firebase/firbase_messge.dart';
import 'package:ride/controller/home/captin/map_dirction.dart';
import 'package:ride/controller/home/captin/map_driver_controller.dart';
import 'package:ride/main.dart';
import 'package:ride/views/widgets/elevated_btn.dart';
@@ -20,8 +20,8 @@ class PassengerInfoWindow extends StatelessWidget {
@override
Widget build(BuildContext context) {
Get.put(MapDirection());
return GetBuilder<MapDirection>(
Get.put(MapDriverController());
return GetBuilder<MapDriverController>(
builder: (controller) => controller.isPassengerInfoWindow == true
? Stack(
children: [
@@ -166,9 +166,8 @@ class PassengerInfoWindow extends StatelessWidget {
),
Center(
child: Text(
controller.remainingTimeToPassenger
.toString() +
' Seconds'.tr,
controller
.stringRemainingTimeToPassenger,
style: AppStyle.title,
),
)
@@ -188,47 +187,49 @@ class PassengerInfoWindow extends StatelessWidget {
),
],
)
: Positioned(
bottom: Get.height * .3,
left: 15,
child: Container(
decoration: AppStyle.boxDecoration,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
Stack(
alignment: Alignment.center,
: controller.remainingTimeToShowPassengerInfoWindowFromDriver > 0 //
? Positioned(
bottom: Get.height * .3,
left: 15,
child: Container(
decoration: AppStyle.boxDecoration,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
const CircularProgressIndicator(
backgroundColor: AppColor.redColor,
strokeWidth: 10,
color: AppColor.redColor,
value: 1,
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,
),
],
),
CircularProgressIndicator(
value: controller.progress,
// Set the color based on the "isNearEnd" condition
color: AppColor.yellowColor,
const SizedBox(
width: 10,
),
Text(
'${controller.remainingTimeToShowPassengerInfoWindowFromDriver}',
style: AppStyle.number,
'Please Wait If passenger want To Cancel!'.tr,
style: AppStyle.title,
),
],
),
const SizedBox(
width: 10,
),
Text(
'Please Wait If passenger want To Cancel!'.tr,
style: AppStyle.title,
),
],
),
),
),
),
),
)
: const SizedBox(),
);
}
}