Просмотр исходного кода

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

Update example , readme, version and changelog.
Caijinglong 5 лет назад
Родитель
Сommit
413f0e8172
No account linked to committer's email address
4 измененных файлов: 26 добавлений и 3 удалений
  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 Просмотреть файл

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

+ 14
- 1
README.md Просмотреть файл

@@ -34,7 +34,20 @@ import 'package:photo/photo.dart';
34 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 52
 ```dart
40 53
 void pickAsset() async {

+ 4
- 0
example/lib/main.dart Просмотреть файл

@@ -113,6 +113,10 @@ class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
113 113
   }
114 114
 
115 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 120
     List<AssetEntity> imgList = await PhotoPicker.pickAsset(
117 121
       // BuildContext required
118 122
       context: context,

+ 2
- 2
pubspec.yaml Просмотреть файл

@@ -1,11 +1,11 @@
1 1
 name: photo
2 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 4
 author: caijinglong<cjl_spy@163.com>
5 5
 homepage: https://github.com/CaiJingLong/flutter_photo
6 6
 
7 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 10
 dependencies:
11 11
   flutter: