currentRestrictions property

Set<RouteRestrictionType> get currentRestrictions

Set of RouteRestrictionType values active at the current position.

Describes the restrictions that apply to the part of the route the user is currently traveling on (for example access restricted, transport not allowed, vehicle over weight/height/length/width/axle limit, plate restriction).

Returns

  • Set<RouteRestrictionType>: Currently active restrictions; empty when no restriction is active.

See also:

Implementation

Set<RouteRestrictionType> get currentRestrictions {
  final OperationResult resultString = objectMethod(
    pointerId,
    'NavigationInstruction',
    'getCurrentRestrictions',
  );

  final int mask = resultString['result'];
  final Set<RouteRestrictionType> result = <RouteRestrictionType>{};
  for (final RouteRestrictionType value in RouteRestrictionType.values) {
    if (mask & value.id != 0) {
      result.add(value);
    }
  }
  return result;
}