Update: 2026-06-10 18:11:50
This commit is contained in:
@@ -19,6 +19,7 @@ import '../firebase/local_notification.dart';
|
||||
import '../home/captin/home_captain_controller.dart';
|
||||
import '../home/captin/map_driver_controller.dart';
|
||||
import '../home/payment/captain_wallet_controller.dart';
|
||||
import '../home/navigation/navigation_controller.dart';
|
||||
import 'background_service.dart';
|
||||
import 'crud.dart';
|
||||
|
||||
@@ -539,6 +540,16 @@ class LocationController extends GetxController with WidgetsBindingObserver {
|
||||
}
|
||||
}
|
||||
|
||||
if (Get.isRegistered<MapDriverController>()) {
|
||||
final mapCtrl = Get.find<MapDriverController>();
|
||||
mapCtrl.handleLocationUpdateFromCentral(pos, speed, heading);
|
||||
}
|
||||
|
||||
if (Get.isRegistered<NavigationController>()) {
|
||||
final navCtrl = Get.find<NavigationController>();
|
||||
navCtrl.handleLocationUpdateFromCentral(pos, speed, heading);
|
||||
}
|
||||
|
||||
await _saveBehaviorIfMoved(pos, now, currentSpeed: speed);
|
||||
}, onError: (e) => Log.print('❌ Location Stream Error: $e'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user