Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
niteshsh4rma committed Jul 2, 2022
1 parent 2db72b2 commit 0905cf8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.1

* Updated README.md example

## 2.0.0

* Updated methods to maintain consistencty from Database
Expand Down
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@ Mime Types for Dart and Flutter

## Features

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

## Usage

```dart
import 'package:mime_dart/mime_dart.dart';
void main(List<String> args) {
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'));
// returns MimeData(charset: null, source: iana, compressible: false, extensions: [pdf])
print(Mime.getMimeData('application/xml'));
// returns MimeData(
// charset: null,
// source: iana,
// compressible: true,
// extensions: [xml, xsl, xsd, rng],
// );
}
```
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: mime_dart
description: Mime Types for Dart and Flutter.
version: 2.0.0
description: Get Mime Types, Extensions, Compressible for Dart and Flutter. Inspired from IANA Databse
version: 2.0.1
homepage: https://github.com/niteshsh4rma/mime_dart

environment:
Expand Down

0 comments on commit 0905cf8

Please sign in to comment.