lightSensorStream property
The stream of light events. Throws a LightException if device isn't on Android.
Implementation
Stream<int> get lightSensorStream {
if (!Platform.isAndroid)
throw LightException('Light sensor API only available on Android.');
return _lightSensorStream ??=
_eventChannel.receiveBroadcastStream().map((lux) => lux);
}