Search packages, repositories and app categories

GitHub repositorynhandrew/environment_sensors

environment_sensors

Flutter Plugin for reading environment sensors

environment_sensors project cover
Stars
9
Forks
14
Last push (UTC)
Aug 21, 2024
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

Environment Sensors

Flutter plugin for accessing ambient temperature, relative humidity, ambient light, and barometric pressure sensors of a device.

Install

Add environment_sensors as a dependency in pubspec.yaml. For help on adding as a dependency, view the documentation.

Usage

Check for availability of sensors

final environmentSensors = EnvironmentSensors();   

    var tempAvailable = await environmentSensors.getSensorAvailable(SensorType.AmbientTemperature);
    var humidityAvailable = await environmentSensors.getSensorAvailable(SensorType.Humidity);
    var lightAvailable = await environmentSensors.getSensorAvailable(SensorType.Light);
    var pressureAvailable = await environmentSensors.getSensorAvailable(SensorType.Pressure);

Get sensor stream

final environmentSensors = EnvironmentSensors();

  environmentSensors.pressure.listen((pressure) {
    //Pressure in Millibars
    print(pressure.toString());
  });
Andy Julow GitHub avatar
GitHub author

Andy Julow ↗

North Hero, VT
LanguagesDartKotlinSwiftRubyObjective-C

Packages published by this repository

Dependencies used

Dependency list 2 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗