open_map_weather_api 1.0.0 open_map_weather_api: ^1.0.0 copied to clipboard
A open weather api plugin for fetching current weather via the OpenWeatherMap API.
open_weather_api #
A new Flutter package project for Fetching weather information.
Getting Started #
import 'package:open_weather_api/open_weather_api.dart';
Add your api key #
If you don't have one, you can get api key by creating account on openweathermap.org
OpenWeather openWeather = OpenWeather("YOUR API KEY");
Get weather by city name #
Weather weather = await _openWeather.currentWeatherByCityName(cityName: 'cityName');
Get weather by location ( longitude and latitude ) #
Weather weather = await _openWeather.currentWeatherByLocation(latitude: 'latitude', longitude: 'longitude');