weather 0.0.2 copy "weather: ^0.0.2" to clipboard
weather: ^0.0.2 copied to clipboard

outdated

A weather plugin using the OpenWeatherMap API.

weather #

pub package

Install #

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

Usage #

First and foremost you need an API key from OpenWeatherMap, which can be acquired for free here.

Query current weather #

For api doucmentation on the current weather API, see the documentation.

String key = 'YOUR_API KEY';
Weather w = new Weather(key);
String res = await w.getFiveDayForecast();
setState(() {
  _res = res;
});

Query 5 day forecast #

For api doucmentation on the forecast API, see the documentation.

String key = 'YOUR_API KEY';
Weather w = new Weather(key);
String res = await w.getCurrentWeather();
setState(() {
  _res = res;
});
199
likes
0
pub points
96%
popularity

Publisher

verified publishercachet.dk

A weather plugin using the OpenWeatherMap API.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, http, location

More

Packages that depend on weather