NumberFormatter class

Control how a number (int/double) is converted to string usage: NumberFormatter()..options.format(num)

Implementers

Constructors

NumberFormatter()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
precision int
x.12345678. null do nothing x.12345000 -> x.12345 remove trailing zeros
read / write
removeLeadingZero bool
0.x -> .x. false do nothing
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
tryInt bool
try convert as if value is int. false do nothing
read / write

Methods

adjustPrecision(num value) num
Return the value adjusted by defined precision
format(num value, {bool formatted: false}) String
Returns a value as String without decimals if possible. Ex. (1, 1.2, .2)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited