NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #690 most downloaded on pub.dev
A flutter implementation of React hooks. It adds a new kind of widget with enhanced code reuse.
Last release 1 years ago
19 Aug 2025
Release timing varies
gaps range from 8 days to 7 months
Most releases are documented
notes for 41 of 47 stable releases
1 version withdrawn
withdrawn after publishing
8 years old
62 releases · first in 2018
flutter_hooks : 0.21.2 -> 0.21.3
flutter_hooks : 0.21.2 -> 0.21.3
useExpansionTileController in favor of useExpansibleController.useCupertinoTabController thanks to @ErengunuseSnapshotController thanks to @benthillerkusdescendantsAreTraversable to useFocusNode thanks to @gabber235flutter_hooks : 0.21.3 -> 0.21.3+1
One column per quarter.
Updated Discord link
Merge branch 'master' of https://github.com/rrousselGit/flutter_hooks
Merge branch 'master' of https://github.com/rrousselGit/flutter_hooks
useCarouselController (thanks to @riscait)useTreeSliverController (thanks to @benthillerkus)useOverlayPortalController (thanks to @offich)flutter_hooks : 0.21.1-pre.3 -> 0.21.1-pre.4
flutter_hooks : 0.21.1-pre.3 -> 0.21.1-pre.4
flutter_hooks : 0.21.1-pre.2 -> 0.21.1-pre.3
flutter_hooks : 0.21.1-pre.2 -> 0.21.1-pre.3
flutter_hooks : 0.21.1-pre.1 -> 0.21.1-pre.2
flutter_hooks : 0.21.1-pre.1 -> 0.21.1-pre.2
onAttach and onDetach to useScrollController and usePageController (thanks to @whynotmake-it)flutter_hooks : 0.21.1-pre.0 -> 0.21.1
flutter_hooks : 0.21.1-pre.0 -> 0.21.1
useDraggableScrollableController (thanks to @dickermoshe)Bump minimum Flutter SDK to 3.21.0-13.0.pre.4
flutter_hooks : 0.20.5 -> 0.21.0
flutter_hooks : 0.20.5 -> 0.21.0
useMaterialStatesController to useWidgetStatesController to follow the rename in Flutter.flutter_hooks : 0.20.4 -> 0.20.5
flutter_hooks : 0.20.4 -> 0.20.5
useIsMounted hook as you should use BuildContext.mounted instead if you're on Flutter 3.7.0 or greaterAdded useDebounced (thanks to @itisnajim)
useDebounced (thanks to @itisnajim)@visibleForTesting on HookMixinAdded useExpansionTileController (thanks to @droidbg)
useExpansionTileController (thanks to @droidbg)useMaterialStatesController (thanks to @AdamHavlicek)Fixed key matching algorithm incorrectly not checking all keys if a 0 or a NaN is present (thanks to @AlexDochioiu)
useListenableSelector now supports null listeners (thanks to @JWo1F)
useListenableSelector now supports null listeners (thanks to @JWo1F)Breaking: keys comparison has changed under the following conditions:
keys comparison has changed under the following conditions:
double.nan to double.nan preserves the state.0.0 to -0.0 or vice versa does NOT preserve the state.useOnStreamChange (thanks to @jezsung)Update usePlatformBrightness to stop relying on deprecated code
useSearchController (thanks to @snapsl)useCallback are now optional, to match useMemoized (thanks to @jezsung)usePlatformBrightness to stop relying on deprecated codeAdded korean translation (thanks to @sejun2)
useFocusScopeNode hook (thanks to @iamsahilsonawane)Added useListenableSelector, similar to useListenable, for listening to a Listenable but rebuilding the widget only if a certain data has changed (tha
useListenableSelector, similar to useListenable, for listening to a
Listenable but rebuilding the widget only if a certain data has changed (thanks to @ronnieeeeee)useAutomaticKeepAlive (thanks to @DevNico)usePlatformBrightness and useOnPlatformBrightnessChange to interact with platform Brightness (thanks to @AhmedLSayed9)Update links to the repository
Update links to the repository
Upgrade to Flutter 3.0.0
Upgrade to Flutter 3.0.0
Added onKeyEvent to useFocusNode (thanks to @kdelorey)
Added onKeyEvent to useFocusNode (thanks to @kdelorey)
- Allow null in useListenable
useListenableImproved the documentation (thanks to @Renni771)
Improved the documentation (thanks to @Renni771)
Added useTransformationController, to create a TransformationController (thanks to @shrouxm)
useTransformationController, to create a TransformationController (thanks to @shrouxm)useAppLifecycleState and useOnAppLifecycleStateChange to interact with AppLifecycleState (thanks to @francipvb)Breaking: useRef now receive an initial value as parameter. To migrate, you can change:
Breaking: useRef now receive an initial value as parameter.
To migrate, you can change:
ObjectRef<int> ref = useRef<int>();
to:
ObjectRef<int?> ref = useRef<int?>(null);
Updated useStream/useFuture to match the behavior of StreamBuilder/FutureBuilder regarding initial values.
Added a reverseDuration parameter to useAnimationController
useFuture/useStream's AsynsSnapshot now correctly expose the StackTrace when there is an error.
useFuture/useStream's AsynsSnapshot now correctly expose the StackTrace when there is an error.useRef and useCallback, similar to the React equivalents.initialData of useStream and useFuture is now optional.Stable null-safety release
Stable null-safety release
Migrated flutter_hooks to null-safety (special thanks to @DevNico for the help!)
Migrated flutter_hooks to null-safety (special thanks to @DevNico for the help!)
Added usePageController to create a PageController
usePageController to create a PageControllerIncreased the minimum version of the Flutter SDK required to match changes on useFocusNode
Increased the minimum version of the Flutter SDK required to match changes on
useFocusNode
The minimum required is now 1.20.0 (the stable channel is at 1.20.4)
added all FocusNode parameters to useFocusNode
FocusNode parameters to useFocusNodeHookWidget could potentially not rebuildDiagnosticable API, and
implement it for all built-in hooks.Nothing published for this version
useIsMounted now returns a function instead of a callable class.
useIsMounted now returns a function instead of a callable class.Added useIsMounted to determine whether a widget was destroyed or not (thanks to @davidmartos96)
useIsMounted to determine whether a widget was destroyed or not (thanks to @davidmartos96)Added useScrollController to create a ScrollController
useScrollController to create a ScrollControlleruseTabController to create a TabController (thanks to @Albert221)Deprecated Hook.use in favor of a new short-hand use. Before:
Breaking change:
HookState.didBuild.
If you still need it, use addPostFrameCallback or Future.microtask.Non-breaking changes:
Fix a bug where the order in which hooks are disposed is incorrect.
It is now allowed to rebuild a HookWidget with more/less hooks than previously.
Example:
Widget build(context) {
useSomething();
if (condition) {
return Container();
}
useSomething()
return Container();
}
Deprecated Hook.use in favor of a new short-hand use.
Before:
Hook.use(MyHook());
After:
use(MyHook());
The order in which hooks are disposed has been reversed.
Breaking change:
The order in which hooks are disposed has been reversed.
Consider:
useSomething();
useSomethingElse();
Before, the useSomething was disposed before useSomethingElse.
Now, useSomethingElse is disposed before the useSomething.
The reason for this change is for cases like:
// Creates an AnimationController
final animationController = useAnimationController();
// Immediately listen to the AnimationController
useListenable(animationController);
Before, when the widget was disposed, this caused an exception as
useListenable unsubscribed to the AnimationController after its dispose
method was called.
Non-breaking changes:
StatefulHookWidget, a StatefulWidget that can use hooks inside its build method.Nothing published for this version
Nothing published for this version
Added a deactivate life-cycle to HookState
deactivate life-cycle to HookStateAdded useFocusNode
Added useFocusNode
Fixed link to "Existing hooks" in README.md.
README.md.Added useTextEditingController, thanks to simolus3!
useTextEditingController, thanks to simolus3!Added useReassemble hook, thanks to @SahandAkbarzadeh
useReassemble hook, thanks to @SahandAkbarzadehMake hooks compatible with newer flutter stable version 1.7.8-hotfix.2.
Nothing published for this version
Make hooks compatible with newer flutter version. (see https://groups.google.com/forum/#!topic/flutter-announce/hp1RNIgej38)
Nothing published for this version
NEW: usePrevious, a hook that returns the previous argument is received.
usePrevious, a hook that returns the previous argument is received.inheritFromWidgetOfExactType inside initHook of hooks. This forces authors to handle value updates.implicit-dynamic rule mistakenly reporting errors.HookElement through debugHooks in development, for testing purposes.build finishes entirely.HookState: didBuild.
This life-cycle is called synchronously right after build method of HookWidget finished.reassemble life-cycle on HookState. It is equivalent to State.reassemble of statefulwidgets.useStream and useFuture now have an optional preserveState flag.
This toggle how these hooks behave when changing the stream/future:
If true (default) they keep the previous value, else they reset to initialState.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
NEW: useValueNotifier, which creates a ValueNotifier similarly to useState. But without listening it. This can be useful to have a more granular rebui
useValueNotifier, which creates a ValueNotifier similarly to useState. But without listening it.
This can be useful to have a more granular rebuild when combined to useValueListenable.useContext, which exposes the BuildContext of the currently building HookWidget.Made all existing hooks as static functions, and removed HookContext. The migration is as followed:
HookContext. The migration is as followed:Widget build(HookContext context) {
final state = context.useState(0);
}
becomes:
Widget build(BuildContext context) {
final state = useState(0);
}
useReducer for complex state. It is similar to useState but is being managed by a Reducer and can only be changed by dispatching an action.useMemoized callback doesn't take the previous value anymore (to match React API) Use useValueChanged instead.
useMemoized callback doesn't take the previous value anymore (to match React API)
Use useValueChanged instead.useEffect and useStreamControllerAdded a few common hooks: - useStream - useFuture - useAnimationController - useSingleTickerProvider - useListenable - useValueListenable - useAnimati
Added a few common hooks:
useStreamuseFutureuseAnimationControlleruseSingleTickerProvideruseListenableuseValueListenableuseAnimationNothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →