Photo Zoom & Gallery Package for Flutter

zoomable_photo

A free, open-source Flutter package for zoomable photos and galleries on touch screens, trackpads and the web.

zoomable_photo example app
Built with
  • Flutter
  • Dart
  • Custom gestures
  • Animations
  • pub.dev
Platforms
Android, iOS, Web, Windows, macOS, Linux
Year
2026

What it does

  1. Pinch to zoom on touch screens and trackpads, and mouse-wheel zoom at the pointer on desktop and the web.

  2. Double-tap to zoom in exactly where you tap, and again to zoom back out.

  3. Drag a zoomed photo with momentum. Zooming stretches a little past its limits and springs back.

  4. A gallery that works while zoomed: dragging moves the photo, and once its edge is in view the next drag turns the page.

  5. Looping galleries, a gap between photos while swiping, arrow-key navigation, and controllers for your own buttons.

  6. Any image or widget, with loading and error builders, Hero animations and screen reader labels, and no dependencies beyond Flutter.

How it’s built

ZoomablePhoto keeps its zoom and position in one small value, PhotoTransform. A separate piece of geometry works out where the photo sits in its view and stops it from being dragged out of sight.

The package imports Flutter’s widgets layer, not material.dart, which makes it usable in Material, Cupertino and plain-widget apps. PhotoGallery builds on a page view, with half a gap on each side of every page so photos sit edge to edge at rest and separate while swiping.

Hardest part

A zoomed photo and the gallery both want the same drag. A custom gesture recognizer decides early, at half the normal touch distance and before the page view can claim the gesture: it takes the drag when the photo can still move that way. When the photo already shows its edge, it steps aside and the page turns. Two fingers always pinch.

Next projectVision Voice AIAI Speech, Image & Video App