@@ -12,17 +12,11 @@ Resolves a image provider and show the result with useful gestures support, such
12
12
13
13
Add ` photo_view ` as a dependency in your pubspec.yaml file.
14
14
15
- #### Todo:
16
- - [x] Scale on doubleTap
17
- - [x] Zoom when pinched
18
- - [x] Respect screen and image boundaries
19
- - [x] Center image when zooming out
20
- - [x] Add image zoom limits (` minScale ` an ` maxScale ` )
21
- - [x] Add GIF support
22
- - [ ] Multiple image support (Gallery mode)
23
- - [ ] Rotate gesture rotates image ([ Work in progress] ( https://github.com/renancaraujo/photo_view/pull/4 ) )
15
+ Import Photo View:
16
+ ``` dart
17
+ import 'package:photo_view/photo_view.dart';
18
+ ```
24
19
25
- Pull requests are welcome 😊.
26
20
27
21
## Sample code
28
22
@@ -33,7 +27,9 @@ Given a `ImageProvider imageProvider` (such as [AssetImage](https://docs.flutter
33
27
Widget build(BuildContext context) {
34
28
return new Container(
35
29
child: new PhotoView(
36
- imageProvider: imageProvider
30
+ imageProvider: AssetImage("assets/large-image.jpg"),
31
+ minScale: PhotoViewScaleBoundary.contained * 0.8,
32
+ maxScale: 4.0,
37
33
);
38
34
);
39
35
}
@@ -63,14 +59,23 @@ For more information about how to use Photo View, check the [API Docs](/API.md)
63
59
### Screenshots
64
60
65
61
66
- | Large image | Small image |
67
- | ------------- | ------------- |
68
- | ![ In action] ( https://github.com/renancaraujo/photo_view/blob/master/screen1.gif ) | ![ In action] ( https://github.com/renancaraujo/photo_view/blob/master/screen2.gif ) |
62
+ | Large image | Small image | Animated GIF | Limited scale | Inline |
63
+ | ------------- | ------------- | ------------- | ------------- | ------------- |
64
+ | ![ In action] ( https://github.com/renancaraujo/photo_view/blob/master/screen1.gif ) | ![ In action] ( https://github.com/renancaraujo/photo_view/blob/master/screen2.gif ) | ![ In action] ( https://github.com/renancaraujo/photo_view/blob/master/screen3.gif ) | ![ In action] ( https://github.com/renancaraujo/photo_view/blob/master/screen4.gif ) | ![ In action] ( https://github.com/renancaraujo/photo_view/blob/master/screen5.gif ) |
65
+
66
+
67
+ ## Todo:
69
68
70
- | Animated GIF | Limited scale |
71
- | ------------- | ------------- |
72
- | ![ In action] ( https://github.com/renancaraujo/photo_view/blob/master/screen3.gif ) | ![ In action] ( https://github.com/renancaraujo/photo_view/blob/master/screen4.gif ) |
69
+ - [x] Scale on doubleTap
70
+ - [x] Zoom when pinched
71
+ - [x] Respect screen and image boundaries
72
+ - [x] Center image when zooming out
73
+ - [x] Add image zoom limits (` minScale ` an ` maxScale ` )
74
+ - [x] Add GIF support
75
+ - [ ] Multiple image support (Gallery mode)
76
+ - [ ] Rotate gesture rotates image ([ Work in progress] ( https://github.com/renancaraujo/photo_view/pull/4 ) )
73
77
78
+ Pull requests are welcome 😊.
74
79
75
80
76
81
0 commit comments