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 -
bytesin their unit underbyteUnits(byteUnit), whole from 100 of it and to the tenth below (formatFigures). The sizes aDirectoryTreeand aProgressListwrite. -
formatTook(
Duration time, {String decimalSeparator = '.'}) → String -
timeas the time something took, as aProgressList, aTaskListandProgressTask.summarywrite 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).