ILibNumFmt class

Constructors

ILibNumFmt(ILibNumFmtOptions options)
options Set the Options for formatting

Properties

currency String?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
locale String?
getter/setter pair
maxFractionDigits int?
getter/setter pair
minFractionDigits int?
getter/setter pair
roundingMode String?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
significantDigits int?
getter/setter pair
style String?
getter/setter pair
type String?
getter/setter pair
useNative bool?
getter/setter pair

Methods

constrain(int number) String
Apply the constraints used in the current formatter to the given number
format(dynamic number) String
Format a number according to the settings of this number formatter instance
getCurrency() int?
Returns the ISO 4217 code for the currency that this formatter formats
If this formatter's type is not "currency", then this method will return null.
getLocale() String
Return the locale that was used to construct this number formatter object.
If the locale was not given as parameter to the constructor, this method returns the default locale of the system.
getMaxFractionDigits() int
Returns the maximum fraction digits set up in the constructor
getMinFractionDigits() int
Returns the minimum fraction digits set up in the constructor
getRoundingMode() String
Returns the rounding mode set up in the constructor.
The rounding mode controls how numbers are rounded when the integral or fraction digits of a number are limited.
getSignificantDigits() int
Returns the significant digits set up in the constructor
getStyle() String
Return the style that was used to construct this number formatter object.
Valid values are for "currency": "common" (symbol) or "iso" (ISO code).
for "number": "standard", "scientific", "native", or "nogrouping".
getType() String
Return the type of formatter. Valid values are "number", "currency", and "percentage".
getUseNative() bool
Return true if this formatter uses native digits to format the number
isGroupingUsed() bool
Returns true if this formatter groups together digits in the integral portion of a number, based on the options set up in the constructor
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJsonString() String
A string representation of parameters to call functions of iLib library properly
toString() String
A string representation of this object.
inherited

Operators

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