Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.10.1 - release candidate #317

Merged
merged 1 commit into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 37 additions & 37 deletions example/lib/screens/common/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,43 @@ class ExampleAppBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SafeArea(
child: Container(
padding: const EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.only(
bottomLeft: const Radius.circular(10.0),
bottomRight: const Radius.circular(10.0)),
boxShadow: <BoxShadow>[
const BoxShadow(
color: Colors.black12,
spreadRadius: 10.0,
blurRadius: 20.0)
]),
child: Row(
children: <Widget>[
Container(
child: showGoBack
? IconButton(
icon: const Icon(Icons.chevron_left),
onPressed: () {
Navigator.pop(context);
},
padding: EdgeInsets.zero,
)
: Container(
height: 50.0,
),
),
Expanded(
child: Text(
title,
style: const TextStyle(
fontSize: 25.0, fontWeight: FontWeight.w700),
),
)
],
)));
child: Container(
padding: const EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0),
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: const BorderRadius.only(
bottomLeft: const Radius.circular(10.0),
bottomRight: const Radius.circular(10.0)),
boxShadow: <BoxShadow>[
const BoxShadow(
color: Colors.black12, spreadRadius: 10.0, blurRadius: 20.0)
]),
child: Row(
children: <Widget>[
Container(
child: showGoBack
? IconButton(
icon: const Icon(Icons.chevron_left),
onPressed: () {
Navigator.pop(context);
},
padding: EdgeInsets.zero,
)
: Container(
height: 50.0,
),
),
Expanded(
child: Text(
title,
style: const TextStyle(
fontSize: 25.0, fontWeight: FontWeight.w700),
),
)
],
),
),
);
}
}

Expand Down
51 changes: 27 additions & 24 deletions example/lib/screens/examples/rotation_examples.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ class GestureRotationExample extends StatelessWidget {
),
Expanded(
child: Container(
margin: const EdgeInsets.symmetric(vertical: 20.0),
height: 300.0,
child: ClipRect(
child: PhotoView(
imageProvider: const AssetImage("assets/large-image.jpg"),
maxScale: PhotoViewComputedScale.covered,
initialScale: PhotoViewComputedScale.contained * 0.8,
enableRotation: true,
),
)),
margin: const EdgeInsets.symmetric(vertical: 20.0),
height: 300.0,
child: ClipRect(
child: PhotoView(
imageProvider: const AssetImage("assets/large-image.jpg"),
maxScale: PhotoViewComputedScale.covered,
initialScale: PhotoViewComputedScale.contained * 0.8,
enableRotation: true,
),
),
),
),
],
),
Expand Down Expand Up @@ -66,17 +67,17 @@ class _ProgrammaticRotationExampleState
showGoBack: true,
),
Expanded(
child: Column(
children: <Widget>[
Container(
padding: const EdgeInsets.all(20.0),
child: const Text(
"Example without manual rotation, click the button to rotate",
style: const TextStyle(fontSize: 18.0),
child: Column(
children: <Widget>[
Container(
padding: const EdgeInsets.all(20.0),
child: const Text(
"Example without manual rotation, click the button to rotate",
style: const TextStyle(fontSize: 18.0),
),
),
),
Expanded(
child: Container(
Expanded(
child: Container(
margin: const EdgeInsets.symmetric(vertical: 20.0),
height: 300.0,
child: ClipRect(
Expand All @@ -88,10 +89,12 @@ class _ProgrammaticRotationExampleState
initialScale: PhotoViewComputedScale.contained * 0.8,
enableRotation: false,
),
)),
),
],
))
),
),
),
],
),
)
],
),
floatingActionButton: FloatingActionButton(
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.10.0"
version: "0.10.1"
sky_engine:
dependency: transitive
description: flutter
Expand Down
2 changes: 1 addition & 1 deletion lib/photo_view_gallery.dart
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class PhotoViewGalleryPageOptions {
childSize = null,
assert(imageProvider != null);

PhotoViewGalleryPageOptions.customChild( {
PhotoViewGalleryPageOptions.customChild({
@required this.child,
this.childSize,
this.heroAttributes,
Expand Down
3 changes: 2 additions & 1 deletion lib/src/controller/photo_view_controller_delegate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ mixin PhotoViewControllerDelegate on State<PhotoViewCore> {
}

void addAnimateOnScaleStateUpdate(
void animateScale(double prevScale, double nextScale)) {
void animateScale(double prevScale, double nextScale),
) {
_animateScale = animateScale;
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: photo_view
description: Photo View provides a gesture sensitive zoomable widget. Photo View is largely used to show interacive images and other stuff such as SVG.
version: 0.10.0
version: 0.10.1
homepage: https://github.com/renancaraujo/photo_view

environment:
Expand Down