Update: 2026-06-26 17:29:23
This commit is contained in:
@@ -136,7 +136,7 @@ class DurationController extends GetxController {
|
||||
update();
|
||||
|
||||
if (res == 'no_internet') {
|
||||
mySnackeBarError('No internet connection'.tr);
|
||||
mySnackbarError('No internet connection'.tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class AssuranceHealthController extends GetxController {
|
||||
} else {
|
||||
// Handle failure (e.g., show an error message)
|
||||
print("Failed to save health assurance data");
|
||||
mySnackeBarError("Please enter a health insurance status.".tr);
|
||||
mySnackbarError("Please enter a health insurance status.".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
// Handle any errors
|
||||
|
||||
@@ -82,10 +82,10 @@ class VideoController extends GetxController {
|
||||
box.write(lastFetchKey, DateTime.now().toIso8601String());
|
||||
update();
|
||||
} else {
|
||||
mySnackeBarError('');
|
||||
mySnackbarError('');
|
||||
}
|
||||
} catch (e) {
|
||||
mySnackeBarError(e.toString());
|
||||
mySnackbarError(e.toString());
|
||||
} finally {
|
||||
isLoading(false);
|
||||
}
|
||||
|
||||
@@ -544,7 +544,7 @@ class MapDriverController extends GetxController
|
||||
box.write(BoxName.statusDriverLocation, 'blocked');
|
||||
|
||||
// عرض رسالة العقوبة
|
||||
mySnackeBarError(
|
||||
mySnackbarError(
|
||||
"Due to excessive cancellations (3 times), receiving orders has been suspended for 4 hours."
|
||||
.tr,
|
||||
);
|
||||
@@ -603,7 +603,7 @@ class MapDriverController extends GetxController
|
||||
if (Get.isDialogOpen == true) {
|
||||
Get.back();
|
||||
}
|
||||
mySnackeBarError("Failed to cancel ride".tr);
|
||||
mySnackbarError("Failed to cancel ride".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
if (Get.isDialogOpen == true) {
|
||||
@@ -1038,7 +1038,7 @@ class MapDriverController extends GetxController
|
||||
box.write(BoxName.rideStatus, 'Apply');
|
||||
isPassengerInfoWindow = true;
|
||||
stopListeningStepNavigation();
|
||||
mySnackeBarError("Failed to start ride. Please try again.");
|
||||
mySnackbarError("Failed to start ride. Please try again.");
|
||||
update();
|
||||
}
|
||||
}).catchError((error) {
|
||||
@@ -1048,7 +1048,7 @@ class MapDriverController extends GetxController
|
||||
box.write(BoxName.rideStatus, 'Apply');
|
||||
isPassengerInfoWindow = true;
|
||||
stopListeningStepNavigation();
|
||||
mySnackeBarError("Network error. Failed to start ride.");
|
||||
mySnackbarError("Network error. Failed to start ride.");
|
||||
update();
|
||||
});
|
||||
} else {
|
||||
@@ -1075,7 +1075,7 @@ class MapDriverController extends GetxController
|
||||
Get.back();
|
||||
}
|
||||
Log.print("Error starting ride: $e");
|
||||
mySnackeBarError("Could not start ride. Please check internet.".tr);
|
||||
mySnackbarError("Could not start ride. Please check internet.".tr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1251,7 +1251,7 @@ class MapDriverController extends GetxController
|
||||
} catch (e) {
|
||||
if (Get.isDialogOpen == true) Get.back();
|
||||
Log.print("Error: $e");
|
||||
mySnackeBarError("Transaction failed, please try again.".tr);
|
||||
mySnackbarError("Transaction failed, please try again.".tr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1443,7 +1443,7 @@ class MapDriverController extends GetxController
|
||||
} catch (e) {
|
||||
if (Get.isDialogOpen == true) Get.back(); // إغلاق اللودينج
|
||||
Log.print("Error finishing ride: $e");
|
||||
mySnackeBarError("Failed to finish ride: $e");
|
||||
mySnackbarError("Failed to finish ride: $e");
|
||||
|
||||
// إعادة الحالة محلياً للسماح للمستخدم بالمحاولة مرة أخرى بأمان
|
||||
isRideFinished = false;
|
||||
@@ -1930,7 +1930,7 @@ class MapDriverController extends GetxController
|
||||
final String? encodedPoints = response['points'];
|
||||
|
||||
if (encodedPoints == null) {
|
||||
mySnackeBarError("No route points found".tr);
|
||||
mySnackbarError("No route points found".tr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1941,7 +1941,7 @@ class MapDriverController extends GetxController
|
||||
);
|
||||
|
||||
if (fullRoute.isEmpty) {
|
||||
mySnackeBarError("Failed to process route points".tr);
|
||||
mySnackbarError("Failed to process route points".tr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2148,11 +2148,11 @@ class MapDriverController extends GetxController
|
||||
);
|
||||
} else {
|
||||
if (Get.isDialogOpen == true) Get.back();
|
||||
mySnackeBarError("You must be closer than 100 meters to arrive".tr);
|
||||
mySnackbarError("You must be closer than 100 meters to arrive".tr);
|
||||
}
|
||||
} catch (e) {
|
||||
if (Get.isDialogOpen == true) Get.back();
|
||||
mySnackeBarError("A connection error occurred".tr);
|
||||
mySnackbarError("A connection error occurred".tr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,13 +66,13 @@ class InvitesRewardsController extends GetxController {
|
||||
mySnackbarSuccess('Reward claimed successfully!'.tr);
|
||||
await getReferralStats(); // refresh list
|
||||
} else {
|
||||
mySnackeBarError(jsonData['error'] ?? 'Failed to claim reward'.tr);
|
||||
mySnackbarError(jsonData['error'] ?? 'Failed to claim reward'.tr);
|
||||
}
|
||||
} catch (e) {
|
||||
mySnackeBarError('Failed to claim reward'.tr);
|
||||
mySnackbarError('Failed to claim reward'.tr);
|
||||
}
|
||||
} else {
|
||||
mySnackeBarError('Connection error'.tr);
|
||||
mySnackbarError('Connection error'.tr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,10 +79,10 @@ class CaptainWalletController extends GetxController {
|
||||
'',
|
||||
);
|
||||
} else {
|
||||
mySnackeBarError(mapRes['message']?.toString() ?? 'Error');
|
||||
mySnackbarError(mapRes['message']?.toString() ?? 'Error');
|
||||
}
|
||||
} else {
|
||||
mySnackeBarError('Error processing request'.tr);
|
||||
mySnackbarError('Error processing request'.tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,10 +113,10 @@ class CaptainWalletController extends GetxController {
|
||||
amountToNewDriverMap = d['data'];
|
||||
// update();
|
||||
} else {
|
||||
mySnackeBarError("This driver is not registered".tr);
|
||||
mySnackbarError("This driver is not registered".tr);
|
||||
}
|
||||
} else {
|
||||
mySnackeBarError('Your Budget less than needed'.tr);
|
||||
mySnackbarError('Your Budget less than needed'.tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -250,7 +250,7 @@ class CaptainWalletController extends GetxController {
|
||||
}
|
||||
} else {
|
||||
Get.back();
|
||||
mySnackeBarError(
|
||||
mySnackbarError(
|
||||
"A promotion record for this driver already exists for today.".tr);
|
||||
}
|
||||
}
|
||||
@@ -314,10 +314,10 @@ class CaptainWalletController extends GetxController {
|
||||
await refreshCaptainWallet();
|
||||
}));
|
||||
} else {
|
||||
mySnackeBarError(mapRes['message']?.toString() ?? 'Error');
|
||||
mySnackbarError(mapRes['message']?.toString() ?? 'Error');
|
||||
}
|
||||
} else {
|
||||
mySnackeBarError('Error processing request'.tr);
|
||||
mySnackbarError('Error processing request'.tr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class PaymobPayout extends GetxController {
|
||||
|
||||
// Get.find<CaptainWalletController>().refreshCaptainWallet();
|
||||
// } else if (dec['disbursement_status'] == 'failed') {
|
||||
// mySnackeBarError('Transaction failed'.tr);
|
||||
// mySnackbarError('Transaction failed'.tr);
|
||||
// }
|
||||
} else {
|
||||
MyDialog().getDialog('Authentication failed'.tr, ''.tr, () {
|
||||
@@ -166,7 +166,7 @@ class PaymobPayout extends GetxController {
|
||||
mySnackbarSuccess('${'Transaction successful'.tr} ${dec['amount']}');
|
||||
Get.find<CaptainWalletController>().refreshCaptainWallet();
|
||||
} else if (dec['disbursement_status'] == 'failed') {
|
||||
mySnackeBarError('Transaction failed'.tr);
|
||||
mySnackbarError('Transaction failed'.tr);
|
||||
}
|
||||
} else {
|
||||
MyDialog().getDialog('Authentication failed'.tr, ''.tr, () {
|
||||
|
||||
@@ -43,7 +43,7 @@ class ComplaintController extends GetxController {
|
||||
if (title.toLowerCase() == 'success') {
|
||||
mySnackbarSuccess(message.tr);
|
||||
} else if (isError) {
|
||||
mySnackeBarError(message.tr);
|
||||
mySnackbarError(message.tr);
|
||||
} else {
|
||||
mySnackbarWarning(message.tr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user