proper_filesize
Standalone file size conversion and formatting library. Generate human-readable output for UIs. Supports metric/binary units (KB, KiB, MB, MiB, etc.)
1.0.2
3.0K downloads/mo
#4647 most downloaded on pub.dev
gilnobrega/proper_filesize
What this package is like to depend on
Last release 2 years ago
no release in 18 months
Too new to tell
only 2 release windows
Nearly every release is documented
notes for 5 of 5 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
5 releases · first in 2021
0 releases in the last 12 months
see the full history below
Release timeline
5 releases · Jul 2021 to Jan 2025
2022
2023
2024
2025
2026
Releases
latest 5-
1.0.213 Jan 2025Release notes
Open source →- Pluralization: Fixed pluralization for long-format units (e.g., "2 megabytes" instead of "2 megabyte").
- Typo: Corrected
Unit.zetabytetoUnit.zettabyte. - README: Minor clarifications to usage instructions and examples.
-
1.0.113 Jan 2025 -
1.0.012 Jan 2025Release notes
Open source →Features
- API Refactor: Refactored the API for improved usability and clarity.
- New Constructors: Introduced new constructors for creating
FileSizeobjects from bytes and specific units. - Unit Enum: Added
Unitenum for representing file size units (KB, KiB, MB, MiB, etc.). - BaseType Enum: Added
BaseTypeenum to distinguish between metric and binary bases. - FormatType Enum: Added
FormatTypeenum for specifying short or long format types. - Size conversion: Added a new method
toSizeto convert a size to another unit.
Updates
- Examples: Updated examples to reflect the new API and features.
- README: Updated README with detailed usage instructions, examples, and badges.
- License: Updated copyright year in the license file.
- Test Suite: Added comprehensive unit tests for increased code reliability.
- Documentation: Generated API documentation for better developer experience.
- Linting: Added linter rules for improved code quality.
- pubspec.yaml: Updated package description.
Breaking Changes
- The
ProperFilesizeclass has been replaced by theFileSizeclass. - The
generateHumanReadableFilesizeandparseHumanReadableFilesizemethods have been replaced by theFileSizeconstructors andtoStringmethod.
-
0.0.226 Jul 2021 -
0.0.126 Jul 2021