Number class

A utility class for converting numeric values to human-readable formats.

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

format(num number, [String? locale]) → String
Formats a number based on the given locale.
locale(String text) → String?
parse(String formattedNumber, [String? locale]) → num
Parses a formatted number string back to a decimal number.
toReadableBytes(num? value, {ByteUnits unit = ByteUnits.auto}) → Readable
Converts a numeric value to a human-readable byte format.
toReadableNumber(num? value, {NumberUnits unit = NumberUnits.auto}) → Readable
Converts a numeric value to a human-readable number format.
toRealBytes(num? value, ByteUnits unit) → double
toRealNumber(num? value, NumberUnits unit) → double