-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nitesh Sharma
committed
Jul 2, 2022
1 parent
8ed357b
commit cf4d1cb
Showing
5 changed files
with
43 additions
and
109 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import 'package:mime_dart/mime_dart.dart'; | ||
|
||
void main() { | ||
print(Mime.getExtensionFromType('application/pdf')); | ||
// returns `pdf` | ||
print(Mime.getExtensionsFromType('application/xml')); | ||
// returns `[xml, xsl, xsd, rng]` | ||
|
||
print(Mime.getTypeFromExtension('pdf')); | ||
// returns `application/pdf` | ||
print(Mime.getTypesFromExtension('xml')); | ||
// returns `[application/xml, text/xml]` | ||
|
||
print(Mime.getMime('application/pdf')); | ||
print(Mime.getMimeData('application/xml')); | ||
// returns MimeData( | ||
// charset: null, | ||
// source: iana, | ||
// compressible: false, | ||
// extensions: [pdf] | ||
// ) | ||
// charset: null, | ||
// source: iana, | ||
// compressible: true, | ||
// extensions: [xml, xsl, xsd, rng], | ||
// ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters