all_image_handler

A smart Flutter image handler package that automatically detects image sources (network, asset, file, memory) and displays them with advanced features like caching, shimmer loading, retry support, and hero animations.


✨ Features

  • πŸ” Automatic image source detection (Network / Asset / File / Memory)
  • ⚑ Fast loading with caching support
  • ✨ Shimmer loading effect
  • πŸ” Retry button on load failure
  • 🧱 Custom error widget support
  • 🦸 Hero animation support
  • 🎯 Clean and simple API
  • πŸ“± Works on Android, iOS, Web, Windows, macOS, Linux

πŸš€ Installation

Add this to your pubspec.yaml:

dependencies:
  all_image_handler: ^0.0.1

Then run:

flutter pub get

πŸ“¦ Import

import 'package:all_image_handler/all_image_handler.dart';

πŸ–ΌοΈ Basic Usage

AllImage(
  image: 'https://example.com/image.jpg',
)

🧠 Auto Detection

No need to specify image type πŸ‘‡

AllImage(image: 'https://example.com/image.jpg'); // Network
AllImage(image: 'assets/images/logo.png'); // Asset
AllImage(image: file.path); // File
AllImage(image: memoryBytes); // Memory

🎨 Advanced Usage

AllImage(
  image: 'https://example.com/image.jpg',
  width: 200,
  height: 200,
  fit: BoxFit.cover,

  showShimmer: true,
  enableCache: true,

  heroTag: 'imageHero',

  errorWidget: Icon(Icons.error),
)

πŸ” Retry on Error

AllImage(
  image: 'https://wrong-url.com/image.jpg',
  showRetry: true,
)

✨ Shimmer Loading

AllImage(
  image: 'https://example.com/image.jpg',
  showShimmer: true,
)

🦸 Hero Animation

AllImage(
  image: 'https://example.com/image.jpg',
  heroTag: 'myImage',
)

βš™οΈ Options Overview

Property Type Description
image dynamic Image source (auto-detected)
width double Width of image
height double Height of image
fit BoxFit Image fit
showShimmer bool Show shimmer while loading
enableCache bool Enable caching for network images
showRetry bool Show retry button on error
errorWidget Widget Custom error widget
heroTag String Enable hero animation

πŸ“Έ Screenshots

alt text


πŸ§ͺ Example

Check the /example folder for a complete working demo.


🀝 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.


πŸ“„ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Author

Md Araful Islam
Flutter Developer with 2+ years of experience in building scalable mobile applications, real-time features, and production-ready apps for App Store & Play Store.

πŸ”— LinkedIn: https://linkedin.com/in/your-profile πŸ“§ Email: rajuslam39@gmail.com
🌐 Portfolio: https://araful39.netlify.app/
πŸ’» GitHub: https://github.com/araful39


⭐ Support

If you like this package, please ⭐ star the repo and share it with others!


Libraries

all_image_handler