kaboc/flutter_ddd
49.8
Weak · 21 September 2026
1.6k
lines of production code
Dart
primary language
4
measurements over time
What this system is
This system is a cross-platform mobile application for managing notes and categories, built with Flutter. It implements a clean architecture with distinct layers for domain, application, and infrastructure, utilizing dependency injection and state management via the Provider package. The application supports creating, editing, and deleting notes and categories, with robust error handling and transactional database operations.
Behavioural changes
Centralized dependency injection and app initialization
The application entry point has been refactored to use a centralized dependency injection setup via MultiProvider, registering services such as DbHelper, CategoryRepository, NoteRepository, and CategoryNotifier. An AppInit class now handles the initial navigation to the CategoryListPage, replacing the previous inline provider and direct page rendering in main.dart.
lib · high confidence
Database helper refactored to support transactions and raw SQL
The DbHelper class has been refactored to support database transactions and raw SQL execution. A new transaction method allows wrapping operations in a transaction, while rawQuery, rawInsert, and rawDelete methods enable direct SQL execution. The class also includes a dispose method for cleanup. These changes improve database operation safety and flexibility for users interacting with the local storage layer.
lib/infrastructure · medium confidence
Domain entities and value objects made immutable with improved hash codes
All domain entities (Category, Note) and value objects (CategoryId, CategoryName, NoteId, NoteTitle, NoteBody) are now annotated with @immutable and have their constructors simplified by removing runtime assert() checks, relying instead on the Dart compiler's static analysis. Constructors for entities and value objects now use named parameters for better readability. Additionally, the hashCode implementation for all these classes has been updated to include the runtime type, providing a more robust hash code that distinguishes between different types with the same internal state, while equality checks remain based on identity or specific fields.
lib/domain · high confidence
Enforce database transactions and improve exception handling in application services
The Category and Note application services now wrap their database operations in explicit transactions, ensuring that changes to categories or notes are either fully committed or fully rolled back, rather than executing individual save/remove calls independently. Additionally, exception handling has been improved by using structured exception objects with specific codes and values instead of generic messages, and method names have been updated (e.g., 'register' to 'save') to better reflect the operations performed.
lib/application · high confidence
Migrate from manual dependency construction to Provider-based state management
The presentation layer has been refactored to use the Provider package for state management, replacing manual instantiation of app services and change notifiers. In the category list, the CategoryModel has been renamed to CategoryNotifier and moved to a new notifier directory, with the UI simplified to use ChangeNotifierProvider. Similarly, the NoteModel has been renamed to NoteNotifier, and the note list page now injects the NoteAppService and repository directly within the provider setup. Widget names have also been updated (e.g., CategoryRegisterButton to CategoryAddButton) to reflect the shift from 'register' to 'save/add' terminology.
lib/presentation/page · high confidence
Migrate note widgets to use Notifier classes instead of Model classes
The note presentation widgets have been refactored to use the new Notifier classes (e.g., NoteNotifier, CategoryNotifier) instead of the previous Model classes (e.g., NoteModel, CategoryModel). This change updates the widget hierarchy to consume state via the new Notifier pattern, replacing direct model access with provider-based state management. Additionally, the remove confirmation dialog has been extracted into a dedicated NoteRemoveDialog widget, and button widgets have been renamed (e.g., NoteRegisterButton to NoteAddButton, NoteUpdateButton to NoteEditButton) to better reflect their actions.
lib/presentation/widget/note · high confidence
Refactor category widgets to use CategoryNotifier and extract dialogs
Category UI components (add, edit, remove, and list views) have been updated to consume the CategoryNotifier via context.read() instead of the previous CategoryModel/Provider pattern. Dialogs (remove, edit, and error) have been refactored from static helper classes into reusable StatelessWidget widgets with a .show() method, improving consistency and error handling for category operations.
lib/presentation/widget/category · medium confidence
Refactor note and category repositories to use constructor injection and named parameters
The note and category repositories have been refactored to use constructor injection for the DbHelper dependency, replacing the previous static singleton pattern. This change improves testability and aligns with modern dependency injection practices. Additionally, the create methods in the factories now use named parameters with @required annotations, and the repository methods have been updated to use named parameters for query arguments. The code also includes a rename of the 'infrastracture' directory to 'infrastructure' to fix a typo.
lib/infrastructure/note · medium confidence
Refactored exception handling with structured error codes and messages
The common exception handling has been refactored to use structured error codes and improved message formatting. GenericException now accepts an ExceptionCode and optional info, replacing the previous simple message string. Each specific exception (NotFoundException, NotUniqueException, NullEmptyException, LengthException, RemovalException) now provides a clear, formatted error message based on the exception code. This change improves error clarity and consistency across the application.
lib/common · medium confidence
Update iOS app name and update Swift version
The iOS application name has been changed from 'flutter\_ddd' to 'Notes' in the Info.plist. Additionally, the project's Swift version has been upgraded from 4.0 to 5.0, and the Xcode project configuration has been updated to include CocoaPods support with the addition of the 'Pods' and 'Frameworks' groups, along with corresponding build phases for checking and embedding pods.
ios · high confidence
Updated Android Gradle wrapper and migrated to Flutter embedding v2
The Android build environment has been upgraded, specifically updating the Gradle wrapper from version 4.10.2 to 5.6.2. Additionally, the AndroidManifest.xml has been updated to include the 'flutterEmbedding' meta-data with a value of '2', and the MainActivity has been modified to use the new FlutterEngine-based plugin registration method, aligning with the Flutter embedding v2 architecture.
android · medium confidence
Test coverage
Added test helper methods to repository implementations; Updated tests for category and note services to use flutter\_test and reflect API changes.
Dependencies
Updated Dart and Android dependencies
The project's Dart dependencies have been updated, including provider to v4.3.0, sqflite to v1.3.1, and uuid to v2.2.0, with the Dart SDK requirement raised to v2.7.0. On the Android side, the build configuration has been upgraded to support AndroidX (enabling R8 and Jetifier) and updated to use AndroidX test libraries (androidx.test:runner:1.1.1, androidx.test.espresso:espresso-core:3.1.1) and Kotlin 1.3.50.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 47 → 50 (+2.7)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 99 (-1.2)
- Architecture 100 → 94 (-6.3)
- Maturity 31 → 42 (+10.9)
- Readiness 24 → 26 (+1.4)
- Security 98 → 98 (+0.5)
- Domain Modelling 100 → 100 (+0.0)
Resolved (7)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- High CVE: [GHSA redacted] (pubspec.lock)
- No exposed public API
- Test reliability not included
- complexity unreadable for .dart, .kt, .swift — churn × complexity hotspots could not be measured
- single-maintainer — knowledge-concentration (bus factor) risk
New (12)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Documentation: no installation or build instructions (README.md)
- Duplicated block (12 lines × 2) (lib/presentation/widget/category/remove_dialog.dart)
- Duplicated block (14 lines × 2) (lib/presentation/widget/category/edit_dialog.dart)
- Duplicated block (14–15 lines × 2) (lib/presentation/widget/category/remove_dialog.dart)
- Duplicated block (15 lines × 2) (lib/presentation/widget/category/category_list_view.dart)
- Duplicated block (7 lines × 2) (lib/infrastructure/category/category_repository.dart)
- Duplicated block (8–10 lines × 4) (lib/presentation/widget/category/edit_dialog.dart)
- High CVE: [GHSA redacted] (pubspec.lock)
- Low cohesion: Note (LCOM4 4) (lib/domain/note/note.dart)
- Members sharing a duplicated core (4 members, 50+ identical tokens) (lib/presentation/widget/category/edit_dialog.dart)
- No ADRs found
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
kaboc/flutter_ddd was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit b4d223a824e0eff8e9dbf23469b61ad05d62e59d — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.