feat: add vehicle customization, Arabic search normalization, and smooth movement interpolation
This commit is contained in:
@@ -29,6 +29,7 @@ class NavigationState extends Equatable {
|
||||
final int selectedRouteIndex;
|
||||
final LatLng? destination;
|
||||
final String destinationTitle;
|
||||
final String originTitle;
|
||||
final List<Map<String, dynamic>> routeSteps;
|
||||
final int currentStepIndex;
|
||||
final String currentInstruction;
|
||||
@@ -45,8 +46,15 @@ class NavigationState extends Equatable {
|
||||
final Set<Polyline> polylines;
|
||||
final List<PlaceModel> searchResults;
|
||||
final bool isSelectingLocationOnMap;
|
||||
final String? activePickerMode;
|
||||
final LatLng? pickedLocation;
|
||||
final bool isOnline;
|
||||
final String? errorMessage;
|
||||
final int selectedVehicleColor;
|
||||
final String selectedVehicleStyle;
|
||||
final double vehicleScale;
|
||||
final List<String> recentSearches;
|
||||
final bool isSearching;
|
||||
|
||||
const NavigationState({
|
||||
this.status = NavigationStatus.initial,
|
||||
@@ -58,6 +66,7 @@ class NavigationState extends Equatable {
|
||||
this.selectedRouteIndex = 0,
|
||||
this.destination,
|
||||
this.destinationTitle = '',
|
||||
this.originTitle = 'موقعي الحالي',
|
||||
this.routeSteps = const [],
|
||||
this.currentStepIndex = 0,
|
||||
this.currentInstruction = '',
|
||||
@@ -74,8 +83,15 @@ class NavigationState extends Equatable {
|
||||
this.polylines = const {},
|
||||
this.searchResults = const [],
|
||||
this.isSelectingLocationOnMap = false,
|
||||
this.activePickerMode,
|
||||
this.pickedLocation,
|
||||
this.isOnline = true,
|
||||
this.errorMessage,
|
||||
this.selectedVehicleColor = 0xFF007AFF,
|
||||
this.selectedVehicleStyle = 'car',
|
||||
this.vehicleScale = 1.8,
|
||||
this.recentSearches = const [],
|
||||
this.isSearching = false,
|
||||
});
|
||||
|
||||
RouteData? get currentRoute =>
|
||||
@@ -112,6 +128,7 @@ class NavigationState extends Equatable {
|
||||
int? selectedRouteIndex,
|
||||
LatLng? destination,
|
||||
String? destinationTitle,
|
||||
String? originTitle,
|
||||
List<Map<String, dynamic>>? routeSteps,
|
||||
int? currentStepIndex,
|
||||
String? currentInstruction,
|
||||
@@ -128,8 +145,17 @@ class NavigationState extends Equatable {
|
||||
Set<Polyline>? polylines,
|
||||
List<PlaceModel>? searchResults,
|
||||
bool? isSelectingLocationOnMap,
|
||||
String? activePickerMode,
|
||||
bool clearActivePickerMode = false,
|
||||
LatLng? pickedLocation,
|
||||
bool clearPickedLocation = false,
|
||||
bool? isOnline,
|
||||
String? errorMessage,
|
||||
int? selectedVehicleColor,
|
||||
String? selectedVehicleStyle,
|
||||
double? vehicleScale,
|
||||
List<String>? recentSearches,
|
||||
bool? isSearching,
|
||||
}) {
|
||||
return NavigationState(
|
||||
status: status ?? this.status,
|
||||
@@ -141,6 +167,7 @@ class NavigationState extends Equatable {
|
||||
selectedRouteIndex: selectedRouteIndex ?? this.selectedRouteIndex,
|
||||
destination: destination ?? this.destination,
|
||||
destinationTitle: destinationTitle ?? this.destinationTitle,
|
||||
originTitle: originTitle ?? this.originTitle,
|
||||
routeSteps: routeSteps ?? this.routeSteps,
|
||||
currentStepIndex: currentStepIndex ?? this.currentStepIndex,
|
||||
currentInstruction: currentInstruction ?? this.currentInstruction,
|
||||
@@ -159,8 +186,15 @@ class NavigationState extends Equatable {
|
||||
searchResults: searchResults ?? this.searchResults,
|
||||
isSelectingLocationOnMap:
|
||||
isSelectingLocationOnMap ?? this.isSelectingLocationOnMap,
|
||||
activePickerMode: clearActivePickerMode ? null : (activePickerMode ?? this.activePickerMode),
|
||||
pickedLocation: clearPickedLocation ? null : (pickedLocation ?? this.pickedLocation),
|
||||
isOnline: isOnline ?? this.isOnline,
|
||||
errorMessage: errorMessage ?? this.errorMessage,
|
||||
selectedVehicleColor: selectedVehicleColor ?? this.selectedVehicleColor,
|
||||
selectedVehicleStyle: selectedVehicleStyle ?? this.selectedVehicleStyle,
|
||||
vehicleScale: vehicleScale ?? this.vehicleScale,
|
||||
recentSearches: recentSearches ?? this.recentSearches,
|
||||
isSearching: isSearching ?? this.isSearching,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -175,6 +209,7 @@ class NavigationState extends Equatable {
|
||||
selectedRouteIndex,
|
||||
destination,
|
||||
destinationTitle,
|
||||
originTitle,
|
||||
routeSteps,
|
||||
currentStepIndex,
|
||||
currentInstruction,
|
||||
@@ -191,7 +226,14 @@ class NavigationState extends Equatable {
|
||||
polylines,
|
||||
searchResults,
|
||||
isSelectingLocationOnMap,
|
||||
activePickerMode,
|
||||
pickedLocation,
|
||||
isOnline,
|
||||
errorMessage,
|
||||
selectedVehicleColor,
|
||||
selectedVehicleStyle,
|
||||
vehicleScale,
|
||||
recentSearches,
|
||||
isSearching,
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user