rrousselGit/flutter_hooks
68.8
Adequate · 23 September 2026
3.5k
lines of production code
Dart
primary language
5
measurements over time
What this system is
This system is a Flutter library that provides a React-style hooks API for managing widget lifecycle and state. It offers a comprehensive suite of hooks for handling controllers, async state, and utility functions, alongside a multi-package structure that includes an interactive example app and extensive test coverage.
Features
Add Flutter Hooks example app with interactive demos
The \packages/flutter\_hooks/example\ directory now contains a complete Flutter application that serves as a gallery of examples for the library. It includes interactive demos for \useState\, \useReducer\, \useStream\, and \useEffect\, as well as a custom hook example for local storage and a Star Wars API integration using \built\_value\ for JSON serialization. The example also includes standard Flutter project configuration files (\.gitignore\, \.metadata\, \analysis\_options.yaml\) to ensure the example runs correctly and passes static analysis.
_packages/flutter\hooks/example · high confidence
Expanded set of Flutter hooks for controllers, async state, and utility functions
The flutter\_hooks library has been significantly expanded with new hooks to manage various Flutter controllers and state. New controller hooks are provided for Carousel, CupertinoTab, DraggableScrollable, ExpansionTile (as Expansible), FixedExtentScroll, FocusNode, FocusScopeNode, Page, Search, Tab, Transformation, and WidgetState controllers, each handling automatic disposal. Additional hooks include useAnimation, useAnimationController, useSingleTickerProvider, useFuture, useStream, useValueListenable, useListenable, useOnListenableChange, useListenableSelector, useValueNotifier, useAutomaticKeepAlive, useReducer, usePrevious, useReassemble, useIsMounted (deprecated), useRef, useCallback, useMemoized, and useValueChanged. The framework also introduces a Store interface for useReducer and supports keys for state preservation in hooks like useAnimationController and useSingleTickerProvider.
_packages/flutter\hooks/lib · high confidence
Initial release of Flutter Hooks library
The repository is initialized with the core implementation of the Flutter Hooks library, providing a React-style hooks API for managing widget lifecycle and state. This includes the foundational hook system, the \HookWidget\ base class, and comprehensive documentation in the README explaining the motivation, principles, and rules for using hooks in Flutter applications.
(repo-wide) · high confidence
Removals
Removal of custom Hook and HookElement implementation
The lib/hook.dart file has been removed, eliminating the custom Hook, HookState, HookElement, and HookWidget classes that previously provided stateful widget-like capabilities through a hook-based API. Users can no longer use these specific hook mechanisms within the library.
lib · high confidence
Removed example/lib/main.dart
The example/lib/main.dart file has been removed from the repository. This file previously contained a Flutter application demonstrating the use of flutter\_hooks and rxdart to display periodic integer values in a simple UI.
example/lib · high confidence
Behavioural changes
Removal of generated Flutter plugin registration files
The example Android and iOS projects have had their auto-generated plugin registration files removed. Specifically, the Java class \GeneratedPluginRegistrant.java\, the iOS header and implementation files (\GeneratedPluginRegistrant.h\ and \.m\), and the iOS build configuration \Generated.xcconfig\ have all been deleted. This change removes the boilerplate code that previously registered Flutter plugins with the native Android and iOS platforms, likely reflecting a shift in how the example app manages plugin registration or a cleanup of generated artifacts.
example/android, example/ios · medium confidence
Removed example/.packages file
The generated .packages file, which previously mapped package paths for the example project, has been removed. This file is typically auto-generated by the Dart/Flutter tooling and its removal suggests a change in how dependencies or the build environment is managed for the example.
example · high confidence
Test coverage
Added tests for new and existing hooks
Added comprehensive widget tests for a range of hooks including useCarouselController, useAppLifecycleState, useAutomaticKeepAlive, useCallback, useContext, useCupertinoTabController, useDebounced, useDraggableScrollableController, useEffect, and useExpansibleController. The suite also covers the core HookWidget lifecycle, memoization behavior, pre-build abort logic, and provides a mock infrastructure for testing hook states.
_packages/flutter\hooks/test · high confidence
Dependencies
Migrate to multi-package structure and update dependencies
The project has been restructured into a multi-package layout, moving the main library to \packages/flutter\_hooks/\ and the example app to \packages/flutter\_hooks/example/\. The library's \pubspec.yaml\ now specifies a Dart SDK constraint of \\>=2.17.0\ and a Flutter constraint of \\>=3.32.0\, reflecting a significant upgrade in supported versions. Additionally, the example app's dependencies have been updated to include \provider\, \http\, \shared\_preferences\, and \built\_value\/\built\_collection\ packages, while the main package has added \mockito\ as a dev dependency.
(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
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 62 → 69 (+6.5)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 99 (-1.2)
- Architecture 100 → 98 (-2.0)
- Maturity 49 → 52 (+3.1)
- Readiness 61 → 74 (+13.7)
- Security 71 → 84 (+12.6)
- Domain Modelling 100 → 100 (+0.0)
Resolved (8)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — no supported dependency manifest was read
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- Off-boarding risk: anonymized user #1
- Test reliability not included
- complexity unreadable for .dart — churn × complexity hotspots could not be measured
New (14)
- Documentation: no contributor guidance (README.md)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (17 lines × 2) (packages/flutter_hooks/example/lib/custom_hook_function.dart)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Hook.shouldPreserveState (cognitive 25) (packages/flutter_hooks/lib/src/framework.dart)
- Hook.shouldPreserveState (cyclomatic 16) (packages/flutter_hooks/lib/src/framework.dart)
- Low cohesion: HookState (LCOM4 5) (packages/flutter_hooks/lib/src/framework.dart)
- Low cohesion: _EffectHookState (LCOM4 4) (packages/flutter_hooks/lib/src/primitives.dart)
- Low cohesion: _ListenableSelectorHookState (LCOM4 5) (packages/flutter_hooks/lib/src/listenable_selector.dart)
- Medium: security finding (details withheld)
- Off-boarding risk: anonymized user #1
- Workflow token permissions not restricted
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
rrousselGit/flutter_hooks 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 23 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 6f7344fc09f3800c1a9944d06ae56d5324e084e3 — 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-955b9cee9818.