Skip to content
pubscout

open_meteo

3.0.0, released a year ago by neurs.space

A fully typed Dart SDK to access the Open-Meteo weather, air quality, and climate APIs.

WASM-ready
$ flutter pub add open_meteo
Source repository

What it does

Provides API clients for all Open-Meteo services including weather, historical data, air quality, marine conditions, and geocoding. It supports type-safe requests via FlatBuffers as well as raw JSON responses.

AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need weather, climate, or air quality data in a Dart or Flutter application.
  • You want type-safe API responses using FlatBuffers for performance.

Skip it when

  • You require real-time bidirectional weather streaming via WebSockets.
  • You need a backend database or device storage for weather caching.

Strengths

  • Full typed support with enums and DateTime conversions for Open-Meteo parameters.
  • Supports multiple locations and segmented responses in a single request.
  • Optimized performance using FlatBuffers under the hood.

Weaknesses

  • Geocoding and Elevation APIs are limited to JSON response methods.
  • Strictly bound to the Open-Meteo service ecosystem.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2

No special native setup or build_runner required.

import 'package:open_meteo/open_meteo.dart';

void main() async {
  final weather = WeatherApi(
    userAgent: "My-Flutter-App",
    temperatureUnit: TemperatureUnit.celsius,
  );
  final response = await weather.request(
    locations: {
      OpenMeteoLocation(
        latitude: 16.16667,
        longitude: 107.83333,
      )
    },
    hourly: {WeatherHourly.temperature_2m},
  );
  final temperatures = response.segments[0].hourlyData[WeatherHourly.temperature_2m]?.values;
  print(temperatures);
}

Alternatives

Packages that do the same job and could replace open_meteo.

  • dio

    If you prefer a general-purpose HTTP client for custom REST APIs instead of a dedicated Open-Meteo SDK.

Works with

Packages commonly used together with open_meteo: ones it builds on, ones built on it, and its own family.