CurrencyInfo class

Currency converter

Helps converting different currencies with specified rate

Constructors

CurrencyInfo(Currency currencyA, Currency currencyB, double rateSell, double rateBuy, DateTime date, {MoneyRounding rounding = MoneyRounding.bank})
Currency converter object
CurrencyInfo.cross(Currency currencyA, Currency currencyB, double rateCross, DateTime date, {MoneyRounding rounding = MoneyRounding.bank})
Shortcut to create conversion objects with same sell rate and currency rate
factory

Properties

currencyA Currency
Currency to be sold or bought
final
currencyB Currency
Currency towards which conversion rates are specified
final
date DateTime
Currency update date
final
hashCode int
The hash code for this object.
no setterinherited
isCross bool
Checks if sell rate is the same with buy rate
no setter
rateBuy double
Rate which is being used when Currency A is being bought
final
rateSell double
Rate which is being used when Currency A is being sold
final
rounding MoneyRounding
Used rounding mode for operations.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

exchange(Money amount) Money
Buys or sells currencyA
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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