Update: 2026-07-22 23:27:18

This commit is contained in:
Hamza-Ayed
2026-07-22 23:27:18 +03:00
parent b83ca1f664
commit b86f95c90d
3 changed files with 2 additions and 17 deletions
@@ -29,21 +29,6 @@ class NearbyDriversController extends GetxController {
final double minMovementThreshold = 2.0;
final Map<String, Timer> _animationTimers = {};
final List<Map<String, dynamic>> fakeCarData = [];
Timer? _autoRefreshTimer;
@override
void onInit() {
super.onInit();
detectPerfMode();
_startPeriodicRefresh();
}
void _startPeriodicRefresh() {
_autoRefreshTimer?.cancel();
_autoRefreshTimer = Timer.periodic(const Duration(seconds: 5), (_) {
getCarsLocationByPassengerAndReloadMarker();
});
}
Future<bool> getCarsLocationByPassengerAndReloadMarker() async {
carsLocationByPassenger = [];
@@ -481,7 +466,6 @@ class NearbyDriversController extends GetxController {
@override
void onClose() {
_autoRefreshTimer?.cancel();
_animationTimers.forEach((key, timer) => timer.cancel());
_animationTimers.clear();
super.onClose();