mime_type_extension 0.0.2 mime_type_extension: ^0.0.2 copied to clipboard
Convert extension to mime type and mime type to extension and return it as String, Support 600+ types.
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