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,6 +1,5 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart' hide Trans;
import 'package:get/get.dart';
import '../models/cab_order_model.dart';
import '../service/fire_store_utils.dart';
import '../themes/show_toast_dialog.dart';
@@ -22,7 +21,7 @@ class ComplainController extends GetxController {
order.value = args['order'] as CabOrderModel;
getComplain();
} else {
ShowToastDialog.showToast("Order data not found".tr());
ShowToastDialog.showToast("Order data not found".tr);
Get.back();
}
}
@@ -38,7 +37,7 @@ class ComplainController extends GetxController {
comment.value.text = data['description'] ?? '';
}
} catch (e) {
ShowToastDialog.showToast("Failed to load complaint".tr());
ShowToastDialog.showToast("Failed to load complaint".tr);
} finally {
isLoading.value = false;
}
@@ -47,12 +46,12 @@ class ComplainController extends GetxController {
Future<void> submitComplain() async {
// Validation
if (title.value.text.trim().isEmpty) {
ShowToastDialog.showToast("Please enter complaint title".tr());
ShowToastDialog.showToast("Please enter complaint title".tr);
return;
}
if (comment.value.text.trim().isEmpty) {
ShowToastDialog.showToast("Please enter complaint description".tr());
ShowToastDialog.showToast("Please enter complaint description".tr);
return;
}
@@ -82,16 +81,16 @@ class ComplainController extends GetxController {
ShowToastDialog.closeLoader();
ShowToastDialog.showToast(
"Your complaint has been submitted to admin".tr(),
"Your complaint has been submitted to admin".tr,
);
Get.back();
} else {
ShowToastDialog.closeLoader();
ShowToastDialog.showToast("Your complaint is already submitted".tr());
ShowToastDialog.showToast("Your complaint is already submitted".tr);
}
} catch (e) {
ShowToastDialog.closeLoader();
ShowToastDialog.showToast("Something went wrong, please try again".tr());
ShowToastDialog.showToast("Something went wrong, please try again".tr);
} finally {
isLoading.value = false;
}