Skip to content

Commit

Permalink
(#107) Update the docs for v0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrintt committed Nov 7, 2022
1 parent e9405ac commit 9a7bf70
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 11 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 0.6.0

This release contains a severe API fixes and some minor doc changes:

### Breaking changes

- Unused arguments in `DocumentFile.getContent` and `DocumentFile.getContentAsString`. [#107](https://github.com/alexrintt/shared-storage/issues/107).
- Package import it's now done through a single import.

## 0.5.0

This release contains:
Expand Down
42 changes: 42 additions & 0 deletions docs/Migrate notes/Migrate to v0.6.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
There's major breaking changes when updating to `v0.6.0`, be careful.

Update your `pubspec.yaml`:

```yaml
dependencies:
shared_storage: ^0.6.0
```
## Import statement
Instead of:
```dart
import 'package:shared_storage/environment.dart' as environment;
import 'package:shared_storage/media_store.dart' as environment;
import 'package:shared_storage/saf.dart' as environment;
```

Import as:

```dart
import 'package:shared_storage/shared_storage' as shared_storage;
```

It's now has all APIs available under `shared_storage` key.

## `getContent()` and `getContentAsString()`

Wrongly the previous versions required an unused parameter called `destination`:

```dart
uri.getContentAsString(uri);
uri.getContent(uri);
```

It now has been removed:

```dart
uri.getContentAsString();
uri.getContent();
```
6 changes: 6 additions & 0 deletions docs/Usage/API Labeling.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Warning

This labeling will be removed soon, I it will be replaced with a full original API as described in [#56](https://github.com/alexrintt/shared-storage/issues/56).

## Labeling

When refering to the docs you'll usually see some labels before the method/class names.

They are label which identifies where the API came from.
Expand Down
8 changes: 4 additions & 4 deletions docs/Usage/Environment.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## Import package

```dart
import 'package:shared_storage/environment.dart' as environment;
import 'package:shared_storage/shared_storage.dart' as shared_storage;
```

> **Note** Be aware that if you import the package `import '...' as environment;` (strongly recommended) you should prefix all method calls with `environment`, example:
Usage sample:

```dart
environment.getRootDirectory(...);
environment.getExternalStoragePublicDirectory(...);
shared_storage.getRootDirectory(...);
shared_storage.getExternalStoragePublicDirectory(...);
```

But if you import without alias `import '...';` (Not recommeded because can conflict with other method/package names) you should use directly as functions:
Expand Down
6 changes: 3 additions & 3 deletions docs/Usage/Media Store.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## Import package

```dart
import 'package:shared_storage/media_store.dart' as mediastore;
import 'package:shared_storage/shared_storage.dart' as shared_storage;
```

> **Note** Be aware that if you import the package `import '...' as mediastore;` (strongly recommended) you should prefix all method calls with `mediastore`, example:
Usage sample:

```dart
mediastore.getMediaStoreContentDirectory(...);
shared_storage.getMediaStoreContentDirectory(...);
```

But if you import without alias `import '...';` (Not recommeded because can conflict with other method/package names) you should use directly as functions:
Expand Down
8 changes: 4 additions & 4 deletions docs/Usage/Storage Access Framework.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## Import package

```dart
import 'package:shared_storage/saf.dart' as saf;
import 'package:shared_storage/shared_storage.dart' as saf;
```

> **Note** Be aware that if you import the package `import '...' as saf;` (strongly recommended) you should prefix all method calls with `saf`, example:
Usage sample:

```dart
saf.openDocumentTree(...);
saf.listFiles(...);
shared_storage.openDocumentTree(...);
shared_storage.listFiles(...);
```

But if you import without alias `import '...';` (Not recommeded because can conflict with other method/package names) you should use directly as functions:
Expand Down

0 comments on commit 9a7bf70

Please sign in to comment.