Money class
This class models a reference to a money.
- Implemented types
- Annotations
Constructors
Properties
Methods
-
compareTo(
covariant Money other) → int -
The order of the comparisons is:
override
-
convert(
{required ExchangeRate rate}) → Money -
Converts the value of this money to the currency expressed by
rate
.to
. -
copyWith(
{double? amount, Currency? currency}) → Money -
Creates a copy of this
Money
instance where the only changes are those specified in the parameters of this method. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
show(
{bool k = false, String? locale}) → String - Returns the money representation in order to show it in the UI.
-
showK(
{String? locale}) → String -
This is a shorthand for
show(k: true)
. -
toMap(
) → Map< String, dynamic> -
Creates a
Map<String, dynamic> map
representation of this instance. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator *(
covariant num number) → Money -
Defines the multiplication operator between a
num
number
and aMoney
. -
operator +(
covariant Money other) → Money - Defines the sum operator.
-
operator -(
covariant Money other) → Money - Defines the subtraction operator.
-
operator /(
covariant num number) → Money -
It defines the division operator, of a
Money
by anum
number
. -
operator <(
covariant Money other) → bool -
Returns if this instance is less than the
other
. -
operator <=(
covariant Money other) → bool -
Return if this instance is less than or equal to the
other
. -
operator ==(
covariant Money other) → bool -
The equality operator.
override
-
operator >(
covariant Money other) → bool -
Return if this instance is greater than the
other
. -
operator >=(
covariant Money other) → bool -
Return if this instance is greater than or equal to the
other
.