PackageTrack
Sign in Get early access

watch_it

The simple state management powered by get_it. It allows to observe changes of objects inside the get_it service locator and rebuild the UI accordingly.

2.4.2 9.8K downloads/mo #2966 most downloaded on pub.dev flutter-it/watch_it

What this package is like to depend on

Last release 6 months ago

20 Feb 2026

Release timing varies

gaps range from 8 days to 5 months

Most releases are documented

notes for 32 of 36 stable releases

Nothing withdrawn

no release was ever pulled

3 years old

36 releases · first in 2023

9 releases in the last 12 months

see the full history below

Release timeline

36 releases · Apr 2023 to Feb 2026
2024 2025 2026
Release Pre-release

Releases

latest 36
  1. 2.4.2 20 Feb 2026
    Release notes
    • Added AI skill files in skills/ directory for AI coding assistants
    • Added AI-Assisted Development section to README
    Open source →
  2. 2.4.1 04 Dec 2025
    Release notes

    V2.4.1: Fix allReady() returning stale value when new async singleton…

    Open source →
    Release notes

    Bug Fixes

    • Fixed allReady() returning stale true value when new async singletons are registered
      • Now correctly returns false and shows loading state until new singletons complete
    Open source →
  3. 2.4.0 04 Dec 2025
    Release notes
    • allReady() now properly detects when new async singletons are registered in pushed scopes
    • Works with get_it 9.2.0's cached allReady() future
    • Requires get_it ^9.2.0
    Open source →
    Release notes

    Improvements

    • allReady() now properly detects when new async singletons are registered in pushed scopes
      • Previously, allReady() would not rebuild the UI when pushNewScope() registered new async singletons
      • Now works correctly with get_it 9.2.0's cached allReady() future
    • Requires get_it ^9.2.0
    Open source →
  4. 2.3.1 25 Nov 2025
    Release notes

    Remove generated test folder from example

    Open source →
    Release notes

    Maintenance

    • Updated example project
    Open source →
  5. 2.2.0 19 Nov 2025
    Release notes

    The new name better reflects the actual behavior: it executes once after
    the first build where the function is called, not necessarily after the
    widget's first build. This makes it clear that it can be safely used
    inside conditionals.

    Enhanced documentation with better explanation of behavior and added
    example showing usage in conditionals for navigation when async
    dependencies are ready.

    Version: 2.2.0

    Open source →
    Release notes

    Improvements

    • Renamed for clarity: callAfterFirstBuild()callOnceAfterThisBuild(). The new name better reflects the actual behavior: it executes once after the first build where the function is called, not necessarily after the widget's first build. This makes it clear that it can be safely used inside conditionals. Since this function was only introduced in version 2.0.0, migration should be straightforward - just update the function name in your code.
    • Enhanced documentation for callOnceAfterThisBuild() with better explanation of behavior and added example showing usage in conditionals for navigation when async dependencies are ready.
    Open source →
  6. 2.1.1 15 Nov 2025
    Release notes

    Update example to command_it 9.0.2 API

    Open source →
    Release notes

    Maintenance

    • Updated example to use command_it 9.0.2 API (executerun, isExecutingisRunning)
    Open source →
  7. 2.1.0 08 Nov 2025
    Release notes
    • Improved error messages for watch ordering violations with clear guidance
    • Added comprehensive watch ordering documentation to README
    • Increased test coverage to 93.3%
    Open source →
    Release notes

    Improvements

    • Better Error Messages: Watch ordering violations now show a helpful error message instead of cryptic type errors. When conditional watch calls are placed incorrectly, you'll see clear guidance on how to fix it with BAD/GOOD examples.
    • Enhanced Documentation: Added "Watch Ordering and Conditional Watches" section to README with visual examples explaining why conditional watches must be at the end of build methods.
    • Improved Test Coverage: Test coverage increased to 93.3%.
    Open source →
  8. 2.0.1 03 Nov 2025
    Release notes

    Fix codecov badge to point to flutter-it organization

    Open source →
    Release notes

    Maintenance

    • Updated get_it dependency to ^9.0.0
    • Added GitHub Actions workflow for CI/CD with automated testing and code coverage
    • Improved README header with logo and better formatting to match flutter_it ecosystem style
    • Added package logo to pub.dev screenshots
    Open source →
  9. 2.0.0 02 Nov 2025
    Release notes

    New Features:

    • Add callAfterFirstBuild() for executing callbacks after first frame render
    • Add callAfterEveryBuild() with cancel callback for per-rebuild operations
    • Add const_widget_test.dart to verify const widgets work with WatchItMixin

    Breaking Changes:

    • Migrate from functional_listener to listen_it dependency
    • Change watchValue() and registerHandler() to default allowObservableChange: false
      for better performance and memory leak prevention

    Performance Improvements:

    • Selectors now only called once on first build (zero overhead on rebuilds)
    • Add helpful StateError messages for unexpected observable changes

    Bug Fixes:

    • Fix createOnceAsync test isolation issue

    Tests: All 57 tests passing

    Open source →
    Release notes

    Breaking Changes

    • BREAKING: Replaced dependency functional_listener ^4.0.0 with listen_it ^5.1.0. This is a breaking change as functional_listener has been renamed and restructured into listen_it. If you use functional_listener operators in your code, update your imports from package:functional_listener/functional_listener.dart to package:listen_it/listen_it.dart.
    • BREAKING: watchValue() and registerHandler() now default to allowObservableChange: false for better performance and memory leak prevention. This means the selector function is only called once on first build. If you need to dynamically switch observables (e.g., condition ? obsA : obsB), set allowObservableChange: true. This prevents common memory leaks from inline chain creation like watchValue((m) => m.source.map(...)).

    New Features

    • Added callAfterFirstBuild() function that executes a callback once after the first frame has been rendered. This is useful for operations that require the widget tree to be fully built and laid out, such as showing dialogs, accessing widget dimensions, scrolling to positions, or starting animations that depend on final widget sizes. This replaces the common pattern of using WidgetsBinding.instance.addPostFrameCallback in initState().
    • Added callAfterEveryBuild() function that executes a callback after every frame has been rendered. This is useful for operations that need to run after each rebuild, such as updating scroll positions, repositioning overlays, or performing measurements. The callback includes a cancel() function to stop future invocations when needed.

    Performance Improvements

    • watchValue() and registerHandler() now have zero overhead on rebuilds with default settings - selectors are only called once instead of on every build
    • Added helpful StateError messages when observables change unexpectedly with allowObservableChange: false, guiding users to the correct fix

    Bug Fixes

    • Fixed createOnceAsync test isolation issue by properly resetting testCompleter in setUp
    • Internal refactoring: Renamed parameters for better clarity (targetparentOrListenable, etc.)
    Open source →
  10. 1.7.0 21 Aug 2025

    Nothing published for this version

  11. 1.6.5 11 Mar 2025
    Release notes
    • PR by @timmaffett imrproving the markdown of the readme
    • adding topics to pubspec
    Open source →
  12. 1.6.4 25 Feb 2025
    Release notes
    • adding sl alias for di
    • adding createOnce to the readme
    Open source →
  13. 1.6.3 22 Feb 2025
    Release notes
    • fixing an exception in Streambuilder during loading state if you don't provide an inital value
    Open source →
  14. 1.6.2 09 Jan 2025
    Release notes
    • Fix for https://github.com/escamoteur/watch_it/issues/42
    Open source →
  15. 1.6.1 13 Dec 2024
    Release notes
    • fixing linter warnings
    Open source →
  16. 1.6.0 12 Dec 2024
    Release notes
    • Adding createOnce and createOnceAsync
    Open source →
  17. 1.5.1 29 Sep 2024

    Nothing published for this version

  18. 1.5.0 20 Sep 2024

    Nothing published for this version

  19. 1.4.2 14 May 2024

    Nothing published for this version

  20. 1.4.1 23 Mar 2024
    Release notes
    • fix for https://github.com/escamoteur/watch_it/issues/28
    Open source →
  21. 1.4.0 23 Jan 2024
    Release notes
    • thanks to the pr https://github.com/escamoteur/watch_it/pull/27 by @jefflongo pushScope now accepts the isFinal parameter that the underlying get_it function does for some time now.
    Open source →
  22. 1.3.0 18 Jan 2024
    Release notes
    • added executeHandlerOnlyOnce to registerFutureHandler, allReady and allReadyHandler
    • added new functions: callOnce and onDispose. See readme for details
    Open source →
  23. 1.2.0 27 Dec 2023
    Release notes
    • thanks to the PR from @smjxpro https://github.com/escamoteur/watch_it/pull/22 you now can register handlers for pure Listenable/ChangeNotifiers too
    Open source →
  24. 1.1.0 08 Nov 2023
    Release notes
    • https://github.com/fluttercommunity/get_it/issues/345 allReady() will now throw a correct error if an exception is thrown in one of the factory functions that allReady() checks
    Open source →
  25. 1.0.6 31 Oct 2023
    Release notes
    • Typo fixes by PRs from @mym0404 @elitree @florentmx
    Open source →
  26. 1.0.5 25 Sep 2023
    Release notes
    • updates Discord invite link
    Open source →
  27. 1.0.4 11 Sep 2023
    Release notes
    • added some more asserts to provide better error messages in case you forgot to use the WatchItMixin
    Open source →
  28. 1.0.3 04 Sep 2023
    Release notes
    • bumped get_it version
    Open source →
  29. 1.0.2 03 Sep 2023
    Release notes
    • thanks for PR by @yangsfang https://github.com/escamoteur/watch_it/pull/10
    Open source →
  30. 1.0.1 31 Aug 2023
    Release notes
    • small change in documentation
    Open source →
  31. 1.0.0 24 Aug 2023
    Release notes
    • fix for https://github.com/escamoteur/watch_it/issues/8
    • improved comments thanks to PR by @kevlar700
    Open source →
  32. 0.9.3 08 Aug 2023
    Release notes
    • added safety checks in case _element gets null but still a handler might get called
    Open source →
  33. 0.9.2 15 Jun 2023
    Release notes
    • improving readme
    Open source →
  34. 0.9.1 15 Jun 2023
    Release notes
    • fix typo
    Open source →
  35. 0.9.0 15 Jun 2023
    Release notes
    • First beta release
    Open source →
  36. 0.0.1 26 Apr 2023
    Release notes
    • This is currently just a placeholder for the new version of the get_it_mixin
    Open source →

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