Browse Source

add params and change pubspec version

Caijinglong 5 years ago
parent
commit
2fc4d410da
5 changed files with 36 additions and 24 deletions
  1. 2
    0
      CHANGELOG.md
  2. 11
    1
      README.md
  3. 3
    3
      lib/photo.dart
  4. 19
    19
      pubspec.lock
  5. 1
    1
      pubspec.yaml

+ 2
- 0
CHANGELOG.md View File

1
 # CHANGELOG
1
 # CHANGELOG
2
 
2
 
3
+## [0.2.1] add params photoList
4
+
3
 ## [0.2.0]
5
 ## [0.2.0]
4
 
6
 
5
 **break change**
7
 **break change**

+ 11
- 1
README.md View File

37
 ## use
37
 ## use
38
 
38
 
39
 ```dart
39
 ```dart
40
-void _pickImage() async {
40
+void pickAsset() async {
41
     List<AssetEntity> imgList = await PhotoPicker.pickAsset(
41
     List<AssetEntity> imgList = await PhotoPicker.pickAsset(
42
       context: context,
42
       context: context,
43
       // BuildContext requied
43
       // BuildContext requied
73
       loadingDelegate:
73
       loadingDelegate:
74
           this, // if you want to build custom loading widget,extends LoadingDelegate [see example/lib/main.dart]
74
           this, // if you want to build custom loading widget,extends LoadingDelegate [see example/lib/main.dart]
75
 
75
 
76
+      badgeDelegate: const DefaultBadgeDelegate(), /// or custom class extends [BadgeDelegate]
77
+
76
       pickType: type, // all/image/video
78
       pickType: type, // all/image/video
79
+
80
+      List<AssetPathEntity> photoList, /// when [photoList] is not null , [pickType] invalid .
77
     );
81
     );
78
 ```
82
 ```
79
 
83
 
84
+## about photoList
85
+
86
+You can use [photo_manager] package to get `List<AssetPathEntity>` and handle or cache.
87
+
88
+This parameter is then passed into the `pickAsset` method, where the incoming photoList is rendered instead of the data in the album.
89
+
80
 ## whole example
90
 ## whole example
81
 
91
 
82
 you can see [github](https://github.com/caijinglong/flutter_photo/blob/master/example/) [main.dart](https://github.com/caijinglong/flutter_photo/blob/master/example/lib/main.dart)
92
 you can see [github](https://github.com/caijinglong/flutter_photo/blob/master/example/) [main.dart](https://github.com/caijinglong/flutter_photo/blob/master/example/lib/main.dart)

+ 3
- 3
lib/photo.dart View File

43
   ///   当用户确定时,返回一个图片[AssetEntity]列表
43
   ///   当用户确定时,返回一个图片[AssetEntity]列表
44
   ///
44
   ///
45
   ///   当用户取消时返回一个空数组
45
   ///   当用户取消时返回一个空数组
46
-  /// 
46
+  ///
47
   ///   [photoList] 一旦设置 则 [pickType]参数无效
47
   ///   [photoList] 一旦设置 则 [pickType]参数无效
48
-  /// 
48
+  ///
49
   /// 关于参数可以查看readme文档介绍
49
   /// 关于参数可以查看readme文档介绍
50
   ///
50
   ///
51
   /// if user not grand permission, then return null and show a dialog to help user open setting.
51
   /// if user not grand permission, then return null and show a dialog to help user open setting.
56
   ///   when user sure , return a [AssetEntity] of [List]
56
   ///   when user sure , return a [AssetEntity] of [List]
57
   ///
57
   ///
58
   ///   when user cancel selected,result is empty list
58
   ///   when user cancel selected,result is empty list
59
-  /// 
59
+  ///
60
   ///   when [photoList] is not null , [pickType] invalid
60
   ///   when [photoList] is not null , [pickType] invalid
61
   ///
61
   ///
62
   /// params see readme.md
62
   /// params see readme.md

+ 19
- 19
pubspec.lock View File

5
     dependency: transitive
5
     dependency: transitive
6
     description:
6
     description:
7
       name: async
7
       name: async
8
-      url: "https://pub.dartlang.org"
8
+      url: "https://pub.flutter-io.cn"
9
     source: hosted
9
     source: hosted
10
     version: "2.0.8"
10
     version: "2.0.8"
11
   boolean_selector:
11
   boolean_selector:
12
     dependency: transitive
12
     dependency: transitive
13
     description:
13
     description:
14
       name: boolean_selector
14
       name: boolean_selector
15
-      url: "https://pub.dartlang.org"
15
+      url: "https://pub.flutter-io.cn"
16
     source: hosted
16
     source: hosted
17
     version: "1.0.4"
17
     version: "1.0.4"
18
   charcode:
18
   charcode:
19
     dependency: transitive
19
     dependency: transitive
20
     description:
20
     description:
21
       name: charcode
21
       name: charcode
22
-      url: "https://pub.dartlang.org"
22
+      url: "https://pub.flutter-io.cn"
23
     source: hosted
23
     source: hosted
24
     version: "1.1.2"
24
     version: "1.1.2"
25
   collection:
25
   collection:
26
     dependency: transitive
26
     dependency: transitive
27
     description:
27
     description:
28
       name: collection
28
       name: collection
29
-      url: "https://pub.dartlang.org"
29
+      url: "https://pub.flutter-io.cn"
30
     source: hosted
30
     source: hosted
31
     version: "1.14.11"
31
     version: "1.14.11"
32
   flutter:
32
   flutter:
43
     dependency: transitive
43
     dependency: transitive
44
     description:
44
     description:
45
       name: matcher
45
       name: matcher
46
-      url: "https://pub.dartlang.org"
46
+      url: "https://pub.flutter-io.cn"
47
     source: hosted
47
     source: hosted
48
     version: "0.12.3+1"
48
     version: "0.12.3+1"
49
   meta:
49
   meta:
50
     dependency: transitive
50
     dependency: transitive
51
     description:
51
     description:
52
       name: meta
52
       name: meta
53
-      url: "https://pub.dartlang.org"
53
+      url: "https://pub.flutter-io.cn"
54
     source: hosted
54
     source: hosted
55
     version: "1.1.6"
55
     version: "1.1.6"
56
   path:
56
   path:
57
     dependency: transitive
57
     dependency: transitive
58
     description:
58
     description:
59
       name: path
59
       name: path
60
-      url: "https://pub.dartlang.org"
60
+      url: "https://pub.flutter-io.cn"
61
     source: hosted
61
     source: hosted
62
     version: "1.6.2"
62
     version: "1.6.2"
63
   pedantic:
63
   pedantic:
64
     dependency: transitive
64
     dependency: transitive
65
     description:
65
     description:
66
       name: pedantic
66
       name: pedantic
67
-      url: "https://pub.dartlang.org"
67
+      url: "https://pub.flutter-io.cn"
68
     source: hosted
68
     source: hosted
69
     version: "1.4.0"
69
     version: "1.4.0"
70
   photo_manager:
70
   photo_manager:
71
     dependency: "direct main"
71
     dependency: "direct main"
72
     description:
72
     description:
73
       name: photo_manager
73
       name: photo_manager
74
-      url: "https://pub.dartlang.org"
74
+      url: "https://pub.flutter-io.cn"
75
     source: hosted
75
     source: hosted
76
     version: "0.2.1"
76
     version: "0.2.1"
77
   quiver:
77
   quiver:
78
     dependency: transitive
78
     dependency: transitive
79
     description:
79
     description:
80
       name: quiver
80
       name: quiver
81
-      url: "https://pub.dartlang.org"
81
+      url: "https://pub.flutter-io.cn"
82
     source: hosted
82
     source: hosted
83
     version: "2.0.1"
83
     version: "2.0.1"
84
   sky_engine:
84
   sky_engine:
90
     dependency: transitive
90
     dependency: transitive
91
     description:
91
     description:
92
       name: source_span
92
       name: source_span
93
-      url: "https://pub.dartlang.org"
93
+      url: "https://pub.flutter-io.cn"
94
     source: hosted
94
     source: hosted
95
-    version: "1.5.3"
95
+    version: "1.5.4"
96
   stack_trace:
96
   stack_trace:
97
     dependency: transitive
97
     dependency: transitive
98
     description:
98
     description:
99
       name: stack_trace
99
       name: stack_trace
100
-      url: "https://pub.dartlang.org"
100
+      url: "https://pub.flutter-io.cn"
101
     source: hosted
101
     source: hosted
102
     version: "1.9.3"
102
     version: "1.9.3"
103
   stream_channel:
103
   stream_channel:
104
     dependency: transitive
104
     dependency: transitive
105
     description:
105
     description:
106
       name: stream_channel
106
       name: stream_channel
107
-      url: "https://pub.dartlang.org"
107
+      url: "https://pub.flutter-io.cn"
108
     source: hosted
108
     source: hosted
109
     version: "1.6.8"
109
     version: "1.6.8"
110
   string_scanner:
110
   string_scanner:
111
     dependency: transitive
111
     dependency: transitive
112
     description:
112
     description:
113
       name: string_scanner
113
       name: string_scanner
114
-      url: "https://pub.dartlang.org"
114
+      url: "https://pub.flutter-io.cn"
115
     source: hosted
115
     source: hosted
116
     version: "1.0.4"
116
     version: "1.0.4"
117
   term_glyph:
117
   term_glyph:
118
     dependency: transitive
118
     dependency: transitive
119
     description:
119
     description:
120
       name: term_glyph
120
       name: term_glyph
121
-      url: "https://pub.dartlang.org"
121
+      url: "https://pub.flutter-io.cn"
122
     source: hosted
122
     source: hosted
123
     version: "1.1.0"
123
     version: "1.1.0"
124
   test_api:
124
   test_api:
125
     dependency: transitive
125
     dependency: transitive
126
     description:
126
     description:
127
       name: test_api
127
       name: test_api
128
-      url: "https://pub.dartlang.org"
128
+      url: "https://pub.flutter-io.cn"
129
     source: hosted
129
     source: hosted
130
     version: "0.2.2"
130
     version: "0.2.2"
131
   typed_data:
131
   typed_data:
132
     dependency: transitive
132
     dependency: transitive
133
     description:
133
     description:
134
       name: typed_data
134
       name: typed_data
135
-      url: "https://pub.dartlang.org"
135
+      url: "https://pub.flutter-io.cn"
136
     source: hosted
136
     source: hosted
137
     version: "1.1.6"
137
     version: "1.1.6"
138
   vector_math:
138
   vector_math:
139
     dependency: transitive
139
     dependency: transitive
140
     description:
140
     description:
141
       name: vector_math
141
       name: vector_math
142
-      url: "https://pub.dartlang.org"
142
+      url: "https://pub.flutter-io.cn"
143
     source: hosted
143
     source: hosted
144
     version: "2.0.8"
144
     version: "2.0.8"
145
 sdks:
145
 sdks:

+ 1
- 1
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.2.0
3
+version: 0.2.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