rate static method
Return the currency conversion rate for the given from
and to
currencies
Example:
CurrencyConvertor.rate(Currency.USD, Currency.INR);
Implementation
static Future<Paisa> rate(Currency from, Currency to) async {
try {
final rate = await _getConversionRate(from.name, to.name, 1);
return Paisa(amount: 1, rate: rate, from: from, to: to);
} catch (e) {
rethrow;
}
}