cph-cachet / flutter-plugins

A collection of Flutter plugins developed by CACHET
545 stars 656 forks source link

[weather 1.2.4] #287

Closed Medformatik closed 3 years ago

Medformatik commented 3 years ago

Device / Emulator and OS

Describe the bug

The windGust double of a weather is 0.0 (zero).

To Reproduce

WeatherFactory weatherFactory = new WeatherFactory("OpenWeatherMap API key");
Weather weatherReport = await weatherFactory.currentWeatherByLocation(latitude, longitude);

Expected behavior

I expect the windGust double to be greater than the windSpeed double.

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 10.0.19042.789], locale de-DE)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[!] Android Studio (version 4.1.0)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[√] Connected device (1 available)

Additional information

Is this a bug in the Flutter plugin or is the problem that there is no data for gusts at my location (North Rhine-Westphalia, Germany)?

thomasnilsson commented 3 years ago

It is likely just missing data, we should probably return something else than 0.0 - perhaps -1 to indicate that the data is missing.

You can always try making the request manually on the openweathermap website and see what result you end up with.

thomasnilsson commented 3 years ago

Fixed in v 1.3.0