|
@@ -6,24 +6,26 @@ use flutter as ui
|
6
|
6
|
if you want to build custom ui, you just need api to make custom ui. to use [photo_manager](https://github.com/CaiJingLong/flutter_photo_manager)
|
7
|
7
|
|
8
|
8
|
## screenshot
|
|
9
|
+
|
9
|
10
|
![image](https://github.com/CaiJingLong/some_asset/blob/master/image_picker1.gif)
|
10
|
11
|
|
11
|
12
|
## install
|
12
|
13
|
|
13
|
14
|
```yaml
|
14
|
15
|
dependencies:
|
15
|
|
- photo: ^0.0.3
|
|
16
|
+ photo: ^0.0.4
|
16
|
17
|
```
|
17
|
18
|
|
18
|
19
|
## import
|
|
20
|
+
|
19
|
21
|
```dart
|
20
|
22
|
import 'package:photo/photo.dart';
|
21
|
23
|
import 'package:photo_manager/photo_manager.dart';
|
22
|
24
|
```
|
23
|
25
|
|
24
|
26
|
## use
|
25
|
|
-```dart
|
26
|
27
|
|
|
28
|
+```dart
|
27
|
29
|
void _pickImage(BuildContext context) async {
|
28
|
30
|
List<ImageEntity> imgList = await PhotoPicker.pickImage(
|
29
|
31
|
context: context, // BuildContext requied
|
|
@@ -31,7 +33,7 @@ import 'package:photo_manager/photo_manager.dart';
|
31
|
33
|
/// The following are optional parameters.
|
32
|
34
|
themeColor: Colors.green, // the title color and bottom color
|
33
|
35
|
padding: 5.0, // item padding
|
34
|
|
- dividerColor: Colors.deepOrange, // divider color
|
|
36
|
+ dividerColor: Colors.deepOrange, // divider color
|
35
|
37
|
disableColor: Colors.grey.shade300, // the check box disable color
|
36
|
38
|
itemRadio: 0.88, // the content item radio
|
37
|
39
|
maxSelected: 8, // max picker image count
|
|
@@ -45,10 +47,8 @@ import 'package:photo_manager/photo_manager.dart';
|
45
|
47
|
print(e.id);
|
46
|
48
|
});
|
47
|
49
|
}
|
48
|
|
-
|
49
|
50
|
```
|
50
|
51
|
|
51
|
|
-
|
52
|
52
|
## about android
|
53
|
53
|
|
54
|
54
|
### glide
|
|
@@ -76,4 +76,4 @@ rootProject.allprojects {
|
76
|
76
|
|
77
|
77
|
if you use the proguard
|
78
|
78
|
|
79
|
|
-see the [github](https://github.com/bumptech/glide#proguard)
|
|
79
|
+see the [github](https://github.com/bumptech/glide#proguard)
|