ManeuverController class

Controller for managing navigation maneuvers and related information during route navigation.

This controller handles:

  • Next maneuver information updates
  • Maneuver icons and distances
  • Road names and rules
  • Additional maneuver information (exits, roundabouts)

The controller requires a navigationManager instance to function properly and manages the maneuver state through ManeuverModel.

Usage example:

final controller = ManeuverController(
  navigationManager: navigationManagerInstance,
);

// Access current maneuver state
print(controller.state.value.maneuverDistance);
print(controller.state.value.roadName);

// Listen to maneuver updates
controller.state.addListener(() {
  final model = controller.state.value;
  print('Next maneuver: ${model.maneuverIcon}');
  print('Distance: ${model.maneuverDistance}');
});

The controller maintains three main subscriptions:

  • Route updates
  • Position updates
  • Navigation state updates

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

controller.dispose();

Constructors

ManeuverController({required NavigationManager navigationManager})

Properties

hashCode int
The hash code for this object.
no setterinherited
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ValueNotifier<ManeuverModel>
no setter

Methods

dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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