m3_lightmeter/lib/data/light_sensor_service.dart

10 lines
245 B
Dart
Raw Normal View History

import 'package:light_sensor/light_sensor.dart';
class LightSensorService {
const LightSensorService();
Future<bool> hasSensor() async => await LightSensor.hasSensor ?? false;
Stream<int> luxStream() => LightSensor.lightSensorStream;
}