VehicleRestriction class

Represents a vehicle restriction.

Any non null property adds more details to the restriction. All properties with value null indicate a general truck restriction.

Note: This is a beta release of this feature. Related APIs may change for new releases without a deprecation process.

Constructors

VehicleRestriction(SpecificRestriction? restriction)
Creates an unconditional restriction.
VehicleRestriction.generalRestriction()
Creates an uncoditional general restriction.

Properties

axleCount IntegerRange?
The axle count for which the current restriction applies. Can be used in conjunction with RestrictionType.weightPerAxleCount to specify restriction based on weight per number of axles. The axleCount considers total number of axles on the whole vehicle (truck + trailers). This can be used to limit the weight per axle for the whole truck. If axleCount is null, the restriction is general and applies regardless of axle count. If the upper limit of the axleCount range is 0 or null then it means the restriction applies for values >= lower limit, i.e. the upper limit of range if infinite or unbound. When a user taps the icon, the allowed axleCount range can be retrieved directly from VehicleRestriction.axleCount. Examples:
getter/setter pair
axleCountInGroup IntegerRange?
Number of axles in a group for which the current restriction applies. axleCountInGroup is a set of axles close together: single, tandem (2), triple (3), etc. Can be used in conjunction with RestrictionType.weightPerAxleGroup to specify restriction based on weight per axle group. The axleCountInGroup considers number of axles in a specific axle group (usually rear axles on the truck or trailer). This can be used to limit weight for a tandem/triple rear axle group. If the upper limit of the axleCountInGroup range is 0 or null then it means the restriction applies for values >= lower limit, i.e. the upper limit of range if infinite or unbound. Examples:
getter/setter pair
hashCode → int
The hash code for this object.
no setter
hazmatRestriction HazardousMaterialRestriction?
Restriction on transport of hazardous materials and max allowed tunnel category. For example, (FLAMMABLE, TunnelCategory.D) means, a restriction applying for trucks carrying flammable materials are not allowed to enter tunnels category D and E - (TunnelCategory.B and TunnelCategory.C allowed).
getter/setter pair
restriction SpecificRestriction?
A SpecificRestriction defines what type of restriction applies (weight, height, etc.) and the range of allowed values.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeRestriction TimeRestriction?
Restriction applies during specific time.
getter/setter pair
trailerCount IntegerRange?
Number of trailers for which the restriction applies.
getter/setter pair
truckCategory TruckCategory?
Restriction applies to a specific truck category.
getter/setter pair
weather WeatherType?
Type of weather in which restriction applies.
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.