FLUTTER ECOSYSTEM

filesize

A package to get humanized file sizes. Translate raw file size into human readable strings.

Latest version
2.0.1
30-day downloads
31.8K
Likes
182
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

The filesize package provides a simple way to convert raw file sizes into human-readable formats, such as '1.2 MB' or '3.4 GB'. It is ideal for displaying file sizes in user interfaces across multiple platforms. The package supports various units and offers customizable options for precision and formatting. It is lightweight and easy to integrate into Flutter applications.

Use cases
  • Displaying file sizes in app UIs
  • Converting byte values to readable strings
  • Showing storage usage in dashboards
  • Formatting file size data for users
  • Enhancing user experience with clear metrics
Key features
  • Converts bytes to human-readable strings
  • Supports multiple unit formats
  • Customizable precision and suffixes
  • Lightweight and efficient
  • Cross-platform compatibility
Suitable for
  • Developers building file management apps
  • Apps requiring user-friendly size displays
  • Tools that show storage statistics
  • Educational or productivity apps
  • Projects targeting Android, iOS, Web, macOS, Windows, and Linux
Considerations
  • May require manual handling of edge cases like zero bytes
  • Limited to size formatting—no file operations
  • Does not support locale-specific formatting out of the box
  • No built-in support for binary vs decimal units (e.g., KiB vs KB)
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add filesize

Categories

Source repository

Related projects