Skip to content

Commit 9560b0f

Browse files
implemented ImagePickerManager to Improved separation of concerns across service, manager, and UI layers.
1 parent 8482715 commit 9560b0f

File tree

3 files changed

+31
-10
lines changed

3 files changed

+31
-10
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## 0.0.6 – Jul 7, 2025
6+
7+
### ✨ Added
8+
9+
- `ImagePickerManager` class:
10+
- `MountedCheck` typedef for safe context handling across async gaps.
11+
12+
### ✅ Updated
13+
14+
- `ImagePickerCubit` now offloads side-effect operations to the manager layer.
15+
16+
### 🛠️ Refactored
17+
18+
- Restructured cropper service:
19+
- Improved separation of concerns across service, manager, and UI layers.
20+
21+
---
22+
23+
524
## 0.0.5 – Jul 7, 2025
625

726
### ✅ Updated

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,18 @@ AppImagePicker(
155155
Register services and cubit using `GetIt`:
156156

157157
```dart
158-
void registerReusableImageWidgetDependencies() {
159-
sl.registerLazySingleton<AppImagePickerService>(() => AppImagePickerService());
160-
sl.registerLazySingleton<IImageCropperService>(() => AppImageCropperService());
161-
sl.registerLazySingleton<IImageCompressorService>(() => AppImageCompressorService());
162-
sl.registerFactory(() => ImagePickerCubit(
163-
pickerService: sl<AppImagePickerService>(),
164-
cropperService: sl<IImageCropperService>(),
165-
compressorService: sl<IImageCompressorService>(),
166-
));
158+
void main() {
159+
registerReusableImageWidgetDependencies();
160+
initReusableImageWidgetBlocProvider();
161+
162+
runApp(
163+
MultiBlocProvider(
164+
providers: reusableImageWidgetBlocProviders,
165+
child: const MyApp(),
166+
),
167+
);
167168
}
169+
168170
```
169171

170172
Wrap your app with the cubit provider:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: reusable_image_widget
22
description: "A reusable Flutter widget library for picking, cropping, compressing, and displaying images from gallery, camera, or network with full-screen preview support."
3-
version: 0.0.5
3+
version: 0.0.6
44
homepage: https://github.com/GenieCoderSrc/reusable_image_widget
55
repository: https://github.com/GenieCoderSrc/reusable_image_widget
66
issue_tracker: https://github.com/GenieCoderSrc/reusable_image_widget/issues

0 commit comments

Comments
 (0)