FinishRouteController class

Controller for managing the finish route functionality and parking visibility state.

This controller handles:

  • Parking visibility toggle functionality
  • Navigation termination
  • Parking state management

The controller requires both navigationManager and map instances to function properly.

Usage example:

final controller = FinishRouteController(
  map: mapInstance,
  navigationManager: navigationManagerInstance,
);

// Access parking state
print(controller.state.value.isParkingEnabled);

// Toggle parking visibility
controller.toggleParkingsVisibility();

// Stop navigation
controller.stopNavigation();

The controller manages its state through FinishRouteModel which contains information about parking visibility status. State changes can be observed through the state ValueNotifier.

Remember to dispose of the controller when it's no longer needed:

controller.dispose();

The controller exposes sdk.Map and sdk.NavigationManager instances for advanced customization if needed.

Constructors

FinishRouteController({required Map map, required NavigationManager navigationManager})

Properties

hashCode int
The hash code for this object.
no setterinherited
map Map
final
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ValueNotifier<FinishRouteModel>
The current state as a ValueNotifier. Contains parking visibility state.
no setter

Methods

dispose() → void
Cleans up resources by canceling subscriptions. Should be called when the controller is no longer needed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stopNavigation() → void
Stops the current navigation session.
toggleParkingsVisibility() → void
Toggles the visibility of parking locations on the map. Updates the state with new parking visibility status.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited