Update: 2026-07-12 18:53:59

This commit is contained in:
Hamza-Ayed
2026-07-12 18:53:59 +03:00
parent 8cd4a4b57e
commit 653d73422f
54 changed files with 2078 additions and 436 deletions
@@ -78,6 +78,14 @@ Future<bool> onStart(ServiceInstance service) async {
// 🔥 قراءة حالة التطبيق مباشرة قبل العرض
await GetStorage.init(); // تأكد من تحديث البيانات
final box = GetStorage();
// 🚌 في وضع الباص لا نعرض طلبات الرحلات — السائق في مهمة باص نشطة
final bool inBusMode = box.read(BoxName.isBusMode) ?? false;
if (inBusMode) {
print("🚌 Bus mode active — ignoring new_ride_request in background.");
return;
}
bool isAppInForeground = box.read(BoxName.isAppInForeground) ?? false;
// 🔥 Check إضافي: هل الـ Overlay مفتوح بالفعل؟ (للأندرويد فقط)