BASE: Initialize Localization.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'dart:async';
|
||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import '../constant/constant.dart';
|
||||
@@ -81,7 +82,7 @@ class ParcelMyBookingController extends GetxController {
|
||||
isLoading.value = true;
|
||||
|
||||
if (order.status != Constant.orderPlaced) {
|
||||
ShowToastDialog.showToast("You can only cancel before pickup.".tr);
|
||||
ShowToastDialog.showToast("You can only cancel before pickup.".tr());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -124,9 +125,9 @@ class ParcelMyBookingController extends GetxController {
|
||||
await FireStoreUtils.updateUserWallet(amount: refundAmount.toString(), userId: FireStoreUtils.getCurrentUid());
|
||||
}
|
||||
|
||||
ShowToastDialog.showToast("Order cancelled successfully".tr);
|
||||
ShowToastDialog.showToast("Order cancelled successfully".tr());
|
||||
} catch (e) {
|
||||
ShowToastDialog.showToast("${'Failed to cancel order:'.tr} $e".tr);
|
||||
ShowToastDialog.showToast("${'Failed to cancel order:'.tr()} $e".tr());
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user