convertCurrency method

Future<double> convertCurrency({
  1. required String from,
  2. required String to,
  3. required double amount,
})

Convert currency (from, to, amount)

Implementation

Future<double> convertCurrency({
  required String from,
  required String to,
  required double amount,
}) async {
  return await CurrencyConverter().convert(
    fromCurrency: from,
    toCurrency: to,
    amount: amount,
  );
}