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

Implementation

TrafficUsage get useTraffic {
  final OperationResult resultString = objectMethod(
    pointerId,
    'TrafficPreferences',
    'getUseTraffic',
  );

  return TrafficUsageExtension.fromId(resultString['result']);
}
set useTraffic (TrafficUsage useTraffic)

Set the traffic usage mode.

Parameters

Implementation

set useTraffic(final TrafficUsage useTraffic) {
  objectMethod(
    pointerId,
    'TrafficPreferences',
    'setUseTraffic',
    args: useTraffic.id,
  );
}