Przeglądaj źródła

add pick type params

Caijinglong 5 lat temu
rodzic
commit
04f8abaf81

+ 13
- 12
.vscode/launch.json Wyświetl plik

@@ -1,13 +1,14 @@
1 1
 {
2
-    // 使用 IntelliSense 了解相关属性。 
3
-    // 悬停以查看现有属性的描述。
4
-    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5
-    "version": "0.2.0",
6
-    "configurations": [
7
-        {
8
-            "name": "Flutter",
9
-            "request": "launch",
10
-            "type": "dart"
11
-        }
12
-    ]
13
-}
2
+  // 使用 IntelliSense 了解相关属性。
3
+  // 悬停以查看现有属性的描述。
4
+  // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5
+  "version": "0.2.0",
6
+  "configurations": [
7
+    {
8
+      "name": "Flutter",
9
+      "request": "launch",
10
+      "type": "dart",
11
+      "program": "example/lib/main.dart"
12
+    }
13
+  ]
14
+}

+ 0
- 4
example/ios/Runner.xcodeproj/project.pbxproj Wyświetl plik

@@ -8,7 +8,6 @@
8 8
 
9 9
 /* Begin PBXBuildFile section */
10 10
 		1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11
-		2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
12 11
 		3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 12
 		3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
14 13
 		3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
@@ -41,7 +40,6 @@
41 40
 /* Begin PBXFileReference section */
42 41
 		1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
43 42
 		1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
44
-		2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
45 43
 		3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
46 44
 		3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
47 45
 		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
@@ -83,7 +81,6 @@
83 81
 		9740EEB11CF90186004384FC /* Flutter */ = {
84 82
 			isa = PBXGroup;
85 83
 			children = (
86
-				2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
87 84
 				3B80C3931E831B6300D905FE /* App.framework */,
88 85
 				3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
89 86
 				9740EEBA1CF902C7004384FC /* Flutter.framework */,
@@ -211,7 +208,6 @@
211 208
 				3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
212 209
 				9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
213 210
 				97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
214
-				2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
215 211
 				97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
216 212
 			);
217 213
 			runOnlyForDeploymentPostprocessing = 0;

+ 41
- 12
example/lib/main.dart Wyświetl plik

@@ -30,7 +30,7 @@ class MyHomePage extends StatefulWidget {
30 30
 class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
31 31
   String currentSelected = "";
32 32
 
33
-  void _pickImage() async {
33
+  void _pickAsset(PickType type) async {
34 34
     List<AssetEntity> imgList = await PhotoPicker.pickAsset(
35 35
       // BuildContext required
36 36
       context: context,
@@ -48,8 +48,8 @@ class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
48 48
       // the content item radio
49 49
       maxSelected: 8,
50 50
       // max picker image count
51
-      provider: I18nProvider.english,
52
-      // provider: I18nProvider.chinese,
51
+      // provider: I18nProvider.english,
52
+      provider: I18nProvider.chinese,
53 53
       // i18n provider ,default is chinese. , you can custom I18nProvider or use ENProvider()
54 54
       rowCount: 3,
55 55
       // item row count
@@ -69,6 +69,9 @@ class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
69 69
       // if you want to build custom loading widget,extends LoadingDelegate, [see example/lib/main.dart]
70 70
 
71 71
       badgeDelegate: const DurationBadgeDelegate(),
72
+      // badgeDelegate to show badge widget
73
+
74
+      pickType: type,
72 75
     );
73 76
 
74 77
     if (imgList == null) {
@@ -85,8 +88,7 @@ class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
85 88
   }
86 89
 
87 90
   @override
88
-  Widget buildBigImageLoading(
89
-      BuildContext context, AssetEntity entity, Color themeColor) {
91
+  Widget buildBigImageLoading(BuildContext context, AssetEntity entity, Color themeColor) {
90 92
     return Center(
91 93
       child: Container(
92 94
         width: 50.0,
@@ -99,8 +101,7 @@ class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
99 101
   }
100 102
 
101 103
   @override
102
-  Widget buildPreviewLoading(
103
-      BuildContext context, AssetEntity entity, Color themeColor) {
104
+  Widget buildPreviewLoading(BuildContext context, AssetEntity entity, Color themeColor) {
104 105
     return Center(
105 106
       child: Container(
106 107
         width: 50.0,
@@ -119,18 +120,46 @@ class _MyHomePageState extends State<MyHomePage> with LoadingDelegate {
119 120
         title: new Text(widget.title),
120 121
       ),
121 122
       body: Container(
122
-        child: Center(
123
-          child: Text(
124
-            '$currentSelected',
125
-            textAlign: TextAlign.center,
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
+            ],
126 134
           ),
127 135
         ),
128 136
       ),
129 137
       floatingActionButton: new FloatingActionButton(
130
-        onPressed: _pickImage,
138
+        onPressed: () => _pickAsset(PickType.all),
131 139
         tooltip: 'pickImage',
132 140
         child: new Icon(Icons.add),
133 141
       ),
134 142
     );
135 143
   }
136 144
 }
145
+
146
+class IconTextButton extends StatelessWidget {
147
+  final IconData icon;
148
+  final String text;
149
+  final Function onTap;
150
+
151
+  const IconTextButton({Key key, this.icon, this.text, this.onTap}) : super(key: key);
152
+
153
+  @override
154
+  Widget build(BuildContext context) {
155
+    return InkWell(
156
+      onTap: onTap,
157
+      child: Container(
158
+        child: ListTile(
159
+          leading: Icon(icon ?? Icons.device_unknown),
160
+          title: Text(text ?? ""),
161
+        ),
162
+      ),
163
+    );
164
+  }
165
+}

+ 8
- 44
lib/photo.dart Wyświetl plik

@@ -16,8 +16,8 @@ import 'package:photo_manager/photo_manager.dart';
16 16
 export 'package:photo/src/delegate/checkbox_builder_delegate.dart';
17 17
 export 'package:photo/src/delegate/loading_delegate.dart';
18 18
 export 'package:photo/src/delegate/sort_delegate.dart';
19
-export 'package:photo/src/provider/i18n_provider.dart'
20
-    show I18NCustomProvider, I18nProvider, CNProvider, ENProvider;
19
+export 'package:photo/src/provider/i18n_provider.dart' show I18NCustomProvider, I18nProvider, CNProvider, ENProvider;
20
+export 'package:photo/src/entity/options.dart' show PickType;
21 21
 export 'package:photo/src/delegate/badge_delegate.dart';
22 22
 
23 23
 class PhotoPicker {
@@ -32,44 +32,6 @@ class PhotoPicker {
32 32
 
33 33
   static const String rootRouteName = "photo_picker_image";
34 34
 
35
-  /// use new method [pickAsset]
36
-  ///
37
-  /// This method will be removed in the future.
38
-  @deprecated
39
-  static Future<List<AssetEntity>> pickImage({
40
-    @required BuildContext context,
41
-    int rowCount = 4,
42
-    int maxSelected = 9,
43
-    double padding = 0.5,
44
-    double itemRadio = 1.0,
45
-    Color themeColor,
46
-    Color dividerColor,
47
-    Color textColor,
48
-    Color disableColor,
49
-    int thumbSize = 64,
50
-    I18nProvider provider = I18nProvider.chinese,
51
-    SortDelegate sortDelegate,
52
-    CheckBoxBuilderDelegate checkBoxBuilderDelegate,
53
-    LoadingDelegate loadingDelegate,
54
-  }) {
55
-    return pickAsset(
56
-      context: context,
57
-      rowCount: rowCount,
58
-      maxSelected: maxSelected,
59
-      padding: padding,
60
-      itemRadio: itemRadio,
61
-      themeColor: themeColor,
62
-      dividerColor: dividerColor,
63
-      textColor: textColor,
64
-      disableColor: disableColor,
65
-      thumbSize: thumbSize,
66
-      provider: provider,
67
-      sortDelegate: sortDelegate,
68
-      checkBoxBuilderDelegate: checkBoxBuilderDelegate,
69
-      loadingDelegate: loadingDelegate,
70
-    );
71
-  }
72
-
73 35
   /// 没有授予权限的时候,会开启一个dialog去帮助用户去应用设置页面开启权限
74 36
   /// 确定开启设置页面,取消关闭弹窗,无论选择什么,返回值都是null
75 37
   ///
@@ -107,10 +69,12 @@ class PhotoPicker {
107 69
     SortDelegate sortDelegate,
108 70
     CheckBoxBuilderDelegate checkBoxBuilderDelegate,
109 71
     LoadingDelegate loadingDelegate,
72
+    PickType pickType = PickType.all,
110 73
     BadgeDelegate badgeDelegate = const DefaultBadgeDelegate(),
111 74
   }) {
112 75
     assert(provider != null, "provider must be not null");
113 76
     assert(context != null, "context must be not null");
77
+    assert(pickType != null, "pickType must be not null");
114 78
 
115 79
     themeColor ??= Theme.of(context)?.primaryColor ?? Colors.black;
116 80
     dividerColor ??= Theme.of(context)?.dividerColor ?? Colors.grey;
@@ -136,16 +100,17 @@ class PhotoPicker {
136 100
       checkBoxBuilderDelegate: checkBoxBuilderDelegate,
137 101
       loadingDelegate: loadingDelegate,
138 102
       badgeDelegate: badgeDelegate,
103
+      pickType: pickType,
139 104
     );
140 105
 
141
-    return PhotoPicker()._pickImage(
106
+    return PhotoPicker()._pickAsset(
142 107
       context,
143 108
       options,
144 109
       provider,
145 110
     );
146 111
   }
147 112
 
148
-  Future<List<AssetEntity>> _pickImage(
113
+  Future<List<AssetEntity>> _pickAsset(
149 114
     BuildContext context,
150 115
     Options options,
151 116
     I18nProvider provider,
@@ -167,8 +132,7 @@ class PhotoPicker {
167 132
     return _openGalleryContentPage(context, options, provider);
168 133
   }
169 134
 
170
-  Future<List<AssetEntity>> _openGalleryContentPage(
171
-      BuildContext context, Options options, I18nProvider provider) async {
135
+  Future<List<AssetEntity>> _openGalleryContentPage(BuildContext context, Options options, I18nProvider provider) async {
172 136
     return Navigator.of(context).push(
173 137
       MaterialPageRoute(
174 138
         builder: (ctx) => PhotoApp(

+ 3
- 4
lib/src/delegate/sort_delegate.dart Wyświetl plik

@@ -23,11 +23,11 @@ class CommonSortDelegate extends SortDelegate {
23 23
   @override
24 24
   void sort(List<AssetPathEntity> list) {
25 25
     list.sort((path1, path2) {
26
-      if (path1 == AssetPathEntity.all) {
26
+      if (path1.isAll) {
27 27
         return -1;
28 28
       }
29 29
 
30
-      if (path2 == AssetPathEntity.all) {
30
+      if (path2.isAll) {
31 31
         return 1;
32 32
       }
33 33
 
@@ -60,7 +60,6 @@ class CommonSortDelegate extends SortDelegate {
60 60
   }
61 61
 
62 62
   bool _isScreenShot(AssetPathEntity entity) {
63
-    return entity.name.toUpperCase() == "screenshots".toUpperCase() ||
64
-        entity.name.toUpperCase() == "screenshot".toUpperCase();
63
+    return entity.name.toUpperCase() == "screenshots".toUpperCase() || entity.name.toUpperCase() == "screenshot".toUpperCase();
65 64
   }
66 65
 }

+ 9
- 0
lib/src/entity/options.dart Wyświetl plik

@@ -31,6 +31,8 @@ class Options {
31 31
 
32 32
   final BadgeDelegate badgeDelegate;
33 33
 
34
+  final PickType pickType;
35
+
34 36
   const Options({
35 37
     this.rowCount,
36 38
     this.maxSelected,
@@ -45,5 +47,12 @@ class Options {
45 47
     this.checkBoxBuilderDelegate,
46 48
     this.loadingDelegate,
47 49
     this.badgeDelegate,
50
+    this.pickType,
48 51
   });
49 52
 }
53
+
54
+enum PickType {
55
+  all,
56
+  onlyImage,
57
+  onlyVideo,
58
+}

+ 1
- 2
lib/src/provider/config_provider.dart Wyświetl plik

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

+ 48
- 30
lib/src/ui/page/photo_main_page.dart Wyświetl plik

@@ -16,19 +16,20 @@ import 'package:photo_manager/photo_manager.dart';
16 16
 
17 17
 class PhotoMainPage extends StatefulWidget {
18 18
   final ValueChanged<List<AssetEntity>> onClose;
19
+  final Options options;
19 20
 
20 21
   const PhotoMainPage({
21 22
     Key key,
22 23
     this.onClose,
24
+    this.options,
23 25
   }) : super(key: key);
24 26
 
25 27
   @override
26 28
   _PhotoMainPageState createState() => _PhotoMainPageState();
27 29
 }
28 30
 
29
-class _PhotoMainPageState extends State<PhotoMainPage>
30
-    with SelectedProvider, GalleryListProvider {
31
-  Options get options => ConfigProvider.of(context).options;
31
+class _PhotoMainPageState extends State<PhotoMainPage> with SelectedProvider, GalleryListProvider {
32
+  Options get options => widget.options;
32 33
 
33 34
   I18nProvider get i18nProvider => ConfigProvider.of(context).provider;
34 35
 
@@ -94,9 +95,7 @@ class _PhotoMainPageState extends State<PhotoMainPage>
94 95
                 splashColor: Colors.transparent,
95 96
                 child: Text(
96 97
                   i18nProvider.getSureText(options, selectedCount),
97
-                  style: selectedCount == 0
98
-                      ? textStyle.copyWith(color: options.disableColor)
99
-                      : textStyle,
98
+                  style: selectedCount == 0 ? textStyle.copyWith(color: options.disableColor) : textStyle,
100 99
                 ),
101 100
                 onPressed: selectedCount == 0 ? null : sure,
102 101
               ),
@@ -154,17 +153,44 @@ class _PhotoMainPageState extends State<PhotoMainPage>
154 153
   }
155 154
 
156 155
   Future<void> _refreshList() async {
157
-    var pathList = await PhotoManager.getAssetPathList();
156
+    List<AssetPathEntity> pathList;
157
+    switch (options.pickType) {
158
+      case PickType.onlyImage:
159
+        pathList = await PhotoManager.getImageAsset();
160
+        break;
161
+      case PickType.onlyVideo:
162
+        pathList = await PhotoManager.getVideoAsset();
163
+        break;
164
+      default:
165
+        pathList = await PhotoManager.getAssetPathList();
166
+    }
167
+
168
+    if (pathList == null) {
169
+      return;
170
+    }
158 171
 
159 172
     options.sortDelegate.sort(pathList);
160 173
 
161 174
     galleryPathList.clear();
162 175
     galleryPathList.addAll(pathList);
163 176
 
164
-    var imageList = await currentPath.assetList;
165
-    AssetPathEntity.all.name = i18nProvider.getAllGalleryText(options);
177
+    List<AssetEntity> imageList;
178
+
179
+    if (pathList.isNotEmpty) {
180
+      imageList = await pathList[0].assetList;
181
+      _currentPath = pathList[0];
182
+    }
183
+
184
+    for (var path in pathList) {
185
+      if (path.isAll) {
186
+        path.name = i18nProvider.getAllGalleryText(options);
187
+      }
188
+    }
189
+
166 190
     this.list.clear();
167
-    this.list.addAll(imageList);
191
+    if (imageList != null) {
192
+      this.list.addAll(imageList);
193
+    }
168 194
     setState(() {
169 195
       _isInit = true;
170 196
     });
@@ -320,11 +346,10 @@ class _PhotoMainPageState extends State<PhotoMainPage>
320 346
     });
321 347
   }
322 348
 
323
-  void _onTapPreview() {
349
+  void _onTapPreview() async {
324 350
     var result = new PhotoPreviewResult();
325 351
     isPushed = true;
326
-    Navigator.of(context)
327
-        .push(
352
+    var v = await Navigator.of(context).push(
328 353
       MaterialPageRoute(
329 354
         builder: (ctx) => ConfigProvider(
330 355
               provider: ConfigProvider.of(context).provider,
@@ -337,18 +362,14 @@ class _PhotoMainPageState extends State<PhotoMainPage>
337 362
               ),
338 363
             ),
339 364
       ),
340
-    )
341
-        .then(
342
-      (v) {
343
-        if (handlePreviewResult(v)) {
344
-          print(v);
345
-          Navigator.pop(context, v);
346
-          return;
347
-        }
348
-        isPushed = false;
349
-        compareAndRemoveEntities(result.previewSelectedList);
350
-      },
351 365
     );
366
+    if (handlePreviewResult(v)) {
367
+      // print(v);
368
+      Navigator.pop(context, v);
369
+      return;
370
+    }
371
+    isPushed = false;
372
+    compareAndRemoveEntities(result.previewSelectedList);
352 373
   }
353 374
 
354 375
   bool handlePreviewResult(List<AssetEntity> v) {
@@ -462,8 +483,7 @@ class __BottomWidgetState extends State<_BottomWidget> {
462 483
                   height: 44.0,
463 484
                   alignment: Alignment.center,
464 485
                   child: Text(
465
-                    i18nProvider.getPreviewText(
466
-                        options, widget.selectedProvider),
486
+                    i18nProvider.getPreviewText(options, widget.selectedProvider),
467 487
                     style: textStyle,
468 488
                   ),
469 489
                   padding: textPadding,
@@ -519,8 +539,7 @@ class ImageItem extends StatelessWidget {
519 539
       future: entity.thumbDataWithSize(size, size),
520 540
       builder: (BuildContext context, AsyncSnapshot<Uint8List> snapshot) {
521 541
         var futureData = snapshot.data;
522
-        if (snapshot.connectionState == ConnectionState.done &&
523
-            futureData != null) {
542
+        if (snapshot.connectionState == ConnectionState.done && futureData != null) {
524 543
           ImageLruCache.setData(entity, size, futureData);
525 544
           return _buildImageItem(context, futureData);
526 545
         }
@@ -547,8 +566,7 @@ class ImageItem extends StatelessWidget {
547 566
       future: entity.videoDuration,
548 567
       builder: (ctx, snapshot) {
549 568
         if (snapshot.hasData && snapshot != null) {
550
-          var buildBadge =
551
-              badgeDelegate?.buildBadge(context, entity.type, snapshot.data);
569
+          var buildBadge = badgeDelegate?.buildBadge(context, entity.type, snapshot.data);
552 570
           if (buildBadge == null) {
553 571
             return Container();
554 572
           } else {

+ 1
- 0
lib/src/ui/photo_app.dart Wyświetl plik

@@ -20,6 +20,7 @@ class PhotoApp extends StatelessWidget {
20 20
         onClose: (List<AssetEntity> value) {
21 21
           Navigator.pop(context, value);
22 22
         },
23
+        options: options,
23 24
       ),
24 25
     );
25 26
   }

+ 15
- 8
pubspec.lock Wyświetl plik

@@ -60,13 +60,20 @@ packages:
60 60
       url: "https://pub.flutter-io.cn"
61 61
     source: hosted
62 62
     version: "1.6.2"
63
-  photo_manager:
64
-    dependency: "direct main"
63
+  pedantic:
64
+    dependency: transitive
65 65
     description:
66
-      name: photo_manager
66
+      name: pedantic
67 67
       url: "https://pub.flutter-io.cn"
68 68
     source: hosted
69
-    version: "0.1.10"
69
+    version: "1.4.0"
70
+  photo_manager:
71
+    dependency: "direct main"
72
+    description:
73
+      path: "../flutter_photo_manager"
74
+      relative: true
75
+    source: path
76
+    version: "0.2.0"
70 77
   quiver:
71 78
     dependency: transitive
72 79
     description:
@@ -85,7 +92,7 @@ packages:
85 92
       name: source_span
86 93
       url: "https://pub.flutter-io.cn"
87 94
     source: hosted
88
-    version: "1.4.1"
95
+    version: "1.5.4"
89 96
   stack_trace:
90 97
     dependency: transitive
91 98
     description:
@@ -113,14 +120,14 @@ packages:
113 120
       name: term_glyph
114 121
       url: "https://pub.flutter-io.cn"
115 122
     source: hosted
116
-    version: "1.0.1"
123
+    version: "1.1.0"
117 124
   test_api:
118 125
     dependency: transitive
119 126
     description:
120 127
       name: test_api
121 128
       url: "https://pub.flutter-io.cn"
122 129
     source: hosted
123
-    version: "0.2.1"
130
+    version: "0.2.2"
124 131
   typed_data:
125 132
     dependency: transitive
126 133
     description:
@@ -136,4 +143,4 @@ packages:
136 143
     source: hosted
137 144
     version: "2.0.8"
138 145
 sdks:
139
-  dart: ">=2.0.0 <3.0.0"
146
+  dart: ">=2.1.0 <3.0.0"

+ 4
- 4
pubspec.yaml Wyświetl plik

@@ -11,13 +11,13 @@ dependencies:
11 11
   flutter:
12 12
     sdk: flutter
13 13
 
14
-  photo_manager: ^0.1.10
14
+  # photo_manager: ^0.1.10
15 15
   # photo_manager:
16 16
   #   git:
17 17
   #     url: https://github.com/CaiJingLong/flutter_photo_manager.git
18
-  #     ref: 11705633cbd01724af6aaa6aa8c8b9ca86ea385c
19
-#  photo_manager:
20
-#    path: /Users/caijinglong/code/flutter/plugin/flutter_photo_manager
18
+  #     ref: 29d844b2c4594d7e524d0169658bc4f3b9ef2ddc
19
+  photo_manager:
20
+    path: ../flutter_photo_manager
21 21
 
22 22
 dev_dependencies:
23 23
   flutter_test: