Search packages, repositories and app categories

Package detailsv0.3.0

environment_sensors

A Flutter plugin for reading ambient temperature,relative humidity, ambient light, and barometric pressure from a device.

AndroidiOS
30-day downloads
140
Likes
27
Pub points
140

Install package

flutter pub add environment_sensors

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The environment_sensors package is a Flutter plugin that enables access to environmental data such as ambient temperature, relative humidity, ambient light levels, and barometric pressure from Android and iOS devices. It provides a simple API to read real-time sensor values, making it ideal for applications that monitor or respond to environmental conditions. The plugin leverages native device sensors and delivers consistent data across supported platforms. It is maintained by a community contributor and hosted on GitHub for transparency and collaboration.

Use cases

  • Environmental monitoring apps
  • Smart home integration
  • Weather tracking features
  • Outdoor activity tracking
  • IoT device data collection

Key features

  • Real-time sensor readings
  • Support for multiple environmental metrics
  • Cross-platform compatibility (Android & iOS)
  • Simple, intuitive API
  • Open-source and actively maintained

Suitable for

  • Developers building environmental apps
  • IoT and smart device integrations
  • Apps requiring real-time sensor data
  • Wearables and mobile health applications

Considerations

  • Sensor availability depends on device hardware
  • Data accuracy may vary between devices
  • Requires appropriate permissions on Android and iOS
  • Limited to specific sensor types
  • Not suitable for high-precision scientific measurements

Original README

Original README snapshot from the linked source repository. Visit the repository 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());
  });

Categories

Source repository

Projects using this package

No data available yet.