https://github.com/farhansadikgalib/any_image_view
A special Flutter package for displaying all kinds of images, including jpg, png, SVG, lottie, and XFile, including network images with caching. Customizing options for image properties and interaction makes it simple to integrate into your Flutter projects.
https://github.com/farhansadikgalib/any_image_view
flutter imageview lottie svg
Last synced: 4 months ago
JSON representation
A special Flutter package for displaying all kinds of images, including jpg, png, SVG, lottie, and XFile, including network images with caching. Customizing options for image properties and interaction makes it simple to integrate into your Flutter projects.
- Host: GitHub
- URL: https://github.com/farhansadikgalib/any_image_view
- Owner: farhansadikgalib
- License: mit
- Created: 2024-05-11T16:20:16.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-15T17:29:14.000Z (5 months ago)
- Last Synced: 2026-01-15T20:08:42.348Z (5 months ago)
- Topics: flutter, imageview, lottie, svg
- Language: Dart
- Homepage: https://pub.dev/packages/any_image_view
- Size: 5.66 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 🖼️ Any Image View
[](https://pub.dev/packages/any_image_view)
[](LICENSE)
**One widget for all image types** — Network, Assets, SVG, Lottie, XFile with built-in shimmer loading & error handling.
## Installation
```yaml
dependencies:
any_image_view: ^2.0.0
```
## Usage
```dart
import 'package:any_image_view/any_image_view.dart';
// Network
AnyImageView(imagePath: 'https://example.com/image.jpg', height: 200, width: 200)
// Asset
AnyImageView(imagePath: 'assets/image.png', height: 200, width: 200)
// SVG
AnyImageView(imagePath: 'assets/icon.svg', height: 40, width: 40)
// Lottie
AnyImageView(imagePath: 'assets/animation.json', height: 100, width: 100)
// XFile (Image Picker)
AnyImageView(imagePath: xFile, height: 200, width: 200)
// Circular Avatar
AnyImageView(imagePath: url, height: 80, width: 80, shape: BoxShape.circle)
// With Options
AnyImageView(
imagePath: url,
height: 200,
width: 200,
fit: BoxFit.cover,
borderRadius: BorderRadius.circular(12),
enableZoom: true,
placeholderWidget: CircularProgressIndicator(),
errorWidget: Icon(Icons.error),
)
```
## Parameters
| Parameter | Type | Description |
|-----------|------|-------------|
| `imagePath` | `Object?` | URL, asset path, or XFile |
| `height` / `width` | `double?` | Dimensions |
| `fit` | `BoxFit?` | Image fit (default: cover) |
| `shape` | `BoxShape` | rectangle or circle |
| `borderRadius` | `BorderRadius?` | Rounded corners |
| `enableZoom` | `bool` | Pinch-to-zoom (default: false) |
| `placeholderWidget` | `Widget?` | Custom loader |
| `errorWidget` | `Widget?` | Custom error |
| `httpHeaders` | `Map?` | Auth headers |
## Supported Formats
PNG, JPG, WebP, GIF, SVG, Lottie (.json), TIFF, RAW, HEIC, BMP, ICO
## Platform Support
✅ Android · ✅ iOS · ✅ Web · ✅ macOS · ✅ Windows · ✅ Linux
---
Made with ❤️ by Farhan Sadik Galib