DirectionRouteSegment class
A class that encapsulates a segment of a DirectionRouteData.
Includes the distance, duration and a List of DirectionRouteSegmentStep (steps) for travelling the segment.
Constructors
-
DirectionRouteSegment({required double distance, required double duration, required List<
DirectionRouteSegmentStep> steps}) -
const
-
DirectionRouteSegment.fromJson(Map<
String, dynamic> json) -
Generates a DirectionRouteSegment from a received Map having the keys
'distance', 'duration' and 'steps'.
factory
Properties
- distance → double
-
The distance of the route segment.
final
- duration → double
-
The duration required to travel the route segment.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
steps
→ List<
DirectionRouteSegmentStep> -
The list of
DirectionRouteSegmentStep
s that need to be taken to travel the route segment.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts the DirectionRouteSegment to a Map with keys 'distance', 'duration' and 'steps'.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited