getRateOf method

ExchangeRate getRateOf(
  1. String name
)

use returnedValue.getRateOf(input_currency) to obtain btc's value in the input currency

Implementation

ExchangeRate getRateOf(String name) {
  if (getVsList().contains(name))
    return rates.firstWhere((element) => element.name == name);
  else
    return ExchangeRate();

  ///result.isNull = true, if input name doesn't exist in obtained rate list.
}