Browse Source

Merge pull request #90 from CaiJingLong/fix-refresh-for-asset-list

Update example , readme, version and changelog.
Caijinglong 5 years ago
parent
commit
413f0e8172
No account linked to committer's email address
4 changed files with 26 additions and 3 deletions
  1. 6
    0
      CHANGELOG.md
  2. 14
    1
      README.md
  3. 4
    0
      example/lib/main.dart
  4. 2
    2
      pubspec.yaml

+ 6
- 0
CHANGELOG.md View File

1
 # CHANGELOG
1
 # CHANGELOG
2
 
2
 
3
+## 0.4.5+1
4
+
5
+Fix:
6
+
7
+- `photoPathList` of `PhotoPicker.pickAsset`.
8
+
3
 ## 0.4.5
9
 ## 0.4.5
4
 
10
 
5
 Rollback `photo_manager` to `0.4.5`.
11
 Rollback `photo_manager` to `0.4.5`.

+ 14
- 1
README.md View File

34
 import 'package:photo_manager/photo_manager.dart';
34
 import 'package:photo_manager/photo_manager.dart';
35
 ```
35
 ```
36
 
36
 
37
-## use
37
+## Usage
38
+
39
+### Simple use
40
+
41
+```dart
42
+void pickAssets() async {
43
+    List<AssetEntity> assetList = await PhotoPicker.pickAsset(context: context);
44
+    /// Use assetList to do something.
45
+}
46
+```
47
+
48
+### More option
49
+
50
+The context is required, other params is optional.
38
 
51
 
39
 ```dart
52
 ```dart
40
 void pickAsset() async {
53
 void pickAsset() async {

+ 4
- 0
example/lib/main.dart View File

113
   }
113
   }
114
 
114
 
115
   void _pickAsset(PickType type, {List<AssetPathEntity> pathList}) async {
115
   void _pickAsset(PickType type, {List<AssetPathEntity> pathList}) async {
116
+    /// context is required, other params is optional.
117
+    /// context is required, other params is optional.
118
+    /// context is required, other params is optional.
119
+
116
     List<AssetEntity> imgList = await PhotoPicker.pickAsset(
120
     List<AssetEntity> imgList = await PhotoPicker.pickAsset(
117
       // BuildContext required
121
       // BuildContext required
118
       context: context,
122
       context: context,

+ 2
- 2
pubspec.yaml View File

1
 name: photo
1
 name: photo
2
 description: image picker, multi picker support video/icloud asset, use flutter as ui, if you want to build custom ui, you just use photo_manager.
2
 description: image picker, multi picker support video/icloud asset, use flutter as ui, if you want to build custom ui, you just use photo_manager.
3
-version: 0.4.5
3
+version: 0.4.5+1
4
 author: caijinglong<cjl_spy@163.com>
4
 author: caijinglong<cjl_spy@163.com>
5
 homepage: https://github.com/CaiJingLong/flutter_photo
5
 homepage: https://github.com/CaiJingLong/flutter_photo
6
 
6
 
7
 environment:
7
 environment:
8
-  sdk: '>=2.0.0-dev.68.0 <3.0.0'
8
+  sdk: ">=2.0.0-dev.68.0 <3.0.0"
9
 
9
 
10
 dependencies:
10
 dependencies:
11
   flutter:
11
   flutter: