PackageTrack
Sign in Get early access

flutter_hooks

A flutter implementation of React hooks. It adds a new kind of widget with enhanced code reuse.

0.21.3 335K downloads/mo #644 most downloaded on pub.dev rrousselGit/flutter_hooks

What this package is like to depend on

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

0 releases in the last 12 months

see the full history below

Release timeline

62 releases · Dec 2018 to Aug 2025
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 60 of 62
  1. 0.21.3 12 Aug 2025
    Release notes

    flutter_hooks : 0.21.2 -> 0.21.3

    Open source →
    Release notes
    • Deprecated useExpansionTileController in favor of useExpansibleController.
    • Added useCupertinoTabController thanks to @Erengun
    • Added useSnapshotController thanks to @benthillerkus
    • Added descendantsAreTraversable to useFocusNode thanks to @gabber235
    Open source →
  2. 0.21.3+1 19 Aug 2025
    Release notes

    flutter_hooks : 0.21.3 -> 0.21.3+1

    Open source →
    Release notes

    Updated Discord link

    Open source →
  3. 0.21.2 23 Feb 2025
    Release notes Open source →
    Release notes
    • Add useCarouselController (thanks to @riscait)
    • Add useTreeSliverController (thanks to @benthillerkus)
    • Added useOverlayPortalController (thanks to @offich)
    • Add animationDuration property to useTabController hook (thanks to @d-polikhranidi)
    Open source →
  4. 0.21.1-pre.4 01 Aug 2024 pre-release
    Release notes

    flutter_hooks : 0.21.1-pre.3 -> 0.21.1-pre.4

    Open source →
    Release notes
    • Added useFixedExtentScrollController (thanks to @whynotmake-it)
    Open source →
  5. 0.21.1-pre.3 30 Jul 2024 pre-release
    Release notes

    flutter_hooks : 0.21.1-pre.2 -> 0.21.1-pre.3

    Open source →
    Release notes
    • Added useOnListenableChange (thanks to @whynotmake-it)
    Open source →
  6. 0.21.1-pre.2 22 Jul 2024 pre-release
    Release notes

    flutter_hooks : 0.21.1-pre.1 -> 0.21.1-pre.2

    Open source →
    Release notes
    • Added onAttach and onDetach to useScrollController and usePageController (thanks to @whynotmake-it)
    Open source →
  7. 0.21.1-pre.1 08 Jul 2024 pre-release
    Release notes

    flutter_hooks : 0.21.1-pre.0 -> 0.21.1

    Open source →
    Release notes
    • Added useDraggableScrollableController (thanks to @dickermoshe)
    • Fix TickerMode not getting muted by hooks (thanks to @dev-tatsuya)
    Open source →
  8. 0.21.1-pre.0 25 Mar 2024 pre-release
    Release notes
    • Bump minimum Flutter SDK to 3.21.0-13.0.pre.4
    Open source →
  9. 0.21.0 22 Mar 2024 withdrawn
    Release notes

    flutter_hooks : 0.20.5 -> 0.21.0

    Open source →
    Release notes
    • Renamed useMaterialStatesController to useWidgetStatesController to follow the rename in Flutter.
    Open source →
  10. 0.20.5 05 Feb 2024
    Release notes

    flutter_hooks : 0.20.4 -> 0.20.5

    Open source →
    Release notes
    • Deprecate the useIsMounted hook as you should use BuildContext.mounted instead if you're on Flutter 3.7.0 or greater
    Open source →
  11. 0.20.4 29 Dec 2023
    Release notes
    • Added useDebounced (thanks to @itisnajim)
    • Removed @visibleForTesting on HookMixin
    Open source →
  12. 0.20.3 10 Oct 2023
    Release notes
    • Added useExpansionTileController (thanks to @droidbg)
    • Added useMaterialStatesController (thanks to @AdamHavlicek)
    Open source →
  13. 0.20.2 02 Oct 2023
    Release notes
    • Fixed key matching algorithm incorrectly not checking all keys if a 0 or a NaN is present (thanks to @AlexDochioiu)
    Open source →
  14. 0.20.1 29 Aug 2023
    Release notes
    • useListenableSelector now supports null listeners (thanks to @JWo1F)
    Open source →
  15. 0.20.0 25 Jul 2023
    Release notes
    • Breaking: keys comparison has changed under the following conditions:
      • Change from double.nan to double.nan preserves the state.
      • Change from 0.0 to -0.0 or vice versa does NOT preserve the state.
    • Added useOnStreamChange (thanks to @jezsung)
    Open source →
  16. 0.19.0 10 Jul 2023
    Release notes
    • Added useSearchController (thanks to @snapsl)
    • Keys on useCallback are now optional, to match useMemoized (thanks to @jezsung)
    • Update usePlatformBrightness to stop relying on deprecated code
    Open source →
  17. 0.18.6 19 Feb 2023
    Release notes
    • Added korean translation (thanks to @sejun2)
    • Add useFocusScopeNode hook (thanks to @iamsahilsonawane)
    Open source →
  18. 0.18.5 17 Jun 2022
    Release notes
    • Added useListenableSelector, similar to useListenable, for listening to a Listenable but rebuilding the widget only if a certain data has changed (thanks to @ronnieeeeee)
    • Added useAutomaticKeepAlive (thanks to @DevNico)
    • Added usePlatformBrightness and useOnPlatformBrightnessChange to interact with platform Brightness (thanks to @AhmedLSayed9)
    Open source →
  19. 0.18.5+1 24 Jun 2022
    Release notes

    Update links to the repository

    Open source →
  20. 0.18.4 12 May 2022
    Release notes

    Upgrade to Flutter 3.0.0

    Open source →
  21. 0.18.3 07 Apr 2022
    Release notes

    Added onKeyEvent to useFocusNode (thanks to @kdelorey)

    Open source →
  22. 0.18.2 29 Dec 2021
    Release notes
    • Allow null in useListenable
    Open source →
  23. 0.18.2+1 06 Feb 2022
    Release notes

    Improved the documentation (thanks to @Renni771)

    Open source →
  24. 0.18.1 10 Nov 2021
    Release notes
    • Added useTransformationController, to create a TransformationController (thanks to @shrouxm)
    • Added useAppLifecycleState and useOnAppLifecycleStateChange to interact with AppLifecycleState (thanks to @francipvb)
    Open source →
  25. 0.18.0 30 Jun 2021
    Release notes
    • 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

    Open source →
  26. 0.17.0 13 May 2021
    Release notes
    • useFuture/useStream's AsynsSnapshot now correctly expose the StackTrace when there is an error.
    • added useRef and useCallback, similar to the React equivalents.
    • initialData of useStream and useFuture is now optional.
    Open source →
  27. 0.16.0 17 Feb 2021
    Release notes

    Stable null-safety release

    Open source →
  28. 0.16.0-nullsafety.0 27 Jan 2021 pre-release
    Release notes

    Migrated flutter_hooks to null-safety (special thanks to @DevNico for the help!)

    Open source →
  29. 0.15.0 20 Nov 2020
    Release notes
    • Added usePageController to create a PageController
    Open source →
  30. 0.14.1 29 Sep 2020
    Release notes
    • 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)

    Open source →
  31. 0.14.0 06 Sep 2020
    Release notes
    • added all FocusNode parameters to useFocusNode
    • Fixed a bug where on hot-reload, a HookWidget could potentially not rebuild
    • Allow hooks to integrate with the devtool using the Diagnosticable API, and implement it for all built-in hooks.
    Open source →
  32. 0.13.2 22 Aug 2020

    Nothing published for this version

  33. 0.13.1 12 Aug 2020
    Release notes
    • useIsMounted now returns a function instead of a callable class.
    Open source →
  34. 0.13.0 03 Aug 2020
    Release notes
    • Added useIsMounted to determine whether a widget was destroyed or not (thanks to @davidmartos96)
    Open source →
  35. 0.12.0 13 Jul 2020
    Release notes
    • Added useScrollController to create a ScrollController
    • added useTabController to create a TabController (thanks to @Albert221)
    Open source →
  36. 0.11.0 04 Jul 2020
    Release notes

    Breaking change:

    • Removed 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());
      
    Open source →
  37. 0.10.0 23 Jun 2020
    Release notes

    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:

    • Added a way for hooks to potentially abort a widget rebuild.
    • Added StatefulHookWidget, a StatefulWidget that can use hooks inside its build method.
    Open source →
  38. 0.10.0-dev+1 12 Jun 2020 pre-release

    Nothing published for this version

  39. 0.10.0-dev+2 20 Jun 2020 pre-release

    Nothing published for this version

  40. 0.9.0 11 Apr 2020
    Release notes
    • Added a deactivate life-cycle to HookState
    Open source →
  41. 0.8.0 21 Feb 2020
    Release notes

    Added useFocusNode

    Open source →
  42. 0.8.0+1 31 Mar 2020
    Release notes
    • Fixed link to "Existing hooks" in README.md.
    Open source →
  43. 0.7.0 09 Nov 2019
    Release notes
    • Added useTextEditingController, thanks to simolus3!
    Open source →
  44. 0.6.1 08 Oct 2019
    Release notes
    • Added useReassemble hook, thanks to @SahandAkbarzadeh
    Open source →
  45. 0.6.0 10 Jul 2019
    Release notes
    • Make hooks compatible with newer flutter stable version 1.7.8-hotfix.2.
    Open source →
  46. 0.5.0 13 May 2019

    Nothing published for this version

  47. 0.4.0 02 May 2019
    Release notes
    • Make hooks compatible with newer flutter version. (see https://groups.google.com/forum/#!topic/flutter-announce/hp1RNIgej38)
    Open source →
  48. 0.3.1-dev 10 Apr 2019 pre-release

    Nothing published for this version

  49. 0.3.0 20 Apr 2019
    Release notes
    • NEW: usePrevious, a hook that returns the previous argument is received.
    • NEW: it is now impossible to call inheritFromWidgetOfExactType inside initHook of hooks. This forces authors to handle value updates.
    • FIX: use List<Object> instead of List<dynamic> for keys. This fixes implicit-dynamic rule mistakenly reporting errors.
    • NEW: Hooks are now visible on HookElement through debugHooks in development, for testing purposes.
    • NEW: If a widget throws on the first build or after a hot-reload, next rebuilds can still add/edit hooks until one build finishes entirely.
    • NEW: new life-cycle available on HookState: didBuild. This life-cycle is called synchronously right after build method of HookWidget finished.
    • NEW: new reassemble life-cycle on HookState. It is equivalent to State.reassemble of statefulwidgets.
    • NEW: 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.
    Open source →
  50. 0.3.0-dev.4 19 Feb 2019 pre-release

    Nothing published for this version

  51. 0.3.0-dev.3 04 Feb 2019 pre-release

    Nothing published for this version

  52. 0.3.0-dev.2 03 Feb 2019 pre-release

    Nothing published for this version

  53. 0.3.0-dev.1 01 Feb 2019 pre-release

    Nothing published for this version

  54. 0.3.0-dev 01 Feb 2019 pre-release

    Nothing published for this version

  55. 0.2.1 06 Jan 2019
    Release notes
    • NEW: 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.
    • NEW: useContext, which exposes the BuildContext of the currently building HookWidget.
    Open source →
  56. 0.2.0 28 Dec 2018
    Release notes
    • Made all existing hooks as static functions, and removed HookContext. The migration is as followed:
    Widget build(HookContext context) {
        final state = context.useState(0);
    }
    

    becomes:

    Widget build(BuildContext context) {
        final state = useState(0);
    }
    
    • Introduced keys for hooks and applied them to hooks where it makes sense.
    • Added 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.
    • fixes a bug where hot-reload without using hooks thrown an exception
    Open source →
  57. 0.1.0 24 Dec 2018
    Release notes
    • useMemoized callback doesn't take the previous value anymore (to match React API) Use useValueChanged instead.
    • Introduced useEffect and useStreamController
    • fixed a bug where hot-reload while reordering/adding hooks did not work properly
    • improved readme
    Open source →
  58. 0.0.1 21 Dec 2018
    Release notes

    Added a few common hooks:

    • useStream
    • useFuture
    • useAnimationController
    • useSingleTickerProvider
    • useListenable
    • useValueListenable
    • useAnimation
    Open source →
  59. 0.0.1+1 24 Dec 2018

    Nothing published for this version

  60. 0.0.1+2 24 Dec 2018

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive