Steps class
Represents a single navigation step in a route.
A step contains all information needed to guide a user through one segment of a route, including distance, duration, instructions, and geometry. This structure typically comes from the Google Maps Directions API.
Example:
final step = Steps(
distance: Distance(text: '500 m', value: 500),
duration: Distance(text: '2 mins', value: 120),
startLocation: Northeast(lat: 5.6037, lng: -0.1870),
endLocation: Northeast(lat: 5.6087, lng: -0.1920),
htmlInstructions: 'Turn <b>right</b> onto Ring Road',
polyline: Polylines(points: 'encoded_polyline_string'),
travelMode: 'DRIVING',
maneuver: 'turn-right',
);
Constructors
- Steps({required Distance? distance, required Distance? duration, required Northeast? endLocation, required String? htmlInstructions, required Polylines? polyline, required Northeast? startLocation, required String? travelMode, required String? maneuver})
- Creates a Steps instance representing a navigation step.
Properties
- distance ↔ Distance?
-
The distance covered in this navigation step.
getter/setter pair
- duration ↔ Distance?
-
The estimated time to complete this navigation step.
getter/setter pair
- endLocation ↔ Northeast?
-
The ending coordinate of this step.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- htmlInstructions ↔ String?
-
HTML-formatted navigation instructions for this step.
getter/setter pair
- maneuver ↔ String?
-
The type of maneuver to perform at this step.
getter/setter pair
- polyline ↔ Polylines?
-
Encoded polyline representing the path geometry for this step.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startLocation ↔ Northeast?
-
The starting coordinate of this step.
getter/setter pair
- travelMode ↔ String?
-
The mode of transportation for this step.
getter/setter pair
Methods
-
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