getMarketCapIn method

double getMarketCapIn(
  1. String vsCurrency
)

Implementation

double getMarketCapIn(String vsCurrency) {
  if (dataAvailableIn().contains(vsCurrency)) {
    return data["${vsCurrency}_market_cap"] ?? -2;

    ///return market cap if available otherwise -2
  } else {
    ///data not available for requested currency in this instance
    return -1;
  }
}