CarSpecifications class - transport library - Dart API
CarSpecifications
CarSpecifications class
Car specifications contain vehicle related attributes.
Examples: Dimensions, weight, axle count. Only the fields that are set are considered for restriction handling.
Constructors
- CarSpecifications([int? grossWeightInKilograms = null, int? heightInCentimeters = null, int? widthInCentimeters = null, int? lengthInCentimeters = null, int? axleCount = null, int? trailerCount = null, int? trailerAxleCount = null])
- Creates a new instance.
- CarSpecifications.withDefaults()
- Creates a new instance.
Properties
- axleCount ↔ int?
-
Defines total number of axles in the vehicle. The provided value must be greater than or
equal to 2. By default, it is not set.
Route calculation: When not set, possible axle count restrictions will not be
taken into consideration.
When specifying CarSpecifications.trailerAxleCount, then CarSpecifications.axleCount is required and must be greater than CarSpecifications.trailerAxleCount.
getter/setter pair
- grossWeightInKilograms ↔ int?
-
Car weight including trailers and shipped goods in kilograms. The provided value
must be greater than or equal to 0. By default, it is not set.
Note:
This parameter is limited to a maximum weight of 4250 kg without trailer and 7550 kg with trailer.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setter
- heightInCentimeters ↔ int?
-
Car height in centimeters. The provided value must be in the range [0, 5000].
By default, it is not set.
getter/setter pair
- lengthInCentimeters ↔ int?
-
Car length in centimeters. The provided value must be in the range [0, 30000].
By default, it is not set.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trailerAxleCount ↔ int?
-
Defines total number of axles across all the trailers attached to the vehicle.
This number is included in CarSpecifications.axleCount, hence CarSpecifications.trailerAxleCount must be less than CarSpecifications.axleCount
and greater than or equal to 1. CarSpecifications.axleCount and CarSpecifications.trailerCount are required to specify CarSpecifications.trailerAxleCount.
By default, it is not set.
getter/setter pair
- trailerCount ↔ int?
-
Defines number of trailers attached to the vehicle. The provided value must be in the range
[0, 1]. By default, it is not set.
When specifying CarSpecifications.trailerAxleCount, then CarSpecifications.trailerCount is required and must be greater than 0.
getter/setter pair
- widthInCentimeters ↔ int?
-
Car width in centimeters. The provided value must be in the range [0, 5000].
By default, it is not set.
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.