NmPrice class
A money amount in minor units of an ISO 4217 currency.
- Implemented types
- Annotations
Constructors
Properties
- currency → String
-
ISO 4217 code (
RUB,USD,EUR…).final - hashCode → int
-
The hash code for this object.
no setteroverride
- major → double
-
Amount in major units.
no setter
- minor → int
-
Amount in minor units (kopecks, cents …).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
compareTo(
NmPrice other) → int -
Compares this object to another object.
override
-
format(
BuildContext context) → String - Localized string ("897 ₽", "$9.99"); whole amounts drop the decimals.
-
formatFor(
String locale) → String - Formats for a locale tag ("en", "ru"); whole amounts drop the decimals.
-
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 *(
num factor) → NmPrice -
This price times
factor, rounded to minor units. -
operator +(
NmPrice other) → NmPrice - Sum of two prices in the same currency.
-
operator ==(
Object other) → bool -
The equality operator.
override