RouteInstruction class Routes & Navigation

A single route step inside a route segment.

RouteInstruction models one maneuver or guidance step (for example: turn, exit, follow road). It contains localized text, optional signpost information, turn images, realistic intersection imagery, and time/distance metrics (remaining and traveled). Instances are produced by the routing engine and obtained from RouteSegment.instructions.

Use route instructions to build UI lists, previews or to center a map on specific steps. For real-time turn-by-turn navigation see NavigationInstruction, which is produced when navigation is active.

See also:

Inheritance

Properties

coordinates Coordinates
Location coordinates for this instruction.
no setterinherited
countryCodeISO String
ISO 3166-1 alpha-3 country code for the instruction location.
no setterinherited
exitDetails String
Exit instruction text when this instruction is an exit.
no setterinherited
followRoadInstruction String
Localized textual description for follow-road guidance associated with this instruction.
no setterinherited
hasFollowRoadInfo bool
Whether follow-road guidance information is available for this instruction.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasRegisteredAutoReleaseObject bool
getter/setter pairinherited
hasRoadInfo bool
Whether road information (names, shields) is available for this instruction.
no setterinherited
hasSignpostInfo bool
Whether signpost information is available for this instruction.
no setterinherited
hasTurnInfo bool
Whether detailed turn information is available for this instruction.
no setterinherited
isCommon bool
Whether this instruction belongs to a common-type segment (see RouteSegment.isCommon).
no setterinherited
isExit bool
Whether this instruction represents a main-road exit maneuver.
no setterinherited
isFerry bool
Whether this instruction involves a ferry crossing.
no setterinherited
isTollRoad bool
Whether this instruction involves a tolled road.
no setterinherited
pointerId int
The pointer ID of the native object
no setterinherited
realisticNextTurnImg AbstractGeometryImg
Get the vectorial representation for the realistic next turn image as a AbstractGeometryImg.
no setterinherited
remainingTravelTimeDistance TimeDistance
Remaining travel time and distance from this instruction to the route end.
no setterinherited
remainingTravelTimeDistanceToNextWaypoint TimeDistance
Remaining time/distance to the next waypoint from this instruction.
no setterinherited
roadInfo List<RoadInfo>
Road information associated with this instruction (name, shield, attributes).
no setterinherited
roadInfoImg RoadInfoImg
Get the signpost image as a RoadInfoImg.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
signpostDetails SignpostDetails
Detailed signpost information associated with this instruction.
no setterinherited
signpostInstruction String
Localized text description for signpost guidance.
no setterinherited
timeDistanceToNextTurn TimeDistance
Distance and time to the next turn from this instruction.
no setterinherited
traveledTimeDistance TimeDistance
Distance/time metrics already traveled up to this instruction.
no setterinherited
turnDetails TurnDetails
Detailed information describing the upcoming turn.
no setterinherited
turnImg Img
Vector image representation of the turn symbol as an Img.
no setterinherited
turnInstruction String
Localized textual instruction for the turn.
no setterinherited

Methods

dispose() → void
Disposes the native object.
inherited
getRealisticNextTurnImage({Size? size, ImageFileFormat? format, AbstractGeometryImageRenderSettings renderSettings = const AbstractGeometryImageRenderSettings()}) Uint8List?
Retrieve a rasterized image for the realistic next-turn rendering.
inherited
getRoadInfoImage({Size? size, ImageFileFormat? format, Color backgroundColor = Colors.transparent, bool allowResize = false}) Uint8List?
Retrieve a raster image representing the road information (e.g., shield or icon).
inherited
getTurnImage({Size? size, ImageFileFormat? format}) Uint8List?
Retrieve a raster image representing the turn symbol.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerAutoReleaseObject(int pointerId) → void
Registers an object for auto release.
inherited
toPTRouteInstruction() PTRouteInstruction?
Convert to a PTRouteInstruction from this one.
toString() String
A string representation of this object.
inherited

Operators

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