Image Grid View
Grid view widget for single images.
Documentation
Using similar APIs as the core Material library:
- GridImageView.memory
- GridImageView.file
- GridImageView.network
- GridImageView.asset
Parameters
- width / height: The width and height of the image (at least one of them must be specified).
- verticalCount: Number of images per row.
- horizontalCount: Number of images per column.
- caseBuilder: Function builder for the sub-image.
- placeholder: Placeholder widget for the whole grid view.
- selectedDecoration: BoxDecoration for the selected image.
- unselectedDecoration: BoxDecoration for the unselected image(s).
- onTap: Callback function when an image is tapped.
- onLongPress: Callback function when an image is long pressed.
- selectionStream: Stream of Uint8List of the selected image.
- tryThreading: Whether to try to use threads to load images (recommended to avoid UI blocking).
- quality: Quality (in %) of the image after resizing (if necessary). Default is 100.
Specifications
- Linux: Tested & stable
- Web: Tested & stable
- Windows: Not tested yet
- MacOS: Not tested yet
- iOS: Not tested yet
- Android: Not tested yet
Requirements
Quickstart
Download the example app and run it.
git clone https://github.com/byjtew/image_grid_view.git
cd image_grid_view/example
flutter pub get
flutter run
Contributing
This development of this package is still active.
Feel free to fork this repository and make a pull request. If you have any questions, please open an issue.