routeTypePreferences property
Additional route type preference flags.
A set of optional routing preferences that can be combined to further customize route calculation when using public transport. Only applies to RouteTransportMode.public.
Default is {RouteTypePreferences.none}.
Implementation
Set<RouteTypePreferences> get routeTypePreferences {
final OperationResult resultString = objectMethod(
pointerId,
'RoutePrefWrapper',
'getRouteTypePreferences',
);
final int routeTypePreferencesInt = resultString['result'];
final Set<RouteTypePreferences> prefs = <RouteTypePreferences>{};
for (final RouteTypePreferences value in RouteTypePreferences.values) {
if (routeTypePreferencesInt & value.id != 0) {
prefs.add(value);
}
}
if (prefs.isEmpty) {
prefs.add(RouteTypePreferences.none);
}
return prefs;
}
Additional route type preference flags.
A set of optional routing preferences that can be combined to further customize route calculation when using public transport. Only applies to RouteTransportMode.public.
Parameters
value: Set of route type preferences to apply.
Default is {RouteTypePreferences.none}.
Implementation
set routeTypePreferences(final Set<RouteTypePreferences> value) {
final int bitmask = value.fold(
0,
(final int res, final RouteTypePreferences item) => res | item.id,
);
objectMethod(
pointerId,
'RoutePrefWrapper',
'routetypepreferences',
args: bitmask,
);
}