Skip to content

Commit 1113cec

Browse files
authored
0.10.1 (#317)
1 parent 9adbf49 commit 1113cec

File tree

6 files changed

+69
-65
lines changed

6 files changed

+69
-65
lines changed

example/lib/screens/common/app_bar.dart

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,43 @@ class ExampleAppBar extends StatelessWidget {
99
@override
1010
Widget build(BuildContext context) {
1111
return SafeArea(
12-
child: Container(
13-
padding: const EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
14-
decoration: const BoxDecoration(
15-
color: Colors.white,
16-
borderRadius: const BorderRadius.only(
17-
bottomLeft: const Radius.circular(10.0),
18-
bottomRight: const Radius.circular(10.0)),
19-
boxShadow: <BoxShadow>[
20-
const BoxShadow(
21-
color: Colors.black12,
22-
spreadRadius: 10.0,
23-
blurRadius: 20.0)
24-
]),
25-
child: Row(
26-
children: <Widget>[
27-
Container(
28-
child: showGoBack
29-
? IconButton(
30-
icon: const Icon(Icons.chevron_left),
31-
onPressed: () {
32-
Navigator.pop(context);
33-
},
34-
padding: EdgeInsets.zero,
35-
)
36-
: Container(
37-
height: 50.0,
38-
),
39-
),
40-
Expanded(
41-
child: Text(
42-
title,
43-
style: const TextStyle(
44-
fontSize: 25.0, fontWeight: FontWeight.w700),
45-
),
46-
)
47-
],
48-
)));
12+
child: Container(
13+
padding: const EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
14+
decoration: const BoxDecoration(
15+
color: Colors.white,
16+
borderRadius: const BorderRadius.only(
17+
bottomLeft: const Radius.circular(10.0),
18+
bottomRight: const Radius.circular(10.0)),
19+
boxShadow: <BoxShadow>[
20+
const BoxShadow(
21+
color: Colors.black12, spreadRadius: 10.0, blurRadius: 20.0)
22+
]),
23+
child: Row(
24+
children: <Widget>[
25+
Container(
26+
child: showGoBack
27+
? IconButton(
28+
icon: const Icon(Icons.chevron_left),
29+
onPressed: () {
30+
Navigator.pop(context);
31+
},
32+
padding: EdgeInsets.zero,
33+
)
34+
: Container(
35+
height: 50.0,
36+
),
37+
),
38+
Expanded(
39+
child: Text(
40+
title,
41+
style: const TextStyle(
42+
fontSize: 25.0, fontWeight: FontWeight.w700),
43+
),
44+
)
45+
],
46+
),
47+
),
48+
);
4949
}
5050
}
5151

example/lib/screens/examples/rotation_examples.dart

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,17 @@ class GestureRotationExample extends StatelessWidget {
2121
),
2222
Expanded(
2323
child: Container(
24-
margin: const EdgeInsets.symmetric(vertical: 20.0),
25-
height: 300.0,
26-
child: ClipRect(
27-
child: PhotoView(
28-
imageProvider: const AssetImage("assets/large-image.jpg"),
29-
maxScale: PhotoViewComputedScale.covered,
30-
initialScale: PhotoViewComputedScale.contained * 0.8,
31-
enableRotation: true,
32-
),
33-
)),
24+
margin: const EdgeInsets.symmetric(vertical: 20.0),
25+
height: 300.0,
26+
child: ClipRect(
27+
child: PhotoView(
28+
imageProvider: const AssetImage("assets/large-image.jpg"),
29+
maxScale: PhotoViewComputedScale.covered,
30+
initialScale: PhotoViewComputedScale.contained * 0.8,
31+
enableRotation: true,
32+
),
33+
),
34+
),
3435
),
3536
],
3637
),
@@ -66,17 +67,17 @@ class _ProgrammaticRotationExampleState
6667
showGoBack: true,
6768
),
6869
Expanded(
69-
child: Column(
70-
children: <Widget>[
71-
Container(
72-
padding: const EdgeInsets.all(20.0),
73-
child: const Text(
74-
"Example without manual rotation, click the button to rotate",
75-
style: const TextStyle(fontSize: 18.0),
70+
child: Column(
71+
children: <Widget>[
72+
Container(
73+
padding: const EdgeInsets.all(20.0),
74+
child: const Text(
75+
"Example without manual rotation, click the button to rotate",
76+
style: const TextStyle(fontSize: 18.0),
77+
),
7678
),
77-
),
78-
Expanded(
79-
child: Container(
79+
Expanded(
80+
child: Container(
8081
margin: const EdgeInsets.symmetric(vertical: 20.0),
8182
height: 300.0,
8283
child: ClipRect(
@@ -88,10 +89,12 @@ class _ProgrammaticRotationExampleState
8889
initialScale: PhotoViewComputedScale.contained * 0.8,
8990
enableRotation: false,
9091
),
91-
)),
92-
),
93-
],
94-
))
92+
),
93+
),
94+
),
95+
],
96+
),
97+
)
9598
],
9699
),
97100
floatingActionButton: FloatingActionButton(

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ packages:
122122
path: ".."
123123
relative: true
124124
source: path
125-
version: "0.10.0"
125+
version: "0.10.1"
126126
sky_engine:
127127
dependency: transitive
128128
description: flutter

lib/photo_view_gallery.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ class PhotoViewGalleryPageOptions {
333333
childSize = null,
334334
assert(imageProvider != null);
335335

336-
PhotoViewGalleryPageOptions.customChild( {
336+
PhotoViewGalleryPageOptions.customChild({
337337
@required this.child,
338338
this.childSize,
339339
this.heroAttributes,

lib/src/controller/photo_view_controller_delegate.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ mixin PhotoViewControllerDelegate on State<PhotoViewCore> {
6161
}
6262

6363
void addAnimateOnScaleStateUpdate(
64-
void animateScale(double prevScale, double nextScale)) {
64+
void animateScale(double prevScale, double nextScale),
65+
) {
6566
_animateScale = animateScale;
6667
}
6768

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: photo_view
22
description: Photo View provides a gesture sensitive zoomable widget. Photo View is largely used to show interacive images and other stuff such as SVG.
3-
version: 0.10.0
3+
version: 0.10.1
44
homepage: https://github.com/renancaraujo/photo_view
55

66
environment:

0 commit comments

Comments
 (0)