Skip to content

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

License

Notifications You must be signed in to change notification settings

tkortekaas/pinch_zoom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pinch_zoom

A widget based on Flutter's 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.

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

Example one Example two

Installation

Add this to your pubspec.yaml dependencies:

pinch_zoom: ^2.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'),
    maxScale: 2.5,
    onZoomStart: (){print('Start zooming');},
    onZoomEnd: (){print('Stop zooming');},
),

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published