RouteMatrix class

The response of calculateRouteMatrix.

Annotations

Constructors

RouteMatrix({required List<List<MatrixCell>> cells, int errorCount = 0, String? pricingBucket})
Creates the matrix.
const
RouteMatrix.fromJson(Map<String, dynamic> json)
Reads the matrix from the service response.
factory

Properties

cells → List<List<MatrixCell>>
The cells: cells[origin][destination].
final
destinationCount → int
How many destinations it has.
no setter
errorCount → int
How many cells couldn't be calculated.
final
hashCode → int
The hash code for this object.
no setterinherited
originCount → int
How many origins it has.
no setter
pricingBucket → String?
The pricing bucket AWS applied.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cell(int origin, int destination) → MatrixCell
The cell for the given pair.
nearestDestination(int origin, {bool byDuration = true}) → int?
The index of the destination closest to origin by road.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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