RestrictionSection constructor

RestrictionSection({
  1. int startDistanceM = 0,
  2. int endDistanceM = 0,
  3. 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 to 0.
  • endDistanceM: Distance in meters from the route start where the restriction section ends. Defaults to 0.
  • 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>{};