NumberUtil class

Constructors

NumberUtil()

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

getAmountAsRaw(String amount) String
Return readable string amount as raw string @param amount 1.01 @returns 101000000000000000000000000000
getPercentOfTotalSupply(BigInt amount) String
Return percentage of total supploy @param amount 10020243004141 @return 0.0000001%
getRawAsUsableDecimal(String raw) → Decimal
Convert raw to ban and return as BigDecimal
getRawAsUsableString(String raw) String
Return raw as a normal amount.
sanitizeNumber(String input, {int maxDecimalDigits = maxDecimalDigits}) String
Sanitize a number as something that can actually be parsed. Expects "." to be decimal separator @param amount $1,512 @returns 1.512
truncateDecimal(Decimal input, {int digits = maxDecimalDigits}) double
Truncate a Decimal to a specific amount of digits

Constants

maxDecimalDigits → const int