universal_images_plus
A Flutter widget to load any type of image easily – Network, Asset, SVG, Base64, and even fallback placeholder – with a single widget.
🚀 Features
- Load Network Images with caching
- Load Asset Images
- Load SVG Images (assets)
- Load Base64 Images
- Built-in placeholder & error fallback (local asset)
- Circular or custom border radius
- Color tint support
📦 Installation
Add to your pubspec.yaml:
dependencies:
universal_images: ^0.0.1
🔧 Usage
1. Network Image
UniversalImage(
imagePath: 'https://picsum.photos/200',
height: 80,
width: 80,
isCircular: true,
)
2. Asset Image
UniversalImage(
imagePath: 'assets/images/local_image.png',
height: 60,
width: 60,
borderRadius: 0,
)
3. SVG Asset
UniversalImage(
imagePath: 'assets/icons/icon.svg',
height: 40,
width: 40,
fit: BoxFit.contain,
)
4. Base64 Image
UniversalImage(
imagePath: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...',
height: 50,
width: 50,
)
5. No Image / Invalid Image
UniversalImage(
imagePath: '',
height: 50,
width: 50,
)
UniversalImage()