Update: 2026-06-14 05:48:58

This commit is contained in:
Hamza-Ayed
2026-06-14 05:48:58 +03:00
parent 2645ed0cf1
commit 8e3b9eca4d
22 changed files with 789 additions and 179 deletions

View File

@@ -219,14 +219,16 @@ class _Divider extends StatelessWidget {
// Server Helpers (unchanged logic)
// ─────────────────────────────────────────────
bool _isCheckingPendingOrder = false;
Future<void> checkForPendingOrderFromServer() async {
bool isProcessing = false;
if (isProcessing) return;
if (_isCheckingPendingOrder) return;
if (Get.currentRoute == '/passenger-location-map') return;
final driverId = box.read(BoxName.driverID)?.toString();
if (driverId == null) return;
isProcessing = true;
_isCheckingPendingOrder = true;
try {
var response = await CRUD().post(
@@ -258,7 +260,7 @@ Future<void> checkForPendingOrderFromServer() async {
} catch (_) {
// silent
} finally {
isProcessing = false;
_isCheckingPendingOrder = false;
}
}