Distance class
Represents distance or duration information in navigation responses.
This class is used for both distance and duration measurements, providing both human-readable text and machine-readable numeric values.
Example (Distance):
final distance = Distance(
text: '2.5 km',
value: 2500, // meters
);
Example (Duration):
final duration = Distance(
text: '5 mins',
value: 300, // seconds
);
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text ↔ String?
-
Human-readable representation of the distance or duration.
getter/setter pair
- value ↔ int?
-
Numeric value for programmatic use.
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