Skip to content
pubscout

file_sizes

1.0.6, released 5 years ago by anmolsethi.dev

Get human-readable file sizes in Dart with support for numbers and strings.

WASM-ready
$ flutter pub add file_sizes
Source repository

What it does

Calculates and formats byte sizes into human-readable strings like KB, MB, GB, and TB. It is purely written in Dart and accepts both numbers and strings as parameters with optional precision control.

AI-written summary of version 1.0.6, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display file sizes in a readable format in your app
  • You want a pure Dart solution to convert byte counts to KB, MB, GB, or TB

Skip it when

  • You need complex file system operations or path manipulation

Strengths

  • Supports both numeric and string inputs
  • Allows customization of precision values
  • Purely written in Dart

Weaknesses

  • Very narrow scope focused solely on formatting size values

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
FileSize.getSize(1048576, PrecisionValue.THREE);

Alternatives

Packages that do the same job and could replace file_sizes.