defaultHeadingStreamSource method
Create a heading stream which is used as default value of CurrentLocationLayer.headingStream.
Implementation
Stream<OrientationEvent> defaultHeadingStreamSource() {
if (RotationSensor.isPlatformSupported) {
RotationSensor.samplingPeriod = SensorInterval.uiInterval;
return RotationSensor.orientationStream;
} else {
return Stream.error(UnsupportedException('RotationSensor'));
}
}