4/12/3
This commit is contained in:
@@ -42,7 +42,7 @@ class MapPagePassenger extends StatelessWidget {
|
||||
const MapMenuWidget(),
|
||||
const MenuIconMapPageWidget(),
|
||||
buttomSheetMapPage(),
|
||||
CarDetailsTypeToChoose(),
|
||||
CarDetailsTypeToChoose(), const Burc(),
|
||||
const ApplyOrderWidget(),
|
||||
// hexagonClipper(),
|
||||
const CancelRidePageShow(),
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../constant/info.dart';
|
||||
import '../../../controller/functions/tts.dart';
|
||||
import '../../../controller/home/map_passenger_controller.dart';
|
||||
|
||||
@@ -372,6 +373,58 @@ class CarDetailsTypeToChoose extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class Burc extends StatelessWidget {
|
||||
const Burc({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<MapPassengerController>(
|
||||
builder: (mapPassengerController) {
|
||||
final passengerWallet =
|
||||
double.tryParse(box.read(BoxName.passengerWalletTotal)) ??
|
||||
0.0; // Handle potential parsing errors
|
||||
|
||||
return mapPassengerController.data.isNotEmpty &&
|
||||
mapPassengerController.isBottomSheetShown &&
|
||||
!mapPassengerController.rideConfirm
|
||||
? Positioned(
|
||||
bottom: Get.height * .41,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
if (passengerWallet < 0.0) // Use if statement for clarity
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration.copyWith(
|
||||
color: AppColor.redColor.withOpacity(.5),
|
||||
),
|
||||
height: 50,
|
||||
width: Get.width * .94,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Text(
|
||||
'Your trip cost is'.tr +
|
||||
' ${mapPassengerController.totalCostPassenger.toStringAsFixed(2)} '
|
||||
'But you have a negative balance of'
|
||||
.tr +
|
||||
'${passengerWallet.toStringAsFixed(2)}'
|
||||
' in your'
|
||||
.tr +
|
||||
' ${AppInformation.appName}'
|
||||
' wallet due to a previous trip.'
|
||||
.tr,
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: const SizedBox();
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CarDialogue extends StatelessWidget {
|
||||
const CarDialogue({
|
||||
super.key,
|
||||
|
||||
Reference in New Issue
Block a user