useTraffic property
Current traffic usage mode.
Controls whether and how traffic data is applied to routing and navigation. Changing this value takes effect immediately for subsequent route calculations and traffic-dependent behavior.
Returns
- TrafficUsage: current traffic usage mode.
Implementation
TrafficUsage get useTraffic {
final OperationResult resultString = objectMethod(
pointerId,
'TrafficPreferences',
'getUseTraffic',
);
return TrafficUsageExtension.fromId(resultString['result']);
}
Set the traffic usage mode.
Parameters
useTraffic: the desired TrafficUsage value.
Implementation
set useTraffic(final TrafficUsage useTraffic) {
objectMethod(
pointerId,
'TrafficPreferences',
'setUseTraffic',
args: useTraffic.id,
);
}