Price class

A price with currency information. Mirrors the Swift Price struct in ZeroSettleKit.

Constructors

Price({required int amountCents, required String currencyCode})
const
Price.fromMap(Map<String, dynamic> map)
factory
Price.fromMicros(int micros, String currencyCode)
Creates a Price from a micros value (1 unit = 1/1,000,000 of the currency).
factory

Properties

amountCents int
Price in cents (e.g., 999 = $9.99). 1 unit = 1/100 of the currency.
final
currencyCode String
ISO 4217 currency code (e.g., "USD")
final
formatted String
Formatted price string (e.g., "$9.99")
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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

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