Search categories, packages and repositories

pinch_zoom cover
Package detailsv2.0.1

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.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
11.6K
Likes
221
Pub points
150

Install package

flutter pub add pinch_zoom

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

PinchZoom is a Flutter package that enables intuitive pinch-to-zoom functionality for images using Flutter's InteractiveViewer. It allows users to scale and pan images with touch gestures, automatically returning them to their original size and position when the gesture ends. Designed for simplicity and smooth performance across platforms, it integrates seamlessly into image viewing interfaces. The package supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux, making it ideal for cross-platform applications requiring interactive image exploration.

Use cases

  • Interactive image viewers
  • Photo galleries
  • Document zooming
  • Educational apps with diagrams
  • E-commerce product images

Key features

  • Gesture-based pinch zoom
  • Automatic reset to initial state
  • Cross-platform compatibility
  • Smooth animation transitions
  • Built on Flutter's InteractiveViewer

Suitable for

  • Developers building image-heavy apps
  • Apps requiring intuitive image navigation
  • Cross-platform image interaction features
  • Educational or presentation tools
  • Mobile-first design with touch support

Considerations

  • May require optimization for large images
  • Performance depends on device capabilities
  • Limited customization beyond basic zoom behavior
  • Not suitable for non-image content
  • Requires proper handling of image loading states

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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.1

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://placecats.com/640/360'),
    maxScale: 2.5,
    onZoomStart: (){print('Start zooming');},
    onZoomEnd: (){print('Stop zooming');},
),

Categories

Source repository

Projects using this package