Skip to content

Commit 9a7bf70

Browse files
committed
(#107) Update the docs for v0.6.0
1 parent e9405ac commit 9a7bf70

File tree

6 files changed

+68
-11
lines changed

6 files changed

+68
-11
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 0.6.0
2+
3+
This release contains a severe API fixes and some minor doc changes:
4+
5+
### Breaking changes
6+
7+
- Unused arguments in `DocumentFile.getContent` and `DocumentFile.getContentAsString`. [#107](https://github.com/alexrintt/shared-storage/issues/107).
8+
- Package import it's now done through a single import.
9+
110
## 0.5.0
211

312
This release contains:
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
There's major breaking changes when updating to `v0.6.0`, be careful.
2+
3+
Update your `pubspec.yaml`:
4+
5+
```yaml
6+
dependencies:
7+
shared_storage: ^0.6.0
8+
```
9+
10+
## Import statement
11+
12+
Instead of:
13+
14+
```dart
15+
import 'package:shared_storage/environment.dart' as environment;
16+
import 'package:shared_storage/media_store.dart' as environment;
17+
import 'package:shared_storage/saf.dart' as environment;
18+
```
19+
20+
Import as:
21+
22+
```dart
23+
import 'package:shared_storage/shared_storage' as shared_storage;
24+
```
25+
26+
It's now has all APIs available under `shared_storage` key.
27+
28+
## `getContent()` and `getContentAsString()`
29+
30+
Wrongly the previous versions required an unused parameter called `destination`:
31+
32+
```dart
33+
uri.getContentAsString(uri);
34+
uri.getContent(uri);
35+
```
36+
37+
It now has been removed:
38+
39+
```dart
40+
uri.getContentAsString();
41+
uri.getContent();
42+
```

docs/Usage/API Labeling.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## Warning
2+
3+
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).
4+
5+
## Labeling
6+
17
When refering to the docs you'll usually see some labels before the method/class names.
28

39
They are label which identifies where the API came from.

docs/Usage/Environment.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
## Import package
22

33
```dart
4-
import 'package:shared_storage/environment.dart' as environment;
4+
import 'package:shared_storage/shared_storage.dart' as shared_storage;
55
```
66

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

99
```dart
10-
environment.getRootDirectory(...);
11-
environment.getExternalStoragePublicDirectory(...);
10+
shared_storage.getRootDirectory(...);
11+
shared_storage.getExternalStoragePublicDirectory(...);
1212
```
1313

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

docs/Usage/Media Store.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## Import package
22

33
```dart
4-
import 'package:shared_storage/media_store.dart' as mediastore;
4+
import 'package:shared_storage/shared_storage.dart' as shared_storage;
55
```
66

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

99
```dart
10-
mediastore.getMediaStoreContentDirectory(...);
10+
shared_storage.getMediaStoreContentDirectory(...);
1111
```
1212

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

docs/Usage/Storage Access Framework.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
## Import package
22

33
```dart
4-
import 'package:shared_storage/saf.dart' as saf;
4+
import 'package:shared_storage/shared_storage.dart' as saf;
55
```
66

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

99
```dart
10-
saf.openDocumentTree(...);
11-
saf.listFiles(...);
10+
shared_storage.openDocumentTree(...);
11+
shared_storage.listFiles(...);
1212
```
1313

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

0 commit comments

Comments
 (0)