DVMoney class

An amount in a currency's minor units.

Integer, because a price held as a double is a price that is occasionally 9.999999999999998.

Constructors

DVMoney({required int amount, required String currency})

Properties

amount → int
The amount, in currency's minor units: cents for USD, yen for JPY.
final
currency → String
An upper-case ISO 4217 code.
final
decimal → String
The amount as a decimal string at the currency's precision, without the code: 25000.00 for 2,500,000 kobo, 1500 for 1,500 yen. The form Bachs takes, and the one that never passes through a double.
no setter
exponent → int
The decimal places this currency's minor unit has.
no setter
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

inCurrency(String to) → DVMoney
This amount in to, using a rate the application configured.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override