BASE: Initialize Localization.

This commit is contained in:
2025-12-03 18:21:19 +05:00
parent cf58d069ab
commit b04050384d
141 changed files with 1577 additions and 1419 deletions

View File

@@ -4,6 +4,7 @@ import 'package:customer/constant/constant.dart';
import 'package:customer/models/wallet_transaction_model.dart';
import 'package:customer/screen_ui/multi_vendor_service/wallet_screen/wallet_screen.dart';
import 'package:customer/themes/show_toast_dialog.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:get/get.dart';
import '../models/rental_order_model.dart';
import '../models/tax_model.dart';
@@ -111,7 +112,7 @@ class MyRentalBookingController extends GetxController {
if (selectedPaymentMethod.value == PaymentGateway.cod.name) {
selectedOrder.value.paymentMethod = selectedPaymentMethod.value;
await FireStoreUtils.rentalOrderPlace(selectedOrder.value).then((value) {
ShowToastDialog.showToast("Payment method changed".tr);
ShowToastDialog.showToast("Payment method changed".tr());
Get.back();
Get.back();
});
@@ -128,8 +129,8 @@ class MyRentalBookingController extends GetxController {
userId: FireStoreUtils.getCurrentUid(),
isTopup: false,
orderId: selectedOrder.value.id,
note: "Rental Amount debited".tr,
paymentStatus: "success".tr,
note: "Rental Amount debited".tr(),
paymentStatus: "success".tr(),
serviceType: Constant.parcelServiceType,
);
@@ -141,7 +142,7 @@ class MyRentalBookingController extends GetxController {
}
await FireStoreUtils.rentalOrderPlace(selectedOrder.value).then((value) {
ShowToastDialog.showToast("Payment successfully".tr);
ShowToastDialog.showToast("Payment successfully".tr());
Get.back();
Get.back();
});
@@ -204,17 +205,17 @@ class MyRentalBookingController extends GetxController {
isTopup: true,
// refund
orderId: order.id,
note: "Refund for cancelled booking".tr,
paymentStatus: "success".tr,
note: "Refund for cancelled booking".tr(),
paymentStatus: "success".tr(),
serviceType: Constant.parcelServiceType,
);
await FireStoreUtils.setWalletTransaction(walletTransaction);
await FireStoreUtils.updateUserWallet(amount: refundAmount.toString(), userId: FireStoreUtils.getCurrentUid());
}
ShowToastDialog.showToast("Booking cancelled successfully".tr);
ShowToastDialog.showToast("Booking cancelled successfully".tr());
} catch (e) {
ShowToastDialog.showToast("Failed to cancel booking: $e".tr);
ShowToastDialog.showToast("Failed to cancel booking: $e".tr());
} finally {
isLoading.value = false;
}