Price class
Constructors
- Price.fromContractor(Currency baseCurrency, Currency quoteCurrency, BigInt denominator, BigInt numerator)
-
factory
Properties
- baseCurrency ↔ Currency
-
getter/setter pair
- denominator ↔ BigInt
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- numerator ↔ BigInt
-
getter/setter pairinherited
- quoteCurrency ↔ Currency
-
getter/setter pair
- raw → Fraction
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scalar ↔ Fraction
-
getter/setter pair
Methods
-
add(
Fraction otherParsed) → Fraction -
inherited
-
asFraction(
) → Fraction -
Helper method for converting any super class back to a fraction
inherited
-
divide(
Fraction otherParsed) → Fraction -
inherited
-
equalTo(
Fraction otherParsed) → bool -
inherited
-
greaterThan(
Fraction otherParsed) → bool -
inherited
-
invert(
) → Price -
Flip the price, switching the base and quote currency
override
-
lessThan(
Fraction otherParsed) → bool -
inherited
-
multiply(
Fraction otherParsed) → Fraction -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
quote(
CurrencyAmount currencyAmount) → CurrencyAmount - Return the amount of quote currency corresponding to a given amount of the base currency @param currencyAmount the amount of base currency to quote against the price
-
quotient(
) → BigInt -
inherited
-
remainder(
) → Fraction -
inherited
-
subtract(
Fraction otherParsed) → Fraction -
inherited
-
toFixed(
{int decimalPlaces = 6, NumberFormat? format, RoundingMode? rounding}) → String -
toFixedNative(
int decimalPlaces, {NumberFormat? format, RoundingMode? rounding}) → String -
inherited
-
toSignificant(
{int significantDigits = 6, NumberFormat? format, RoundingMode? rounding}) → String -
toSignificantNative(
int significantDigits, {NumberFormat? format, RoundingMode? rounding}) → String -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
tryParseFraction(
BigInt fractionish) → Fraction -
inherited
Operators
-
operator *(
covariant Price other) → Price - Multiply the price by another price, returning a new price. The other price must have the same base currency as this price's quote currency
-
operator ==(
Object other) → bool -
The equality operator.
override