pretty_bytes 6.2.0 copy "pretty_bytes: ^6.2.0" to clipboard
pretty_bytes: ^6.2.0 copied to clipboard

Convert bytes to a human readable string.

pretty_bytes #

pub package Build Status

Dart port of pretty-bytes.

Usage #

import 'package:pretty_bytes/pretty_bytes.dart';

void main() {
  print(prettyBytes(5000));
  // 5 KB

  print(prettyBytes(5000, signed: true));
  // +5 KB

  print(prettyBytes(5000, bits: true));
  // 5 Kbit

  print(prettyBytes(1025, binary: true));
  // 1 KiB

  print(prettyBytes(0.4, locale: 'de'));
  // 0,4 B
}
3
likes
140
pub points
80%
popularity

Publisher

verified publisherflutter-cavalry.com

Convert bytes to a human readable string.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

intl

More

Packages that depend on pretty_bytes