diff --git a/CHANGELOG.md b/CHANGELOG.md index d1f31f4..7782eb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ CHANGELOG ## Upcoming version ## +## 1.2.2 (2022-12-13) ## + +* 🐞 Integer coordinates were not parsed correctly ([#47](https://github.com/tankste/app/issues/44)) + + ## 1.2.1 (2022-11-21) ## * 🐞 Integer prices were not parsed correctly ([#44](https://github.com/tankste/app/issues/44)) diff --git a/station/lib/station_model.dart b/station/lib/station_model.dart index 2b9d87f..385fc44 100644 --- a/station/lib/station_model.dart +++ b/station/lib/station_model.dart @@ -26,16 +26,25 @@ class StationModel { parsedJson['place']?.trim() ?? "", ), StationPricesModel( - (priceType == "e5" ? _parseDouble(parsedJson['price']) : _parseDouble(parsedJson['e5'])) ?? 0.0, + (priceType == "e5" + ? _parseDouble(parsedJson['price']) + : _parseDouble(parsedJson['e5'])) ?? + 0.0, StationPriceRange.unknown, - (priceType == "e10" ? _parseDouble(parsedJson['price']) : _parseDouble(parsedJson['e10'])) ?? 0.0, + (priceType == "e10" + ? _parseDouble(parsedJson['price']) + : _parseDouble(parsedJson['e10'])) ?? + 0.0, StationPriceRange.unknown, - (priceType == "diesel" ? _parseDouble(parsedJson['price']) : _parseDouble(parsedJson['diesel'])) ?? 0.0, + (priceType == "diesel" + ? _parseDouble(parsedJson['price']) + : _parseDouble(parsedJson['diesel'])) ?? + 0.0, StationPriceRange.unknown, ), CoordinateModel( - parsedJson['lat'] ?? "", - parsedJson['lng'] ?? "", + _parseDouble(parsedJson['lat']) ?? 0.0, + _parseDouble(parsedJson['lng']) ?? 0.0, ), _parseOpenTimes(parsedJson), parsedJson['isOpen'] ?? false,