浏览代码

Merge pull request #29 from CaiJingLong/add-pathlist

close #27
C 5 年前
父节点
当前提交
19cf0b912d
没有帐户链接到提交者的电子邮件

+ 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> photoPathList, /// when [photoPathList] is not null , [pickType] invalid .
77 81
     );
78 82
 ```
79 83
 
84
+### about photoPathList params
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)

+ 82
- 57
example/lib/main.dart 查看文件

@@ -30,7 +30,84 @@ class MyHomePage extends StatefulWidget {
30 30
 class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
31 31
   String currentSelected = "";
32 32
 
33
-  void _pickAsset(PickType type) async {
33
+  @override
34
+  Widget buildBigImageLoading(
35
+      BuildContext context, AssetEntity entity, Color themeColor) {
36
+    return Center(
37
+      child: Container(
38
+        width: 50.0,
39
+        height: 50.0,
40
+        child: CupertinoActivityIndicator(
41
+          radius: 25.0,
42
+        ),
43
+      ),
44
+    );
45
+  }
46
+
47
+  @override
48
+  Widget buildPreviewLoading(
49
+      BuildContext context, AssetEntity entity, Color themeColor) {
50
+    return Center(
51
+      child: Container(
52
+        width: 50.0,
53
+        height: 50.0,
54
+        child: CupertinoActivityIndicator(
55
+          radius: 25.0,
56
+        ),
57
+      ),
58
+    );
59
+  }
60
+
61
+  @override
62
+  Widget build(BuildContext context) {
63
+    return new Scaffold(
64
+      appBar: new AppBar(
65
+        title: new Text(widget.title),
66
+        actions: <Widget>[
67
+          FlatButton(
68
+            child: Icon(Icons.image),
69
+            onPressed: _testPhotoListParams,
70
+          ),
71
+        ],
72
+      ),
73
+      body: Container(
74
+        child: SingleChildScrollView(
75
+          child: Column(
76
+            children: <Widget>[
77
+              IconTextButton(
78
+                  icon: Icons.photo,
79
+                  text: "photo",
80
+                  onTap: () => _pickAsset(PickType.onlyImage)),
81
+              IconTextButton(
82
+                  icon: Icons.videocam,
83
+                  text: "video",
84
+                  onTap: () => _pickAsset(PickType.onlyVideo)),
85
+              IconTextButton(
86
+                  icon: Icons.album,
87
+                  text: "all",
88
+                  onTap: () => _pickAsset(PickType.all)),
89
+              Text(
90
+                '$currentSelected',
91
+                textAlign: TextAlign.center,
92
+              ),
93
+            ],
94
+          ),
95
+        ),
96
+      ),
97
+      floatingActionButton: new FloatingActionButton(
98
+        onPressed: () => _pickAsset(PickType.all),
99
+        tooltip: 'pickImage',
100
+        child: new Icon(Icons.add),
101
+      ),
102
+    );
103
+  }
104
+
105
+  void _testPhotoListParams() async {
106
+    var assetPathList = await PhotoManager.getImageAsset();
107
+    _pickAsset(PickType.all, pathList: assetPathList);
108
+  }
109
+
110
+  void _pickAsset(PickType type, {List<AssetPathEntity> pathList}) async {
34 111
     List<AssetEntity> imgList = await PhotoPicker.pickAsset(
35 112
       // BuildContext required
36 113
       context: context,
@@ -72,6 +149,8 @@ class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
72 149
       // badgeDelegate to show badge widget
73 150
 
74 151
       pickType: type,
152
+
153
+      photoPathList: pathList,
75 154
     );
76 155
 
77 156
     if (imgList == null) {
@@ -86,61 +165,6 @@ class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
86 165
     }
87 166
     setState(() {});
88 167
   }
89
-
90
-  @override
91
-  Widget buildBigImageLoading(BuildContext context, AssetEntity entity, Color themeColor) {
92
-    return Center(
93
-      child: Container(
94
-        width: 50.0,
95
-        height: 50.0,
96
-        child: CupertinoActivityIndicator(
97
-          radius: 25.0,
98
-        ),
99
-      ),
100
-    );
101
-  }
102
-
103
-  @override
104
-  Widget buildPreviewLoading(BuildContext context, AssetEntity entity, Color themeColor) {
105
-    return Center(
106
-      child: Container(
107
-        width: 50.0,
108
-        height: 50.0,
109
-        child: CupertinoActivityIndicator(
110
-          radius: 25.0,
111
-        ),
112
-      ),
113
-    );
114
-  }
115
-
116
-  @override
117
-  Widget build(BuildContext context) {
118
-    return new Scaffold(
119
-      appBar: new AppBar(
120
-        title: new Text(widget.title),
121
-      ),
122
-      body: Container(
123
-        child: SingleChildScrollView(
124
-          child: Column(
125
-            children: <Widget>[
126
-              IconTextButton(icon: Icons.photo, text: "photo", onTap: () => _pickAsset(PickType.onlyImage)),
127
-              IconTextButton(icon: Icons.videocam, text: "video", onTap: () => _pickAsset(PickType.onlyVideo)),
128
-              IconTextButton(icon: Icons.album, text: "all", onTap: () => _pickAsset(PickType.all)),
129
-              Text(
130
-                '$currentSelected',
131
-                textAlign: TextAlign.center,
132
-              ),
133
-            ],
134
-          ),
135
-        ),
136
-      ),
137
-      floatingActionButton: new FloatingActionButton(
138
-        onPressed: () => _pickAsset(PickType.all),
139
-        tooltip: 'pickImage',
140
-        child: new Icon(Icons.add),
141
-      ),
142
-    );
143
-  }
144 168
 }
145 169
 
146 170
 class IconTextButton extends StatelessWidget {
@@ -148,7 +172,8 @@ class IconTextButton extends StatelessWidget {
148 172
   final String text;
149 173
   final Function onTap;
150 174
 
151
-  const IconTextButton({Key key, this.icon, this.text, this.onTap}) : super(key: key);
175
+  const IconTextButton({Key key, this.icon, this.text, this.onTap})
176
+      : super(key: key);
152 177
 
153 178
   @override
154 179
   Widget build(BuildContext context) {

+ 20
- 5
lib/photo.dart 查看文件

@@ -3,6 +3,9 @@ library photo;
3 3
 import 'dart:async';
4 4
 
5 5
 import 'package:flutter/material.dart';
6
+
7
+import 'package:photo_manager/photo_manager.dart';
8
+
6 9
 import 'package:photo/src/delegate/badge_delegate.dart';
7 10
 import 'package:photo/src/delegate/checkbox_builder_delegate.dart';
8 11
 import 'package:photo/src/delegate/loading_delegate.dart';
@@ -11,12 +14,11 @@ import 'package:photo/src/entity/options.dart';
11 14
 import 'package:photo/src/provider/i18n_provider.dart';
12 15
 import 'package:photo/src/ui/dialog/not_permission_dialog.dart';
13 16
 import 'package:photo/src/ui/photo_app.dart';
14
-import 'package:photo_manager/photo_manager.dart';
15
-
16 17
 export 'package:photo/src/delegate/checkbox_builder_delegate.dart';
17 18
 export 'package:photo/src/delegate/loading_delegate.dart';
18 19
 export 'package:photo/src/delegate/sort_delegate.dart';
19
-export 'package:photo/src/provider/i18n_provider.dart' show I18NCustomProvider, I18nProvider, CNProvider, ENProvider;
20
+export 'package:photo/src/provider/i18n_provider.dart'
21
+    show I18NCustomProvider, I18nProvider, CNProvider, ENProvider;
20 22
 export 'package:photo/src/entity/options.dart' show PickType;
21 23
 export 'package:photo/src/delegate/badge_delegate.dart';
22 24
 
@@ -42,6 +44,8 @@ class PhotoPicker {
42 44
   ///
43 45
   ///   当用户取消时返回一个空数组
44 46
   ///
47
+  ///   [photoPathList] 一旦设置 则 [pickType]参数无效
48
+  ///
45 49
   /// 关于参数可以查看readme文档介绍
46 50
   ///
47 51
   /// if user not grand permission, then return null and show a dialog to help user open setting.
@@ -53,6 +57,8 @@ class PhotoPicker {
53 57
   ///
54 58
   ///   when user cancel selected,result is empty list
55 59
   ///
60
+  ///   when [photoPathList] is not null , [pickType] invalid
61
+  ///
56 62
   /// params see readme.md
57 63
   static Future<List<AssetEntity>> pickAsset({
58 64
     @required BuildContext context,
@@ -71,6 +77,7 @@ class PhotoPicker {
71 77
     LoadingDelegate loadingDelegate,
72 78
     PickType pickType = PickType.all,
73 79
     BadgeDelegate badgeDelegate = const DefaultBadgeDelegate(),
80
+    List<AssetPathEntity> photoPathList,
74 81
   }) {
75 82
     assert(provider != null, "provider must be not null");
76 83
     assert(context != null, "context must be not null");
@@ -107,6 +114,7 @@ class PhotoPicker {
107 114
       context,
108 115
       options,
109 116
       provider,
117
+      photoPathList,
110 118
     );
111 119
   }
112 120
 
@@ -114,6 +122,7 @@ class PhotoPicker {
114 122
     BuildContext context,
115 123
     Options options,
116 124
     I18nProvider provider,
125
+    List<AssetPathEntity> photoList,
117 126
   ) async {
118 127
     var requestPermission = await PhotoManager.requestPermission();
119 128
     if (requestPermission != true) {
@@ -129,15 +138,21 @@ class PhotoPicker {
129 138
       return null;
130 139
     }
131 140
 
132
-    return _openGalleryContentPage(context, options, provider);
141
+    return _openGalleryContentPage(context, options, provider, photoList);
133 142
   }
134 143
 
135
-  Future<List<AssetEntity>> _openGalleryContentPage(BuildContext context, Options options, I18nProvider provider) async {
144
+  Future<List<AssetEntity>> _openGalleryContentPage(
145
+    BuildContext context,
146
+    Options options,
147
+    I18nProvider provider,
148
+    List<AssetPathEntity> photoList,
149
+  ) async {
136 150
     return Navigator.of(context).push(
137 151
       MaterialPageRoute(
138 152
         builder: (ctx) => PhotoApp(
139 153
               options: options,
140 154
               provider: provider,
155
+              photoList: photoList,
141 156
             ),
142 157
       ),
143 158
     );

+ 2
- 1
lib/src/delegate/sort_delegate.dart 查看文件

@@ -60,6 +60,7 @@ class CommonSortDelegate extends SortDelegate {
60 60
   }
61 61
 
62 62
   bool _isScreenShot(AssetPathEntity entity) {
63
-    return entity.name.toUpperCase() == "screenshots".toUpperCase() || entity.name.toUpperCase() == "screenshot".toUpperCase();
63
+    return entity.name.toUpperCase() == "screenshots".toUpperCase() ||
64
+        entity.name.toUpperCase() == "screenshot".toUpperCase();
64 65
   }
65 66
 }

+ 2
- 1
lib/src/provider/config_provider.dart 查看文件

@@ -18,5 +18,6 @@ class ConfigProvider extends InheritedWidget {
18 18
     return true;
19 19
   }
20 20
 
21
-  static ConfigProvider of(BuildContext context) => context.inheritFromWidgetOfExactType(ConfigProvider);
21
+  static ConfigProvider of(BuildContext context) =>
22
+      context.inheritFromWidgetOfExactType(ConfigProvider);
22 23
 }

+ 1
- 1
lib/src/provider/i18n_provider.dart 查看文件

@@ -102,7 +102,7 @@ class ENProvider extends I18nProvider {
102 102
 
103 103
   @override
104 104
   String getAllGalleryText(Options options) {
105
-    return "all";
105
+    return "Recent";
106 106
   }
107 107
 
108 108
   @override

+ 19
- 2
lib/src/ui/dialog/change_gallery_dialog.dart 查看文件

@@ -1,10 +1,19 @@
1 1
 import 'package:flutter/material.dart';
2
+import 'package:photo/src/entity/options.dart';
3
+import 'package:photo/src/provider/i18n_provider.dart';
2 4
 import 'package:photo_manager/photo_manager.dart';
3 5
 
4 6
 class ChangeGalleryDialog extends StatefulWidget {
5 7
   final List<AssetPathEntity> galleryList;
8
+  final I18nProvider i18n;
9
+  final Options options;
6 10
 
7
-  const ChangeGalleryDialog({Key key, this.galleryList}) : super(key: key);
11
+  const ChangeGalleryDialog({
12
+    Key key,
13
+    this.galleryList,
14
+    this.i18n,
15
+    this.options,
16
+  }) : super(key: key);
8 17
 
9 18
   @override
10 19
   _ChangeGalleryDialogState createState() => _ChangeGalleryDialogState();
@@ -23,9 +32,17 @@ class _ChangeGalleryDialogState extends State<ChangeGalleryDialog> {
23 32
 
24 33
   Widget _buildItem(BuildContext context, int index) {
25 34
     var entity = widget.galleryList[index];
35
+    String text;
36
+
37
+    if (entity.isAll) {
38
+      text = widget.i18n?.getAllGalleryText(widget.options);
39
+    }
40
+
41
+    text = text ?? entity.name;
42
+
26 43
     return FlatButton(
27 44
       child: ListTile(
28
-        title: Text(entity.name),
45
+        title: Text(text),
29 46
       ),
30 47
       onPressed: () {
31 48
         Navigator.pop(context, entity);

+ 44
- 7
lib/src/ui/page/photo_main_page.dart 查看文件

@@ -17,18 +17,21 @@ import 'package:photo_manager/photo_manager.dart';
17 17
 class PhotoMainPage extends StatefulWidget {
18 18
   final ValueChanged<List<AssetEntity>> onClose;
19 19
   final Options options;
20
+  final List<AssetPathEntity> photoList;
20 21
 
21 22
   const PhotoMainPage({
22 23
     Key key,
23 24
     this.onClose,
24 25
     this.options,
26
+    this.photoList,
25 27
   }) : super(key: key);
26 28
 
27 29
   @override
28 30
   _PhotoMainPageState createState() => _PhotoMainPageState();
29 31
 }
30 32
 
31
-class _PhotoMainPageState extends State<PhotoMainPage> with SelectedProvider, GalleryListProvider {
33
+class _PhotoMainPageState extends State<PhotoMainPage>
34
+    with SelectedProvider, GalleryListProvider {
32 35
   Options get options => widget.options;
33 36
 
34 37
   I18nProvider get i18nProvider => ConfigProvider.of(context).provider;
@@ -52,6 +55,13 @@ class _PhotoMainPageState extends State<PhotoMainPage> with SelectedProvider, Ga
52 55
     _currentPath = value;
53 56
   }
54 57
 
58
+  String get currentGalleryName {
59
+    if (currentPath.isAll) {
60
+      return i18nProvider.getAllGalleryText(options);
61
+    }
62
+    return currentPath.name;
63
+  }
64
+
55 65
   GlobalKey scaffoldKey;
56 66
   ScrollController scrollController;
57 67
 
@@ -95,7 +105,9 @@ class _PhotoMainPageState extends State<PhotoMainPage> with SelectedProvider, Ga
95 105
                 splashColor: Colors.transparent,
96 106
                 child: Text(
97 107
                   i18nProvider.getSureText(options, selectedCount),
98
-                  style: selectedCount == 0 ? textStyle.copyWith(color: options.disableColor) : textStyle,
108
+                  style: selectedCount == 0
109
+                      ? textStyle.copyWith(color: options.disableColor)
110
+                      : textStyle,
99 111
                 ),
100 112
                 onPressed: selectedCount == 0 ? null : sure,
101 113
               ),
@@ -106,7 +118,7 @@ class _PhotoMainPageState extends State<PhotoMainPage> with SelectedProvider, Ga
106 118
             key: scaffoldKey,
107 119
             provider: i18nProvider,
108 120
             options: options,
109
-            galleryName: currentPath.name,
121
+            galleryName: currentGalleryName,
110 122
             onGalleryChange: _onGalleryChange,
111 123
             onTapPreview: selectedList.isEmpty ? null : _onTapPreview,
112 124
             selectedProvider: this,
@@ -152,7 +164,27 @@ class _PhotoMainPageState extends State<PhotoMainPage> with SelectedProvider, Ga
152 164
     );
153 165
   }
154 166
 
155
-  Future<void> _refreshList() async {
167
+  void _refreshList() {
168
+    if (widget.photoList != null && widget.photoList.isNotEmpty) {
169
+      _refreshListFromWidget();
170
+      return;
171
+    }
172
+
173
+    _refreshListFromGallery();
174
+  }
175
+
176
+  Future<void> _refreshListFromWidget() async {
177
+    galleryPathList.clear();
178
+    galleryPathList.addAll(widget.photoList);
179
+    this.list.clear();
180
+    var assetList = await galleryPathList[0].assetList;
181
+    this.list.addAll(assetList);
182
+    setState(() {
183
+      _isInit = true;
184
+    });
185
+  }
186
+
187
+  Future<void> _refreshListFromGallery() async {
156 188
     List<AssetPathEntity> pathList;
157 189
     switch (options.pickType) {
158 190
       case PickType.onlyImage:
@@ -483,7 +515,8 @@ class __BottomWidgetState extends State<_BottomWidget> {
483 515
                   height: 44.0,
484 516
                   alignment: Alignment.center,
485 517
                   child: Text(
486
-                    i18nProvider.getPreviewText(options, widget.selectedProvider),
518
+                    i18nProvider.getPreviewText(
519
+                        options, widget.selectedProvider),
487 520
                     style: textStyle,
488 521
                   ),
489 522
                   padding: textPadding,
@@ -501,6 +534,8 @@ class __BottomWidgetState extends State<_BottomWidget> {
501 534
       context: context,
502 535
       builder: (ctx) => ChangeGalleryDialog(
503 536
             galleryList: widget.galleryListProvider.galleryPathList,
537
+            i18n: i18nProvider,
538
+            options: options,
504 539
           ),
505 540
     );
506 541
 
@@ -539,7 +574,8 @@ class ImageItem extends StatelessWidget {
539 574
       future: entity.thumbDataWithSize(size, size),
540 575
       builder: (BuildContext context, AsyncSnapshot<Uint8List> snapshot) {
541 576
         var futureData = snapshot.data;
542
-        if (snapshot.connectionState == ConnectionState.done && futureData != null) {
577
+        if (snapshot.connectionState == ConnectionState.done &&
578
+            futureData != null) {
543 579
           ImageLruCache.setData(entity, size, futureData);
544 580
           return _buildImageItem(context, futureData);
545 581
         }
@@ -566,7 +602,8 @@ class ImageItem extends StatelessWidget {
566 602
       future: entity.videoDuration,
567 603
       builder: (ctx, snapshot) {
568 604
         if (snapshot.hasData && snapshot != null) {
569
-          var buildBadge = badgeDelegate?.buildBadge(context, entity.type, snapshot.data);
605
+          var buildBadge =
606
+              badgeDelegate?.buildBadge(context, entity.type, snapshot.data);
570 607
           if (buildBadge == null) {
571 608
             return Container();
572 609
           } else {

+ 11
- 3
lib/src/ui/photo_app.dart 查看文件

@@ -1,15 +1,22 @@
1 1
 import 'package:flutter/material.dart';
2
+
3
+import 'package:photo_manager/photo_manager.dart';
4
+
2 5
 import 'package:photo/src/entity/options.dart';
3 6
 import 'package:photo/src/provider/config_provider.dart';
4 7
 import 'package:photo/src/provider/i18n_provider.dart';
5 8
 import 'package:photo/src/ui/page/photo_main_page.dart';
6
-import 'package:photo_manager/photo_manager.dart';
7 9
 
8 10
 class PhotoApp extends StatelessWidget {
9 11
   final Options options;
10 12
   final I18nProvider provider;
11
-
12
-  const PhotoApp({Key key, this.options, this.provider}) : super(key: key);
13
+  final List<AssetPathEntity> photoList;
14
+  const PhotoApp({
15
+    Key key,
16
+    this.options,
17
+    this.provider,
18
+    this.photoList,
19
+  }) : super(key: key);
13 20
 
14 21
   @override
15 22
   Widget build(BuildContext context) {
@@ -21,6 +28,7 @@ class PhotoApp extends StatelessWidget {
21 28
           Navigator.pop(context, value);
22 29
         },
23 30
         options: options,
31
+        photoList: photoList,
24 32
       ),
25 33
     );
26 34
   }

+ 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