πΌοΈ no_cached_image
no_cached_image is a Flutter package that loads images from the internet without using cache.
Itβs perfect for dynamic or frequently updated content like user avatars, dashboard banners, or time-sensitive visuals.
β Built using Clean Architecture for scalability and maintainability.
π¦ Features
- π« Prevents caching using
Cache-Control
andPragma
headers - π Always fetches the latest image version
- π‘ Cleanly organized with domain/data/presentation layers
- π Easy to customize and extend
π Getting Started
π₯ Installation
Add the following to your pubspec.yaml
:
dependencies:
no_cached_image: ^0.0.2
Then run:
flutter pub get
β Usage
import 'package:no_cache_img/no_cache_img.dart';
NoCacheImg(
imageUrl: 'https://example.com/image.jpg',
width: 200,
height: 200,
fit: BoxFit.cover,
)
π§± Architecture
lib/
βββ core/ # Common exceptions/utilities
βββ data/ # Remote data source & repository implementation
βββ domain/ # Entities, repositories, use cases
βββ presentation/ # UI widget
βββ no_cached_image.dart
π§ Parameters
Property | Type | Description |
---|---|---|
imageUrl |
String |
The network URL of the image |
width |
double? |
Optional width |
height |
double? |
Optional height |
fit |
BoxFit? |
How the image should be inscribed |
π License
MIT License. Β© 2025 Aly Zaafan
πββοΈ Author
Aly Hassan
GitLab: @ialyzaafan