stopTracking method

Future<void> stopTracking()

Stop tracking location

Implementation

Future<void> stopTracking() async {
  try {
    await _positionStreamSubscription?.cancel();
    _positionStreamSubscription = null;
    _isTracking = false;
    debugPrint('Location tracking stopped');
  } catch (e) {
    _errorController.add('Failed to stop tracking: $e');
  }
}