RestrictionSection constructor
RestrictionSection({
- int startDistanceM = 0,
- int endDistanceM = 0,
- Set<
RouteRestrictionType> ? restrictions,
Creates a RestrictionSection.
Constructs a restriction section describing the restricted portion between two distances measured from the route start.
API users should not create instances of this class directly.
Parameters
startDistanceM: Distance in meters from the route start where the restriction section begins. Defaults to0.endDistanceM: Distance in meters from the route start where the restriction section ends. Defaults to0.restrictions: Set of RouteRestrictionType values describing the restrictions applied to this section. Defaults to an empty set.
Implementation
RestrictionSection({
this.startDistanceM = 0,
this.endDistanceM = 0,
final Set<RouteRestrictionType>? restrictions,
}) : restrictions = restrictions ?? <RouteRestrictionType>{};