samplingPeriod property
Duration
get
samplingPeriod
The samplingPeriod for the device's rotation sensor. The events may arrive at a rate faster or slower than the samplingPeriod, which is only a hint to the system. The actual rate depends on the system's event queue and sensor hardware capabilities.
Defaults to SensorInterval.normalInterval. It can be set to other predefined SensorInterval values or any Duration as needed to suit different use cases such as gaming or UI responsiveness. When changing this value, all existing listeners will be affected.
Implementation
static Duration get samplingPeriod =>
RotationSensorPlatform.instance.samplingPeriod;
set
samplingPeriod
(Duration value)
Implementation
static set samplingPeriod(Duration value) =>
RotationSensorPlatform.instance.samplingPeriod = value;