Skip to main content

smooth_image_viewer 0.1.0 copy "smooth_image_viewer: ^0.1.0" to clipboard
smooth_image_viewer: ^0.1.0 copied to clipboard

A lightweight Flutter image viewer with gesture dismissal, paging, zoom, and Hero transitions.

smooth_image_viewer #

A lightweight Flutter image viewer with paging, zoom, gesture dismissal, Hero return transitions, and optional thumbnail-first rendering.

Features #

  • Single-image and multi-image viewing from ImageProviders.
  • Page swiping, double-tap zoom, and pinch zoom.
  • Pull down to dismiss with scale and background fade.
  • Optional Hero return animation for the current image.
  • Double-tap zoom between 1x and 2x, centered on the tap position.
  • Circle, uniform rounded-corner, and per-corner Hero shapes.
  • Optional low-resolution previewProviders for a fast first frame.
  • No networking, caching, state-management, or UI dependencies.

Usage #

ImageViewerHero(
  tag: 'avatar-1',
  shape: const ImageViewerShape.circle(),
  child: Image(image: avatarProvider, fit: BoxFit.cover),
)

For independent corner radii, use ImageViewerShape.roundedCorners(...).

ImageViewerRoute.open(
  context,
  images: <ImageProvider<Object>>[avatarProvider],
  initialIndex: 0,
  heroTags: const <Object?>['avatar-1'],
  previewProviders: <ImageProvider<Object>?>[avatarThumbnailProvider],
);

The package accepts ImageProviders so applications can choose their own network and disk-cache implementation.

Example #

Run the interactive gallery from the package root:

cd example
flutter run
1
likes
0
points
629
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight Flutter image viewer with gesture dismissal, paging, zoom, and Hero transitions.

Repository (GitHub)
View/report issues

Topics

#image-viewer #photo-viewer #gestures #hero-animation

License

unknown (license)

Dependencies

flutter

More

Packages that depend on smooth_image_viewer