Skip to content

donaldamadi/multi-image-viewer

Repository files navigation

Description

Experience dynamic image layout capabilities with this Flutter package. Effortlessly integrate single or multiple images and observe the adaptive layout transformation in real-time. Enhanced with caption support for each image, it offers both versatility and precision for developers keen on superior UI experiences.

Screenshot_1656283282

Screenshot_1656283292

Getting started

import 'package:multi_image_layout/multi_image_viewer.dart';

iOS

Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

  • NSPhotoLibraryAddUsageDescription - describe why your app needs permission for the photo library. This is called Privacy - Photo Library Usage Description in the visual editor.

Android

You need to ask for storage permission to save an image to the gallery. You can handle the storage permission using flutter_permission_handler package.

  • android.permission.WRITE_EXTERNAL_STORAGE - Permission for usage of external storage
<application android:requestLegacyExternalStorage="true" .....>

Usage

import 'package:multi_image_layout/multi_image_viewer.dart';
MultiImageViewer(
  images: [
    ImageModel(
      imageUrl: "https://4.img-dpreview.com/files/p/TS250x250~sample_galleries/3800753625/4684313123.jpg",
      caption: "Caption 1",
    ),
    ImageModel(
      imageUrl: "https://3.img-dpreview.com/files/p/TS250x250~sample_galleries/3800753625/8719688791.jpg",
      caption: "Caption 2",
    ),
  ],
  height: 200,
  width: 200,
),

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a 👍 if you like this project!

📝 License

This project is MIT licensed.

About

Flutter Package that shows multiple images with different layouts

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •