light_sensor 3.0.0 copy "light_sensor: ^3.0.0" to clipboard
light_sensor: ^3.0.0 copied to clipboard

PlatformAndroid

A Flutter plugin for Android allowing access to the device light sensor.

Light sensor #

Coverage

A Flutter plugin for Android allowing access to the device light sensor.

Usage #

To use this plugin, add light_sensor as a dependency in your pubspec.yaml file.

Example #

// Import package
import 'package:light_sensor/light_sensor.dart';

// Check sensor availability
final bool hasSensor = await LightSensor.hasSensor();

// Subscribe on updates
LightSensor.luxStream().listen((lux) {...});

Origin #

Originally, this plugin was based on light.
Functionality was extracted into this plugin due to lack of maintenance by the author of the light plugin.

Today, the light_sensor plugin has been completely refreshed.

8
likes
150
points
101
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for Android allowing access to the device light sensor.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on light_sensor