restrictions property
Set of RouteRestrictionType values that apply to this turn.
Returns
Set<RouteRestrictionType>: Restrictions for the turn; empty when there are no restrictions on the turn.
See also:
- RouteRestrictionType - Enumeration of restriction kinds.
- NavigationInstruction.currentRestrictions - Restrictions active at the current position during navigation.
Implementation
Set<RouteRestrictionType> get restrictions {
final OperationResult resultString = objectMethod(
_pointerId,
'TurnDetails',
'getRestrictions',
);
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;
}