updateCryptocurrencies static method

Future<void> updateCryptocurrencies(
  1. List<Cryptocurrency> cryptoList
)

Implementation

static Future<void> updateCryptocurrencies(
    List<Cryptocurrency> cryptoList) async {
  if (cryptocurrencyBox.isNotEmpty) {
    await cryptocurrencyBox.clear();
  }
  cryptocurrencyBox.addAll(cryptoList);
}