DVStoreMoney class
Store amounts in integer minor units, exactly.
The App Store reports prices in milliunits and Play in micros. Both are integers, and the conversion stays in integers: a price that passed through a double is occasionally 9.999999999999998, and one that needed rounding was misread, so it is refused rather than rounded.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromMicros(
String micros, String currency) → DVMoney -
A Play
priceAmountMicros: millionths of the major unit, as the decimal string Play sends. A string, because the JSON number a parser would make of it is a double past 2^53. -
fromMilliunits(
int milliunits, String currency) → DVMoney -
An App Store
price: thousandths of the currency's major unit.