magnetometer method
Stream<MagnetometerEvent>
magnetometer({
- Duration samplingPeriod = SensorInterval.normalInterval,
A broadcast stream of events from the device magnetometer.
Implementation
Stream<MagnetometerEvent> magnetometer({
Duration samplingPeriod = SensorInterval.normalInterval,
}) {
_magnetometerEvents ??= _magnetometerEventChannel.receiveBroadcastStream().map((dynamic event) => MagnetometerEvent.fromList(event.cast<double>()));
_setSensorUpdateInterval(SensorType.magnetometer,samplingPeriod);
return _magnetometerEvents!;
}