Parcourir la source

version to 0.0.7. update readme.

Caijinglong il y a 6 ans
Parent
révision
0a1ca3f2d1
4 fichiers modifiés avec 40 ajouts et 23 suppressions
  1. 3
    0
      CHANGELOG.md
  2. 35
    21
      README.md
  3. 1
    1
      example/README.md
  4. 1
    1
      pubspec.yaml

+ 3
- 0
CHANGELOG.md Voir le fichier

@@ -1,5 +1,8 @@
1 1
 # CHANGELOG
2 2
 
3
+## [0.0.7] fix bug
4
+fix dividerColor not valid bug
5
+
3 6
 ## [0.0.6] add checkbox delegate
4 7
 users can use CheckBoxDelegate to custom preview right bottom widget
5 8
 

+ 35
- 21
README.md Voir le fichier

@@ -13,7 +13,7 @@ if you want to build custom ui, you just need api to make custom ui. to use [pho
13 13
 
14 14
 ```yaml
15 15
 dependencies:
16
-  photo: ^0.0.6
16
+  photo: ^0.0.7
17 17
 ```
18 18
 
19 19
 ## import
@@ -27,29 +27,43 @@ import 'package:photo_manager/photo_manager.dart';
27 27
 
28 28
 ```dart
29 29
   void _pickImage() async {
30
-      List<ImageEntity> imgList = await PhotoPicker.pickImage(
31
-        context: context, // BuildContext requied
32
-
33
-        /// The following are optional parameters.
34
-        themeColor: Colors.green, // the title color and bottom color
35
-        padding: 5.0, // item padding
36
-        dividerColor: Colors.deepOrange, // divider color
37
-        disableColor: Colors.grey.shade300, // the check box disable color
38
-        itemRadio: 0.88, // the content item radio
39
-        maxSelected: 8, // max picker image count
40
-        provider: CNProvider(), // i18n provider ,default is chinese. , you can custom I18nProvider or use ENProvider()
41
-        rowCount: 5,  // item row count
42
-        textColor: Colors.white, // text color
43
-        thumbSize: 150, // preview thumb size , default is 64
44
-        sortDelegate: SortDelegate.common, // default is common ,or you make custom delegate
45
-      );
46
-
47
-      imgList.forEach((e) async {
48
-          print(e.id);
49
-      });
30
+    List<ImageEntity> imgList = await PhotoPicker.pickImage(
31
+      context: context, // BuildContext requied
32
+
33
+      /// The following are optional parameters.
34
+      themeColor: Colors.green, // the title color and bottom color
35
+      padding: 1.0, // item padding
36
+      dividerColor: Colors.deepOrange, // divider color
37
+      disableColor: Colors.grey.shade300, // the check box disable color
38
+      itemRadio: 0.88, // the content item radio
39
+      maxSelected: 8, // max picker image count
40
+      provider: I18nProvider.chinese, // i18n provider ,default is chinese. , you can custom I18nProvider or use ENProvider()
41
+      rowCount: 5,  // item row count
42
+      textColor: Colors.white, // text color
43
+      thumbSize: 150, // preview thumb size , default is 64
44
+      sortDelegate: SortDelegate.common, // default is common ,or you make custom delegate to sort your gallery
45
+      checkBoxBuilderDelegate: DefaultCheckBoxBuilderDelegate(), // default is DefaultCheckBoxBuilderDelegate ,or you make custom delegate to create checkbox
46
+    );
47
+
48
+    if (imgList == null) {
49
+      currentSelected = "not select item";
50
+    } else {
51
+      List<String> r = [];
52
+      for (var e in imgList) {
53
+        var file = await e.file;
54
+        r.add(file.absolute.path);
55
+      }
56
+      currentSelected = r.join("\n\n");
57
+    }
58
+    setState(() {});
50 59
   }
60
+
51 61
 ```
52 62
 
63
+## whole example
64
+
65
+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)
66
+
53 67
 ## about android
54 68
 
55 69
 ### glide

+ 1
- 1
example/README.md Voir le fichier

@@ -1,6 +1,6 @@
1 1
 # example
2 2
 
3
-A new Flutter project.
3
+photo library example
4 4
 
5 5
 ## Getting Started
6 6
 

+ 1
- 1
pubspec.yaml Voir le fichier

@@ -1,6 +1,6 @@
1 1
 name: photo
2 2
 description: image picker, multi picker,use flutter as ui, if you want to build custom ui,you just use photo_manager.
3
-version: 0.0.6
3
+version: 0.0.7
4 4
 author: caijinglong<cjl_spy@163.com>
5 5
 homepage: https://github.com/CaiJingLong/flutter_photo
6 6