Edge cases - UX bugs

This commit is contained in:
stopflock
2025-10-02 18:51:52 -05:00
parent 19de232484
commit 40c78ab3b7
5 changed files with 69 additions and 11 deletions
+11
View File
@@ -227,6 +227,17 @@ class NavigationState extends ChangeNotifier {
notifyListeners();
}
/// Check if user should auto-enable follow-me (called from outside with user location)
bool shouldAutoEnableFollowMe(LatLng? userLocation) {
if (userLocation == null || _routeStart == null) return false;
final distanceToStart = const Distance().as(LengthUnit.Meter, userLocation, _routeStart!);
final shouldEnable = distanceToStart <= 1000; // Within 1km
debugPrint('[NavigationState] Distance to start: ${distanceToStart.toStringAsFixed(0)}m, auto follow-me: $shouldEnable');
return shouldEnable;
}
/// Show route overview (from route button during active navigation)
void showRouteOverview() {
if (_mode != AppNavigationMode.routeActive) return;