fix: resolve stale price display in driver ratings and remove misleading discount UI in rider ratings
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../constant/colors.dart';
|
||||
import '../../constant/currency.dart';
|
||||
import '../../constant/style.dart';
|
||||
import '../../controller/firebase/firbase_messge.dart';
|
||||
import '../../controller/payment/payment_controller.dart';
|
||||
@@ -43,69 +44,29 @@ class RateDriverFromPassenger extends StatelessWidget {
|
||||
'${'Total price to '.tr}${Get.find<RideLifecycleController>().driverName}',
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 2,
|
||||
color: AppColor.redColor,
|
||||
)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Text(
|
||||
(double.parse(controller.price
|
||||
.toString()) *
|
||||
.12 +
|
||||
double.parse(controller.price
|
||||
.toString()))
|
||||
.toStringAsFixed(2),
|
||||
style: AppStyle.number.copyWith(
|
||||
color: AppColor.redColor,
|
||||
textBaseline:
|
||||
TextBaseline.ideographic,
|
||||
decoration:
|
||||
TextDecoration.lineThrough,
|
||||
decorationColor:
|
||||
AppColor.redColor),
|
||||
),
|
||||
),
|
||||
// 🔥 [Fix Fake Discount] كان هنا سعر "خصم" مُصطنَع
|
||||
// بالكامل (السعر الحقيقي × 1.12 + السعر الحقيقي)
|
||||
// يُعرض بخط مشطوب وكأنه سعر سابق حقيقي — رقم
|
||||
// مضلِّل تماماً، لا يعكس أي سعر منافس أو عرض
|
||||
// حقيقي. الآن نعرض السعر الفعلي فقط مع رمز
|
||||
// العملة الصحيح حسب دولة الرحلة.
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 2,
|
||||
color: AppColor.greenColor,
|
||||
)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Text(
|
||||
'${controller.price ?? '0'} ${CurrencyHelper.currency}',
|
||||
style: AppStyle.number,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 2,
|
||||
color: AppColor.greenColor,
|
||||
)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Text(
|
||||
controller.price.toString(),
|
||||
style: AppStyle.number,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(4.0),
|
||||
child: Text(
|
||||
'Exclusive offers and discounts always with the Siro app'
|
||||
.tr,
|
||||
style: AppStyle.title.copyWith(
|
||||
color: AppColor.redColor,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
(Get.find<PaymentController>()
|
||||
.isWalletChecked ==
|
||||
true)
|
||||
|
||||
Reference in New Issue
Block a user