image_uploader 0.0.7
image_uploader: ^0.0.7 copied to clipboard
A modular and extensible Dart package for uploading and deleting images using Firebase Storage or REST APIs. Built with clean architecture principles and easy-to-integrate dependency injection support.
Changelog #
All notable changes to this project will be documented in this file.
0.0.6 #
0.0.4 #
Jul 29, 2025 #
π§ Changed #
-
Removed all implementation layers except the domain layer for file/image handling to improve decoupling and testability.
-
Centralized registration of image upload data source using
registerImageUploaderGetItDi()with enumFileUploaderSourceType.- Enables switching between
restApiandfirebaseStorageeasily.
- Enables switching between
π Added #
- Enum
FileUploaderSourceTypefor selecting upload strategy. registerImageUploaderGetItDi()method to abstract the DI setup based on the enum value.
β Aligns with SOLID principles (especially OCP & SRP) to allow scalable and flexible data source management.
0.0.3 #
Jul 6, 2025 #
π Added #
-
Introduced
BaseImageManager<TData>abstract class to standardize image upload and delete behavior.uploadIfAvailable(...)β handles safe upload when file and entityId are provided.deleteIfAvailable(...)β handles conditional deletion if a URL is present.- Uses
Either<IFailure, bool>for clean failure handling viai_tddandexception_type. - Leverages
.handleReport()for optional success message reporting after operations.
β Designed with SOLID principles to promote reusability and simplify extending image upload logic across platforms ( Firebase, REST, etc).
0.0.2 #
π Added #
- Upload and delete functionality using Firebase Storage.
- Upload and delete functionality using a REST API.
- File model (
FileEntity,FileResponseEntity). - Repository pattern with
IFileRepositoryabstraction. - Use cases:
UploadFile,DeleteFile. - Dependency injection setup for both Firebase and REST API.
- Extension on
Uint8Listfor uploading to Firebase Storage. - Example app demonstrating image picking and uploading.