소스 검색

add params and change pubspec version

Caijinglong 5 년 전
부모
커밋
2fc4d410da
5개의 변경된 파일36개의 추가작업 그리고 24개의 파일을 삭제
  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 파일 보기

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

+ 11
- 1
README.md 파일 보기

@@ -37,7 +37,7 @@ import 'package:photo_manager/photo_manager.dart';
37 37
 ## use
38 38
 
39 39
 ```dart
40
-void _pickImage() async {
40
+void pickAsset() async {
41 41
     List<AssetEntity> imgList = await PhotoPicker.pickAsset(
42 42
       context: context,
43 43
       // BuildContext requied
@@ -73,10 +73,20 @@ void _pickImage() async {
73 73
       loadingDelegate:
74 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 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 90
 ## whole example
81 91
 
82 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 파일 보기

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

+ 19
- 19
pubspec.lock 파일 보기

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

+ 1
- 1
pubspec.yaml 파일 보기

@@ -1,6 +1,6 @@
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.2.0
3
+version: 0.2.1
4 4
 author: caijinglong<cjl_spy@163.com>
5 5
 homepage: https://github.com/CaiJingLong/flutter_photo
6 6