diff --git a/lib/services/price.dart b/lib/services/price.dart index 16bd93c6a..a57b34364 100644 --- a/lib/services/price.dart +++ b/lib/services/price.dart @@ -105,8 +105,8 @@ class PriceAPI { final coin = coinFromPrettyName(coinName); final price = Decimal.parse(map["current_price"].toString()); - final change24h = - double.parse(map["price_change_percentage_24h"].toString()); + final change24h = map["price_change_percentage_24h"] != null ? + double.parse(map["price_change_percentage_24h"].toString()) : 0.0; result[coin] = Tuple2(price, change24h); }