Road class

Constructors

Road({required double distance, required double duration, required String? polylineEncoded, List<Road>? alternativesRoads})
Road.empty()
Road.fromOSRMJson({required Map route})
Road.minimize({required double distance, required double duration, String? polylineEncoded})
Road.withError()

Properties

alternativeRoads List<Road>?
no setter
canDrawRoad bool
no setter
destinations List<String>
no setter
details RoadDetailInfo
getter/setter pair
distance double
this attribute is the distance of the route in km
final
duration double
this attribute is the duration of route in second
final
hashCode int
The hash code for this object.
no setterinherited
polyline List<LngLat>?
this is list of geopoint of the route,this attribute is not null if geometry equal to geojson except that use always polylineEncoded
getter/setter pair
polylineEncoded String?
this is the encoded list of lnglat that should decoded to get list of geopoint this attribute can be null if the geometry == geojson
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addAlternativeRoute(Road road) → void
copyWith({double? distance, double? duration, List<RoadInstruction>? instructions, String? polylineEncoded, List<Road>? alternativesRoads}) Road
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