An easy way to display images in a full-screen dialog, including pinch & zoom.

Pub Tests

Easy Image Viewer Demo


  • Show a single image or a swipeable list of images
  • Use pinch & zoom to zoom in and out of images
  • Optionally allow "swipe down to dismiss" by passing in swipeDismissible: true
  • No dependencies besides Flutter
  • Callbacks for onPageChanged and onViewerDismissed


Show a Gallery image:

final List<ImageProvider> _imageProviders = ["").image,"").image,"").image,"").image,"").image
  listImage: _imageProviders,
  width: 200,
  height: 200,
  imageDecoration: BoxDecoration(border: Border.all(color: Colors.white)),

Show a single image:

final imageProvider ="").image;
showImageViewer(context, imageProvider, onViewerDismissed: () {

Show a bunch of images:

MultiImageProvider multiImageProvider = MultiImageProvider(["").image,"").image,"").image,"").image

showImageViewerPager(context, multiImageProvider, onPageChanged: (page) {
  print("page changed to $page");
}, onViewerDismissed: (page) {
  print("dismissed while on page $page");

Usually you'll want to implement your own EasyImageProvider. Suppose you have a list of Products, each of which has an imagePath property with the path to a local image file. You could create an EasyImageProvider that takes a list of Products like this:

class ProductsImageProvider extends EasyImageProvider {

  final List<Product> products;
  final int initialIndex;

  ProductsImageProvider({ required this.products, this.initialIndex = 0 });

  ImageProvider<Object> imageBuilder(BuildContext context, int index) {
    String? localImagePath = products[index].imagePath;
    File? imageFile;

    if (localImagePath != null) {
      imageFile = File(localImagePath);

    ImageProvider imageProvider = imageFile != null ? FileImage(imageFile) : AssetImage("assets/images/product_placeholder.jpg") as ImageProvider;

    return imageProvider;

  int get imageCount => products.length;

You could then use it like this:

ProductsImageProvider productsImageProvider = ProductsImageProvider(products: products);

showImageViewerPager(context, productsImageProvider, onPageChanged: (page) {
  print("page changed to $page");
}, onViewerDismissed: (page) {
  print("dismissed while on page $page");


GalleryImageViewer is custom from EasyImageViewer. EasyImageViewer is a project by TSG, a full-service digital agency taking software from concept to launch. Our powerhouse team of designers and engineers build iOS, Android, and web apps across many industries.


A library to easily display images in a full-screen dialog. It supports pinch & zoom, and paging through multiple images.