Price class
Price of something.
- Available extensions
- Annotations
Constructors
- Price({required Sum sum, required Currency currency})
-
const
- Price.eur(double amount)
-
Constructs a Price with
EURcurrency of the providedamount. -
Price.fromJson(Map<
String, dynamic> json) -
Constructs a Price from the provided
json.factory - Price.usd(double amount)
-
Constructs a Price with
USDcurrency of the providedamount. - Price.usdt(double amount)
-
Constructs a Price with
USDTcurrency of the providedamount. - Price.xxx(double amount)
-
Constructs a Price with
XXXcurrency of the providedamount.
Properties
- currency → Currency
-
Currency of this Price.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isZero → bool
-
Indicates whether this Price is zero.
no setter
- l10n → String
-
Available on Price, provided by the PriceL10nExtention extension
Returns a localized string of this Price.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sum → Sum
-
Sum of this Price.
final
Methods
-
l10next(
{int digits = 2}) → String -
Available on Price, provided by the PriceL10nExtention extension
Returns a localized string of this Price withdigitsconfigurable. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Returns a Map representing this Price.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator *(
Price other) → Price -
Multiplies this Price to the
other. -
operator ==(
Object other) → bool -
The equality operator.
inherited