Features
- Convert mime_type to extension
- Convert extension to mime_type.
Support 600+
extensions and mime_types.
Getting started
Import mime_type_extension
package.
import 'package:mime_type_extension/mime_type_extension.dart';
Usage
Convert mime_type to extension
String mimeType = 'application/json';
final ext = MimeTypeExtension.instance.mimeTypeToExtension(mimeType);
print(ext); // ".json"
Convert extension to mime_type
String ext = '.mp4';
final mimeType = MimeTypeExtension.instance.extensionToMimeType(ext);
print(mimeType); // "video/mp4"
Additional information
If you like this this package please like and give star on Github
If you have issue with this package please create issue on Github
Contact Author
Libraries
- mime_type_ext_db
- mime_type_extension
- Dart packages that make it easy to convert MimeType to Extension and convert Extension to MimeType.