m3_lightmeter/lib/data/light_sensor_service.dart

10 lines
245 B
Dart
Raw Permalink Normal View History

2023-01-26 20:03:03 +00:00
import 'package:light_sensor/light_sensor.dart';
class LightSensorService {
const LightSensorService();
Future<bool> hasSensor() async => await LightSensor.hasSensor ?? false;
Stream<int> luxStream() => LightSensor.lightSensorStream;
}