mime_dart 3.0.0 copy "mime_dart: ^3.0.0" to clipboard
mime_dart: ^3.0.0 copied to clipboard

Get Mime Types, Extensions, Compressible for Dart and Flutter. Inspired from IANA Databse

Mime Types for Dart and Flutter

Features #

  • Get Mime Types from Extension
  • Get Extensions Name from Mime Type

Usage #

import 'package:mime_dart/mime_dart.dart';

void main(List<String> args) {
  print(Mime.getExtensionsFromType('application/xml'));
  // returns `[xml, xsl, xsd, rng]`

  print(Mime.getTypesFromExtension('xml'));
  // returns `[application/xml, text/xml]`

  print(Mime.getMimeData('application/xml'));
  // returns MimeData(
  //   charset: null,
  //   source: iana,
  //   compressible: true,
  //   extensions: [xml, xsl, xsd, rng],
  // );
}
6
likes
140
points
1.39k
downloads

Publisher

unverified uploader

Weekly Downloads

Get Mime Types, Extensions, Compressible for Dart and Flutter. Inspired from IANA Databse

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

freezed_annotation, json_serializable

More

Packages that depend on mime_dart