mime_type_extension 0.0.2 copy "mime_type_extension: ^0.0.2" to clipboard
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.

Pub Points Static Badge Static Badge

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

3
likes
160
points
40
downloads

Publisher

unverified uploader

Weekly Downloads

Convert extension to mime type and mime type to extension and return it as String, Support 600+ types.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on mime_type_extension