MoneyData class

DTO for exchange of data between an instance of Money and PatternEncoder or PatternDecoder.

Annotations
  • @sealed
  • @immutable

Constructors

MoneyData.from(Fixed amount, Currency currency)
Creates a MoneyData
const

Properties

amount Fixed
Amount of money in the smallest units (e.g. cent for USD).
final
currency Currency
The currency
final
decimalPart BigInt
no setter
hashCode int
The hash code for this object.
no setterinherited
integerPart BigInt
returns the major currency value of this MoneyData (e.g. the dollar amount)
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getMinorUnits() BigInt
returns the minor currency value of this MoneyData (e.g. the cents amount)
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