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.
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.
- file_selector_macos
macOS implementation of the file_selector plugin
82Compare - syncfusion_flutter_pdf
Native Dart library for creating, reading, editing, and securing PDF files.
89Compare - flutter_downloader
Plugin to create and manage background download tasks on Android and iOS.
80Compare - path_provider_android
Android implementation of the path_provider plugin for finding commonly used locations.
79Compare