useTraffic property
TrafficUsage
get
useTraffic
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
useTraffic
(TrafficUsage useTraffic)
Implementation
set useTraffic(final TrafficUsage useTraffic) {
objectMethod(
pointerId,
'TrafficPreferences',
'setUseTraffic',
args: useTraffic.id,
);
}