unitSystem property
Returns the SDK-wide unit system.
The unit system controls how distances and measurements are formatted in textual and spoken instructions (for example, kilometres vs miles).
Returns
- UnitSystem: the current unit system used by the SDK.
Implementation
static UnitSystem get unitSystem {
final OperationResult resultString = staticMethod(
'SdkSettings',
'getUnitSystem',
);
return UnitSystemExtension.fromId(resultString['result']);
}
Sets the SDK-wide unit system.
This affects route text, navigation instructions and voice output.
Parameters
unitSystem: the UnitSystem to apply.
Implementation
static set unitSystem(UnitSystem unitSystem) {
staticMethod('SdkSettings', 'setUnitSystem', args: unitSystem.id);
}