air_quality 4.1.1 copy "air_quality: ^4.1.1" to clipboard
air_quality: ^4.1.1 copied to clipboard

Air quality index from the World's Air Quality Index (WAQI) service.

Air Quality Index #

Collects air quality index from the World's Air Quality Index service.

Permissions #

No permissions needed.

Usage #

Imports #

The location package is also needed for the AirQuality package.

import 'package:air_quality/air_quality.dart';
copied to clipboard

Initialization #

An API key is needed in order to perform queries. An API key is obtained here: https://aqicn.org/api/

Example:

String key = 'XXX38456b2b85c92647d8b65090e29f957638c77';
AirQuality airQuality = new AirQuality(key);
copied to clipboard

Air Quality Feed Examples #

/// Via city name (Munich)
AirQualityData feedFromCity = 
    await airQuality.feedFromCity('munich');

/// Via station ID (Gothenburg weather station)
AirQualityData feedFromStationId = 
    await airQuality.feedFromStationId('7867');

/// Via Geo Location (Berlin)
AirQualityData feedFromGeoLocation = 
    await airQuality.feedFromGeoLocation('52.6794', '12.5346');

/// Via IP (depends on service provider)
AirQualityData fromIP = 
    await airQuality.feedFromIP();
copied to clipboard
11
likes
150
points
872
downloads

Publisher

verified publishercachet.dk

Weekly Downloads

2024.09.28 - 2025.04.12

Air quality index from the World's Air Quality Index (WAQI) service.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, http

More

Packages that depend on air_quality