data_size 0.1.0

Dart native js
Flutter Android iOS web

🔟 Customizable data size (bit&& byte) formatting for interfacing with the user

🔟 Customizable data size (bit & byte) formatting for interfacing with the user

Build, Test & Lint Coverage

Features #

  • format DataUnit.bit and DataUnit.byte
  • select a prefix:
    • Prefix.decimal (kB, MB, … with multiples of 1000)
    • Prefix.binary (KiB, MiB, … with multiples of 1024)
  • select a precision (number of decimal places)

Examples #

final defaultString = 12345.formatByteSize();                     // "12.35 kB"
final noDecimalPlaces = 12345.formatByteSize(precision: 0);       // "12 kB"
final binaryPrefix = 12345.formatByteSize(prefix: Prefix.binary); // "12.06 KiB"
final bits = 12345.formatBitSize();                               // "12.35 kb"
3
likes
95
pub points
0%
popularity

Publisher

wanke.dev

🔟 Customizable data size (bit&& byte) formatting for interfacing with the user

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

basics, meta, pedantic

More

Packages that depend on data_size