pinch_zoom 1.0.0 icon indicating copy to clipboard operation
pinch_zoom: ^1.0.0 copied to clipboard

A widget based on Flutter's new Interactive Viewer that makes picture pinch zoom, and return to its initial size and position when released.

pinch_zoom #

A widget based on Flutter's new Interactive Viewer that makes picture pinch zoom, and return to its initial size and position when released.

This package offers Instagram based pinch zooming that feels more responsive than other similar packages.

This package is based on the recent Interactive Viewer that Flutter introduced since version 1.20.

The package is designed for zooming in on images, however it can also be used to zoom in on a video.

This pinch zooming is used in my app Palbum:

Example one Example two

Installation #

Add this to your pubspec.yaml dependencies:

pinch_zoom: ^1.0.0

How to use #

Add the widget to your app like this (It automatically takes the size of the image you pass to it):

PinchZoom(
    child: Image.network('https://placekitten.com/640/360'),
    resetDuration: const Duration(milliseconds: 100),
    maxScale: 2.5,
    onZoomStart: (){print('Start zooming');},
    onZoomEnd: (){print('Stop zooming');},
),
136
likes
140
pub points
97%
popularity

Publisher

verified publisher iconjelter.net

A widget based on Flutter's new Interactive Viewer that makes picture pinch zoom, and return to its initial size and position when released.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.ISC (LICENSE)

Dependencies

flutter

More

Packages that depend on pinch_zoom