mime2extension 0.0.3
mime2extension: ^0.0.3 copied to clipboard
A Flutter package for converting between MIME types and file extensions with wildcard support.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.0.2 - 2025-11-21 #
Changed #
- Updated LICENSE to BSD-3-Clause (Flutter Authors)
- Added repository and homepage URLs to pubspec.yaml
- Updated GitHub repository references
0.0.1 - 2025-11-21 #
Added #
- Initial release of mime2extension package
extension2Mime(String extension)function to convert file extensions to MIME typesmime2Extension(List<String> mimeTypes)function to convert MIME types to file extensions- Wildcard support for MIME type queries (e.g.,
application/*returns all application extensions) - Comprehensive MIME type database with 6000+ entries from IANA, Apache, and nginx sources
- Support for all major file categories:
- Application types (836 extensions)
- Image types (png, jpg, gif, svg, etc.)
- Audio types (mp3, wav, ogg, etc.)
- Video types (mp4, avi, mkv, etc.)
- Text types (txt, html, css, etc.)
- Font types (ttf, otf, woff, etc.)
- Automatic duplicate removal in results
- Null-safe API with proper error handling
- Comprehensive unit test suite (14 tests)
- Example file demonstrating all features
- Full documentation with usage examples
Features #
- Zero external dependencies (Flutter SDK only)
- Type-safe implementation
- Efficient lookup using Map data structures
- Support for multiple MIME types in a single query
- Combines exact matches and wildcard patterns