toReadableBytes static method
Converts a numeric value to a human-readable byte format.
Example:
Readable readableBytes = Number.toReadableBytes(2048);
print(readableBytes); // Output: 2.00 KB
Implementation
static Readable toReadableBytes(
num? value, {
ByteUnits unit = ByteUnits.auto,
}) {
return unit.read(value);
}