BASE: Update PLs Wait Loader.

This commit is contained in:
2025-12-05 16:36:32 +05:00
parent 079fb01608
commit 3874ef062b
34 changed files with 61 additions and 49 deletions

View File

@@ -123,5 +123,4 @@
"changeLanguage": "Change Language",
"selectPrefferedLanguage": "Select your preferred language for a personalized app experience."
}

View File

@@ -76,7 +76,7 @@ class OnDemandPaymentController extends GetxController {
Future<void> placeOrder() async {
if (!isExtra) {
// Normal Order
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
onDemandOrderModel.value?.payment_method = selectedPaymentMethod.value;
onDemandOrderModel.value?.paymentStatus =

View File

@@ -425,7 +425,7 @@ class CartController extends GetxController {
}
Future<void> setOrder() async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
if ((Constant.isSubscriptionModelApplied == true ||
Constant.sectionConstantModel?.adminCommision?.isEnabled == true) &&

View File

@@ -65,7 +65,7 @@ class DineInRestaurantDetailsController extends GetxController {
}
Future<void> orderBook() async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
DateTime dt = selectedDate.value.toDate();
String hour = DateFormat("kk:mm").format(

View File

@@ -48,7 +48,7 @@ class EditProfileController extends GetxController {
}
Future<void> saveData() async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
if (Constant().hasValidUrl(profileImage.value) == false &&
profileImage.value.isNotEmpty) {
profileImage.value = await Constant.uploadUserImageToFireStorage(

View File

@@ -21,7 +21,7 @@ class ForgotPasswordController extends GetxController {
}
try {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
await FirebaseAuth.instance.sendPasswordResetEmail(email: email);
ShowToastDialog.closeLoader();
ShowToastDialog.showToast(

View File

@@ -108,7 +108,7 @@ class GiftCardController extends GetxController {
}
Future<void> setOrder() async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
GiftCardsOrderModel giftCardsOrderModel = GiftCardsOrderModel();
giftCardsOrderModel.id = const Uuid().v4();
giftCardsOrderModel.giftId = selectedGiftCard.value.id.toString();

View File

@@ -202,7 +202,7 @@ class OnDemandBookingController extends GetxController {
},
);
} else {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
OnProviderOrderModel onDemandOrder = OnProviderOrderModel(
otp: Constant.getReferralCode(),
authorID: FireStoreUtils.getCurrentUid(),

View File

@@ -172,7 +172,7 @@ class OnDemandOrderDetailsController extends GetxController {
final order = onProviderOrder.value;
if (order == null) return;
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
try {
double total = 0.0;

View File

@@ -136,7 +136,7 @@ class ParcelOrderConfirmationController extends GetxController {
}
Future<void> placeOrder() async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
try {
List<String> parcelImages = [];

View File

@@ -142,7 +142,7 @@ class RateProductController extends GetxController {
Future<void> saveRating() async {
if (ratings.value != 0.0) {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
productModel.value.reviewsCount = productReviewCount.value + 1;
productModel.value.reviewsSum = productReviewSum.value + ratings.value;
productModel.value.reviewAttributes = reviewProductAttributes;

View File

@@ -77,7 +77,7 @@ class ServiceListController extends GetxController {
SectionModel sectionModel,
) async {
try {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
Constant.sectionConstantModel = sectionModel;
AppThemeData.primary300 = Color(
int.tryParse(sectionModel.color?.replaceFirst("#", "0xff") ?? '') ??

View File

@@ -1,4 +1,7 @@
// ignore_for_file: depend_on_referenced_packages
import 'package:badges/badges.dart' as badges;
import 'package:customer/constant/const_texts.dart';
import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/home_e_commerce_controller.dart';
import 'package:customer/controllers/theme_controller.dart';
@@ -108,7 +111,7 @@ class HomeECommerceScreen extends StatelessWidget {
} else {
Constant.checkPermission(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
// ✅ declare it once here!
ShippingAddress shippingAddress = ShippingAddress();
@@ -1525,7 +1528,7 @@ class BannerView extends StatelessWidget {
return InkWell(
onTap: () async {
if (bannerModel.redirect_type == "store") {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
VendorModel? vendorModel =
await FireStoreUtils.getVendorById(
bannerModel.redirect_id.toString(),
@@ -1537,7 +1540,7 @@ class BannerView extends StatelessWidget {
arguments: {"vendorModel": vendorModel},
);
} else if (bannerModel.redirect_type == "product") {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
ProductModel? productModel =
await FireStoreUtils.getProductById(
bannerModel.redirect_id.toString(),
@@ -1631,7 +1634,7 @@ class BannerBottomView extends StatelessWidget {
return InkWell(
onTap: () async {
if (bannerModel.redirect_type == "store") {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
VendorModel? vendorModel =
await FireStoreUtils.getVendorById(
bannerModel.redirect_id.toString(),
@@ -1643,7 +1646,7 @@ class BannerBottomView extends StatelessWidget {
arguments: {"vendorModel": vendorModel},
);
} else if (bannerModel.redirect_type == "product") {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
ProductModel? productModel =
await FireStoreUtils.getProductById(
bannerModel.redirect_id.toString(),
@@ -1728,7 +1731,7 @@ class AdvertisementHomeCard extends StatelessWidget {
final isDark = themeController.isDark.value;
return InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
VendorModel? vendorModel = await FireStoreUtils.getVendorById(
model.vendorId!,
);

View File

@@ -341,7 +341,9 @@ class EnterManuallyLocationScreen extends StatelessWidget {
"Please Enter Area / Sector / Locality".tr,
);
} else {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(
ConstTexts.pleaseWait.tr,
);
//Common values
controller.shippingModel.value.location =

View File

@@ -76,7 +76,7 @@ class LocationPermissionScreen extends StatelessWidget {
Constant.checkPermission(
context: context,
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
ShippingAddress addressModel = ShippingAddress();
try {
await Geolocator.requestPermission();
@@ -145,7 +145,7 @@ class LocationPermissionScreen extends StatelessWidget {
Constant.checkPermission(
context: context,
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
ShippingAddress addressModel = ShippingAddress();
try {
await Geolocator.requestPermission();

View File

@@ -86,7 +86,7 @@ class AdvertisementCard extends StatelessWidget {
final isDark = themeController.isDark.value;
return InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
VendorModel? vendorModel = await FireStoreUtils.getVendorById(
model.vendorId!,
);

View File

@@ -46,7 +46,7 @@ class DriverInboxScreen extends StatelessWidget {
InboxModel inboxModel = InboxModel.fromJson(data!);
return InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
UserModel? customer = await FireStoreUtils.getUserProfile(
inboxModel.customerId.toString(),

View File

@@ -47,7 +47,7 @@ class RestaurantInboxScreen extends StatelessWidget {
InboxModel inboxModel = InboxModel.fromJson(data!);
return InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
UserModel? customer = await FireStoreUtils.getUserProfile(
inboxModel.customerId.toString(),

View File

@@ -1294,7 +1294,7 @@ class BannerBottomView extends StatelessWidget {
return InkWell(
onTap: () async {
if (bannerModel.redirect_type == "store") {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
VendorModel? vendorModel =
await FireStoreUtils.getVendorById(
bannerModel.redirect_id.toString(),
@@ -1306,7 +1306,7 @@ class BannerBottomView extends StatelessWidget {
arguments: {"vendorModel": vendorModel},
);
} else if (bannerModel.redirect_type == "product") {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
ProductModel? productModel =
await FireStoreUtils.getProductById(
bannerModel.redirect_id.toString(),

View File

@@ -106,7 +106,7 @@ class RedeemGiftCardScreen extends StatelessWidget {
} else if (controller.giftPinController.value.text.isEmpty) {
ShowToastDialog.showToast("Please Enter Gift Pin".tr);
} else {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
await FireStoreUtils.checkRedeemCode(
controller.giftCodeController.value.text.replaceAll(
" ",

View File

@@ -2190,7 +2190,7 @@ class AdvertisementHomeCard extends StatelessWidget {
final isDark = themeController.isDark.value;
return InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
VendorModel? vendorModel = await FireStoreUtils.getVendorById(
model.vendorId!,
);
@@ -2653,7 +2653,7 @@ class BannerView extends StatelessWidget {
return InkWell(
onTap: () async {
if (bannerModel.redirect_type == "store") {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
VendorModel? vendorModel =
await FireStoreUtils.getVendorById(
bannerModel.redirect_id.toString(),
@@ -2665,7 +2665,7 @@ class BannerView extends StatelessWidget {
arguments: {"vendorModel": vendorModel},
);
} else if (bannerModel.redirect_type == "product") {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
ProductModel? productModel =
await FireStoreUtils.getProductById(
bannerModel.redirect_id.toString(),
@@ -2759,7 +2759,7 @@ class BannerBottomView extends StatelessWidget {
return InkWell(
onTap: () async {
if (bannerModel.redirect_type == "store") {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
VendorModel? vendorModel =
await FireStoreUtils.getVendorById(
bannerModel.redirect_id.toString(),
@@ -2771,7 +2771,7 @@ class BannerBottomView extends StatelessWidget {
arguments: {"vendorModel": vendorModel},
);
} else if (bannerModel.redirect_type == "product") {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
ProductModel? productModel =
await FireStoreUtils.getProductById(
bannerModel.redirect_id.toString(),

View File

@@ -213,7 +213,9 @@ class HomeScreenTwo extends StatelessWidget {
Constant.checkPermission(
onTap: () async {
ShowToastDialog.showLoader(
"Please wait...".tr,
ConstTexts
.pleaseWait
.tr,
);
// ✅ declare once for whole method
@@ -1206,7 +1208,7 @@ class BannerView extends StatelessWidget {
return InkWell(
onTap: () async {
if (bannerModel.redirect_type == "store") {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
VendorModel? vendorModel = await FireStoreUtils.getVendorById(
bannerModel.redirect_id.toString(),
);
@@ -1217,7 +1219,7 @@ class BannerView extends StatelessWidget {
arguments: {"vendorModel": vendorModel},
);
} else if (bannerModel.redirect_type == "product") {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
ProductModel? productModel =
await FireStoreUtils.getProductById(
bannerModel.redirect_id.toString(),

View File

@@ -228,7 +228,7 @@ class OrderDetailsScreen extends StatelessWidget {
: InkWell(
onTap: () async {
ShowToastDialog.showLoader(
"Please wait...".tr,
ConstTexts.pleaseWait.tr,
);
UserModel? customer =
@@ -902,7 +902,9 @@ class OrderDetailsScreen extends StatelessWidget {
InkWell(
onTap: () async {
ShowToastDialog.showLoader(
"Please wait...".tr,
ConstTexts
.pleaseWait
.tr,
);
UserModel? customer =

View File

@@ -578,7 +578,7 @@ class ProfileScreen extends StatelessWidget {
negativeString: "Cancel".tr,
positiveClick: () async {
ShowToastDialog.showLoader(
"Please wait...".tr,
ConstTexts.pleaseWait.tr,
);
await controller
.deleteUserFromServer();

View File

@@ -42,7 +42,7 @@ class ScanQrCodeScreen extends StatelessWidget {
// if TypeScan.takePicture will try decode when click to take a picture(default TypeScan.live)
onCapture: (Result result) {
Get.back();
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
if (controller.allNearestRestaurant.isNotEmpty) {
if (controller.allNearestRestaurant
.where((vendor) => vendor.id == result.text)

View File

@@ -246,7 +246,7 @@ class OnDemandBookingScreen extends StatelessWidget {
Constant.checkPermission(
onTap: () async {
ShowToastDialog.showLoader(
"Please wait...".tr,
ConstTexts.pleaseWait.tr,
);
ShippingAddress shippingAddress =

View File

@@ -105,7 +105,7 @@ class OnDemandHomeScreen extends StatelessWidget {
Constant.checkPermission(
onTap: () async {
ShowToastDialog.showLoader(
"Please wait...".tr,
ConstTexts.pleaseWait.tr,
);
// ✅ declare it once here!

View File

@@ -771,7 +771,9 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
child: ElevatedButton(
onPressed: () async {
ShowToastDialog.showLoader(
"Please wait...".tr,
ConstTexts
.pleaseWait
.tr,
);
ShowToastDialog.closeLoader();
@@ -1192,7 +1194,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
child: ElevatedButton(
onPressed: () async {
ShowToastDialog.showLoader(
"Please wait...".tr,
ConstTexts.pleaseWait.tr,
);
ShowToastDialog.closeLoader();

View File

@@ -46,7 +46,7 @@ class ProviderInboxScreen extends StatelessWidget {
InboxModel inboxModel = InboxModel.fromJson(data!);
return InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
UserModel? customer = await FireStoreUtils.getUserProfile(
inboxModel.customerId.toString(),

View File

@@ -46,7 +46,7 @@ class WorkerInboxScreen extends StatelessWidget {
InboxModel inboxModel = InboxModel.fromJson(data!);
return InkWell(
onTap: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr);
UserModel? customer = await FireStoreUtils.getUserProfile(
inboxModel.customerId.toString(),

View File

@@ -99,7 +99,7 @@ class HomeParcelScreen extends StatelessWidget {
Constant.checkPermission(
onTap: () async {
ShowToastDialog.showLoader(
"Please wait...".tr,
ConstTexts.pleaseWait.tr,
);
ShippingAddress shippingAddress =

View File

@@ -604,7 +604,7 @@ class ParcelOrderDetails extends StatelessWidget {
InkWell(
onTap: () async {
ShowToastDialog.showLoader(
"Please wait...".tr,
ConstTexts.pleaseWait.tr,
);
UserModel? customer =

View File

@@ -588,7 +588,9 @@ class RentalOrderDetailsScreen extends StatelessWidget {
InkWell(
onTap: () async {
ShowToastDialog.showLoader(
"Please wait...".tr,
ConstTexts
.pleaseWait
.tr,
);
UserModel? customer =