diff --git a/example/lib/screens/common/app_bar.dart b/example/lib/screens/common/app_bar.dart index 38f02b12..98af2f6e 100644 --- a/example/lib/screens/common/app_bar.dart +++ b/example/lib/screens/common/app_bar.dart @@ -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: [ - const BoxShadow( - color: Colors.black12, - spreadRadius: 10.0, - blurRadius: 20.0) - ]), - child: Row( - children: [ - 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: [ + const BoxShadow( + color: Colors.black12, spreadRadius: 10.0, blurRadius: 20.0) + ]), + child: Row( + children: [ + 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), + ), + ) + ], + ), + ), + ); } } diff --git a/example/lib/screens/examples/rotation_examples.dart b/example/lib/screens/examples/rotation_examples.dart index 4cb8e9b8..6d3a9dd2 100644 --- a/example/lib/screens/examples/rotation_examples.dart +++ b/example/lib/screens/examples/rotation_examples.dart @@ -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, + ), + ), + ), ), ], ), @@ -66,17 +67,17 @@ class _ProgrammaticRotationExampleState showGoBack: true, ), Expanded( - child: Column( - children: [ - 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: [ + 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( @@ -88,10 +89,12 @@ class _ProgrammaticRotationExampleState initialScale: PhotoViewComputedScale.contained * 0.8, enableRotation: false, ), - )), - ), - ], - )) + ), + ), + ), + ], + ), + ) ], ), floatingActionButton: FloatingActionButton( diff --git a/example/pubspec.lock b/example/pubspec.lock index 6b21fe6f..a3aed0a2 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -122,7 +122,7 @@ packages: path: ".." relative: true source: path - version: "0.10.0" + version: "0.10.1" sky_engine: dependency: transitive description: flutter diff --git a/lib/photo_view_gallery.dart b/lib/photo_view_gallery.dart index 7b269946..e6bb7efc 100644 --- a/lib/photo_view_gallery.dart +++ b/lib/photo_view_gallery.dart @@ -333,7 +333,7 @@ class PhotoViewGalleryPageOptions { childSize = null, assert(imageProvider != null); - PhotoViewGalleryPageOptions.customChild( { + PhotoViewGalleryPageOptions.customChild({ @required this.child, this.childSize, this.heroAttributes, diff --git a/lib/src/controller/photo_view_controller_delegate.dart b/lib/src/controller/photo_view_controller_delegate.dart index 6cdbccbd..bd9e04e5 100644 --- a/lib/src/controller/photo_view_controller_delegate.dart +++ b/lib/src/controller/photo_view_controller_delegate.dart @@ -61,7 +61,8 @@ mixin PhotoViewControllerDelegate on State { } void addAnimateOnScaleStateUpdate( - void animateScale(double prevScale, double nextScale)) { + void animateScale(double prevScale, double nextScale), + ) { _animateScale = animateScale; } diff --git a/pubspec.yaml b/pubspec.yaml index 083d0697..e0822768 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: