BASE: Switch From EasyLocalization To GetX Localization.

This commit is contained in:
2025-12-04 16:56:39 +05:00
parent 157545f1c0
commit bf1d07a048
218 changed files with 2535 additions and 2313 deletions

View File

@@ -1,10 +1,10 @@
import 'package:customer/models/coupon_model.dart';
import 'package:customer/screen_ui/parcel_service/parcel_coupon_screen.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:get/get.dart' hide Trans;
import 'package:get/get.dart';
import '../../constant/constant.dart';
import '../../controllers/parcel_order_confirmation_controller.dart';
import '../../controllers/theme_controller.dart';
@@ -56,7 +56,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
),
const SizedBox(width: 10),
Text(
"Order Confirmation".tr(),
"Order Confirmation".tr,
style: AppThemeData.boldTextStyle(
fontSize: 18,
color: AppThemeData.grey900,
@@ -134,7 +134,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_infoSection(
"Pickup Address (Sender):".tr(),
"Pickup Address (Sender):".tr,
controller
.parcelOrder
.value
@@ -160,7 +160,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
),
const SizedBox(height: 16),
_infoSection(
"Delivery Address (Receiver):".tr(),
"Delivery Address (Receiver):".tr,
controller
.parcelOrder
.value
@@ -211,15 +211,15 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
_iconTile(
"${controller.parcelOrder.value.distance ?? '--'} ${'KM'.tr()}",
"Distance".tr(),
"${controller.parcelOrder.value.distance ?? '--'} ${'KM'.tr}",
"Distance".tr,
"assets/icons/ic_distance_parcel.svg",
isDark,
),
_iconTile(
controller.parcelOrder.value.parcelWeight ??
'--',
"Weight".tr(),
"Weight".tr,
"assets/icons/ic_weight_parcel.svg",
isDark,
),
@@ -227,7 +227,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
Constant.amountShow(
amount: controller.parcelOrder.value.subTotal,
),
"Rate".tr(),
"Rate".tr,
"assets/icons/ic_rate_parcel.svg",
isDark,
),
@@ -241,7 +241,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
"Coupons".tr(),
"Coupons".tr,
style: AppThemeData.boldTextStyle(
fontSize: 16,
color:
@@ -270,14 +270,14 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
} else {
ShowToastDialog.showToast(
"This offer not eligible for this booking"
.tr(),
.tr,
);
}
}
});
},
child: Text(
"View All".tr(),
"View All".tr,
style: AppThemeData.boldTextStyle(
decoration: TextDecoration.underline,
fontSize: 14,
@@ -328,7 +328,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
fontSize: 16,
),
decoration: InputDecoration(
hintText: "Write coupon code".tr(),
hintText: "Write coupon code".tr,
hintStyle: AppThemeData.mediumTextStyle(
fontSize: 16,
color: AppThemeData.parcelService500,
@@ -338,7 +338,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
),
),
RoundedButtonFill(
title: "Redeem now".tr(),
title: "Redeem now".tr,
onPress: () {
if (controller.couponList
.where(
@@ -381,18 +381,18 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
} else {
ShowToastDialog.showToast(
"This offer not eligible for this booking"
.tr(),
.tr,
);
}
} else {
ShowToastDialog.showToast(
"This coupon code has been expired"
.tr(),
.tr,
);
}
} else {
ShowToastDialog.showToast(
"Invalid coupon code".tr(),
"Invalid coupon code".tr,
);
}
},
@@ -427,7 +427,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Order Summary".tr(),
"Order Summary".tr,
style: AppThemeData.boldTextStyle(
fontSize: 14,
color: AppThemeData.grey500,
@@ -437,7 +437,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
// Subtotal
_summaryTile(
"Subtotal".tr(),
"Subtotal".tr,
Constant.amountShow(
amount: controller.subTotal.value.toString(),
),
@@ -447,7 +447,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
// Discount
_summaryTile(
"Discount".tr(),
"Discount".tr,
"-${Constant.amountShow(amount: controller.discount.value.toString())}",
isDark,
AppThemeData.dangerDark300,
@@ -481,7 +481,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
// Total
_summaryTile(
"Order Total".tr(),
"Order Total".tr,
Constant.amountShow(
amount:
controller.totalAmount.value.toString(),
@@ -513,7 +513,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
children: [
// Title
Text(
"Payment by".tr(),
"Payment by".tr,
style: AppThemeData.boldTextStyle(
fontSize: 14,
color:
@@ -550,7 +550,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
),
const SizedBox(width: 6),
Text(
"Sender".tr(),
"Sender".tr,
style: AppThemeData.semiBoldTextStyle(
fontSize: 16,
color:
@@ -589,7 +589,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
),
const SizedBox(width: 6),
Text(
"Receiver".tr(),
"Receiver".tr,
style: AppThemeData.semiBoldTextStyle(
fontSize: 16,
color:
@@ -613,8 +613,8 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
RoundedButtonFill(
title:
controller.paymentBy.value == "Sender"
? "Select Payment Method".tr()
: "Continue".tr(),
? "Select Payment Method".tr
: "Continue".tr,
onPress: () async {
if (controller.paymentBy.value == "Sender") {
Get.bottomSheet(
@@ -768,7 +768,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Select Payment Method".tr(),
"Select Payment Method".tr,
style: AppThemeData.mediumTextStyle(
fontSize: 18,
color:
@@ -791,7 +791,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
controller: scrollController,
children: [
Text(
"Preferred Payment".tr(),
"Preferred Payment".tr,
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(
fontSize: 15,
@@ -860,7 +860,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
true)
const SizedBox(height: 10),
Text(
"Other Payment Options".tr(),
"Other Payment Options".tr,
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(
fontSize: 15,
@@ -1006,7 +1006,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
),
),
RoundedButtonFill(
title: "Continue".tr(),
title: "Continue".tr,
color: AppThemeData.taxiBooking300,
textColor: AppThemeData.grey900,
onPress: () async {
@@ -1061,7 +1061,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
0.0;
if (walletBalance < amountToPay) {
ShowToastDialog.showToast(
"Insufficient wallet balance".tr(),
"Insufficient wallet balance".tr,
);
return;
}
@@ -1101,8 +1101,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
if (value == null) {
Get.back();
ShowToastDialog.showToast(
"Something went wrong, please contact admin."
.tr(),
"Something went wrong, please contact admin.".tr,
);
} else {
CreateRazorPayOrderModel result = value;
@@ -1114,7 +1113,7 @@ class ParcelOrderConfirmationScreen extends StatelessWidget {
});
} else {
ShowToastDialog.showToast(
"Please select payment method".tr(),
"Please select payment method".tr,
);
}
},