format library

How the widgets write sizes and times, for an app to write them the same way: formatBytes a size in decimal (4.1 kB) or binary units (ByteUnits.binary, 4.0 KiB), and formatTook the time something took (3.1 s, 01:05).

Enums

ByteUnits
How sizes in bytes are counted and named.

Functions

formatBytes(num bytes, {ByteUnits byteUnits = ByteUnits.decimal, String decimalSeparator = '.'}) → String
bytes in their unit under byteUnits (byteUnit), whole from 100 of it and to the tenth below (formatFigures). The sizes a DirectoryTree and a ProgressList write.
formatTook(Duration time, {String decimalSeparator = '.'}) → String
time as the time something took, as a ProgressList, a TaskList and ProgressTask.summary write it: to the tenth of a second, cut rather than rounded, under a minute (3.1 s), else as a clock in whole seconds (01:05, then with the hours, 1:02:03).