NumberFormatters class

Number formatting utilities

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

currency(num value, {String symbol = '\$', int decimals = 2}) → String
Formats a number as currency
fileSize(int bytes, {int decimals = 1}) → String
Formats file size in human-readable format
humanReadable(num value, {int decimals = 1}) → String
Formats a number in human-readable format (K, M, B)
percentage(double value, {int decimals = 0}) → String
Formats a number as a percentage
withLeadingZeros(int value, int width) → String
Formats a number with leading zeros
withSeparator(num value, {String separator = ','}) → String
Formats a number with thousand separators