Forex class

A Calculator.

Constructors

Forex({String defaultSourceCurrency = 'USD', String defaultDestinationCurrency = 'BRL', int defaultNumberOfDecimals = 2})

Properties

defaultDestinationCurrency String
final
defaultNumberOfDecimals int
final
defaultSourceCurrency String
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getAllCurrenciesPrices({int? numberOfDecimals}) Future<Map<String, double>>
returns a Map containing prices of all currencies with their currency_code as key.
getAvailableCurrencies() Future<List<String>>
returns a list of all supported currencies.
getCurrencyConverted({String? sourceCurrency, String? destinationCurrency, double sourceAmount = 1, int? numberOfDecimals}) Future<double>
converts amount from one currency into another using current forex prices.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updatePrices() Future<String?>
resets currencies list.

Operators

operator ==(Object other) bool
The equality operator.
inherited