feat: add device authentication, place gates support, and PiP navigation features
This commit is contained in:
@@ -12,6 +12,7 @@ import '../../../core/constants/app_colors.dart';
|
||||
import '../../../core/services/car_platform_bridge.dart';
|
||||
import '../../../core/services/connectivity_service.dart';
|
||||
import '../../../core/services/location_service.dart';
|
||||
import '../../../core/services/pip_service.dart';
|
||||
import '../../../core/services/tts_service.dart';
|
||||
import '../../../core/services/vehicle_icon_generator.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@@ -770,6 +771,7 @@ class NavigationCubit extends Cubit<NavigationState> {
|
||||
maneuver: initialModifier,
|
||||
isNavigating: true,
|
||||
);
|
||||
PipService.instance.setNavigating(true);
|
||||
}
|
||||
|
||||
void stopNavigation() {
|
||||
@@ -778,6 +780,7 @@ class NavigationCubit extends Cubit<NavigationState> {
|
||||
_movementInterpolationTimer = null;
|
||||
ttsService.stop();
|
||||
CarPlatformBridge.stopNavigation();
|
||||
PipService.instance.setNavigating(false);
|
||||
_lastTraveledIndexInFullRoute = 0;
|
||||
_offRouteStartTime = null;
|
||||
_hasAnnouncedEarlyStepIndex = null;
|
||||
|
||||
@@ -118,6 +118,16 @@ class NavigationState extends Equatable {
|
||||
return '$minutes دقيقة';
|
||||
}
|
||||
|
||||
String get formattedDistanceToStep {
|
||||
if (distanceToNextStep >= 1000) {
|
||||
return '${(distanceToNextStep / 1000).toStringAsFixed(1)} كم';
|
||||
}
|
||||
if (distanceToNextStep > 0) {
|
||||
return '${distanceToNextStep.round()} م';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
NavigationState copyWith({
|
||||
NavigationStatus? status,
|
||||
LatLng? myLocation,
|
||||
|
||||
Reference in New Issue
Block a user