photo_gallery_viewer 1.0.3
photo_gallery_viewer: ^1.0.3 copied to clipboard
A powerful and customizable Flutter package for displaying photo galleries with support for carousel sliding, zooming, and various indicator styles. Perfect for image viewers, banners, and photo brows [...]
Photo Gallery Viewer #
A powerful and customizable Flutter package for displaying photo galleries with support for carousel sliding, zooming, and various indicator styles. Perfect for image viewers, banners, and photo browsing experiences.
Features #
- πΌοΈ Multi-image Support: Display multiple images with smooth carousel sliding
- π Zoom & Pan: Support for image zooming and panning gestures
- π± Flexible Layout: Customizable width, height, and fit options
- π― Multiple Indicators: Dots and number indicators with customizable styles
- π Infinite Scroll: Optional infinite scrolling for seamless browsing
- π¨ Customizable Styling: Custom borders, indicators, and placeholder widgets
- π± Responsive Design: Works on both mobile and web platforms
- οΏ½οΏ½ High Performance: Optimized for smooth scrolling and image loading
Installation #
Add this to your package's pubspec.yaml file:
dependencies:
photo_gallery_viewer: ^1.0.0
Usages #
Banner View #
class BannerViewExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return PhotoGalleryViewer<String>(
dataList: bannerImages,
imageUrlBuilder: (item) => item,
height: 200,
fit: BoxFit.cover,
scale: 1.0,
indicatorType: IndicatorType.dots,
borderRadius: BorderRadius.circular(12),
infiniteScroll: true,
);
}
}
Full Page Gallery #
class GalleryViewPageExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
extendBodyBehindAppBar: true,
body: PhotoGalleryViewer<String>(
dataList: galleryImages,
imageUrlBuilder: (item) => item,
initialIndex: 0,
enableZoom: true,
isPage: true,
indicatorType: IndicatorType.number,
indicatorAlignment: Alignment.topCenter,
),
);
}
}
Dependencies #
This package depends on:
photo_view: ^0.15.0- For image viewing and zoomingcarousel_slider: ^5.1.1- For carousel functionalitydots_indicator: ^4.0.1- For page indicators
Contributing #
Contributions are welcome! Please feel free to submit a Pull Request.
License #
This project is licensed under the MIT License - see the LICENSE file for details.