Skip to content
pubscout

weather

3.2.1, released 2 years ago by cachet.dk

Fetch current weather and 5-day forecasts via the OpenWeatherMap API.

WASM-readyQuiet but busy
$ flutter pub add weather
Source repository

What it does

A weather plugin that uses the OpenWeatherMap API to retrieve current weather status and 5-day weather forecasts. Weather data can be fetched by providing a city name or latitude and longitude.

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

Use it when

  • You need to display current weather conditions or forecasts using OpenWeatherMap.
  • You want to query weather data via city names or coordinates.

Skip it when

  • You require an offline weather database or caching layer.
  • You need to use a weather provider other than OpenWeatherMap.

Strengths

  • Supports multiple languages for weather reports.
  • Handles both current weather and 5-day forecasts.
  • Allows temperature conversion between Celsius, Fahrenheit, and Kelvin.

Weaknesses

  • Requires an external API key from OpenWeatherMap.
  • No built-in geolocation fetching (requires a separate package like geolocator).

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

Requires an API key from OpenWeatherMap. For device geolocation, the geolocator plugin is recommended.

WeatherFactory wf = WeatherFactory("YOUR_API_KEY");
Weather w = await wf.currentWeatherByCityName("Kongens Lyngby");

Alternatives

Packages that do the same job and could replace weather.

  • dio

    If you need advanced HTTP features like interceptors or global configuration for making API requests.