import 'package:openweathermap/openweathermap.dart';
void main() async{
var openWeather = OpenWeather(apiKey);
var result = await openWeather.currentWeatherByName('Bergamo');
print('Name: ${result.name}\nTemp: ${result.temperature.temp}');
}
Add openweathermap on pubspec.yaml
:
dependencies:
openweathermap: ^version