PackageTrack
Sign in Get early access

async_phase_notifier

A variant of ValueNotifier that helps you better manage phases of asynchronous operations.

0.8.1 kaboc/async-phase

What this package is like to depend on

Last release 7 months ago

08 Jan 2026

Ships fairly regularly

a new release about every 3 months

Nearly every release is documented

notes for 18 of 18 stable releases

Nothing withdrawn

no release was ever pulled

4 years old

18 releases · first in 2022

5 releases in the last 12 months

see the full history below

Release timeline

18 releases · Dec 2022 to Jan 2026
2023 2024 2025 2026
Release Pre-release

Releases

latest 18
  1. 0.8.1 08 Jan 2026
    Release notes
    • Fix issue where updateType() didn't correctly detect type returned by wrapped higher-order functions.
    Open source →
  2. 0.8.0 20 Dec 2025
    Release notes
    • Bump async_phase version to 0.6.2.
    • Update the minimum Dart SDK version to 3.6.2.
    • Breaking:
      • Remove deprecated updateOnlyPhase() from AsyncPhaseNotifier.
      • Standardize callbacks for consistency across all methods:
        • onComplete in updateType() now receives data, matching other methods.
        • onWaiting now triggers only on start and receives data.
          • Previously, its trigger timing (start/end) and parameter type (bool) were inconsistent among methods.
    Open source →
  3. 0.7.1 18 Dec 2025
    Release notes
    • Improve method signatures for better auto-completion of callback parameters.
    • Add updateType() to AsyncPhaseNotifier for more flexible phase control.
    • Deprecate updateOnlyPhase() in favour of updateType().
    • Bump async_phase version to 0.6.1.

    Migration Guide: updateOnlyPhase() to updateType()

    • Return value required:
      • The function in updateType() must return a value. (Add return or use an arrow function =>).
    • Automatic Phase Mapping:
      • If the function returns an AsyncPhase, the notifier's value reflects that specific phase.
    • Simplified Error Handling:
      • If you call a method that returns an AsyncPhase (e.g. from a repository) and it results in an AsyncError, you can now simply return that phase to apply the error state to the notifier, without needing to call rethrowError().
    • Simplified onComplete:
      • The onComplete callback no longer receives the result data, as the data remains unchanged.
    Open source →
  4. 0.7.0 06 Oct 2025
    Release notes
    • Bump async_phase version to 0.6.0.
    • Add onWaiting, onComplete and onError callbacks to update() and updateOnlyPhase().
    Open source →
  5. 0.6.1 04 Oct 2025
    Release notes
    • Add support for replacing notifier in AsyncPhaseListener.
    Open source →
  6. 0.6.0 26 Aug 2025
    Release notes
    • Remove deprecated runAsync().
    • Avoid the error that occurred when update() ended after AsyncPhaseNotifier was disposed.
    • Refactor update() and remove unnecessary reassignment of new phase to value.
    • Refactor and improve tests.
    Open source →
  7. 0.5.2 02 Mar 2025
    Release notes
    • Update async_phase to 0.5.2.
    Open source →
  8. 0.5.1 02 Mar 2025
    Release notes
    • Update async_phase to 0.5.1.
    Open source →
  9. 0.5.0 30 Nov 2024
    Release notes
    • Breaking:
      • Change parameter of AsyncPhaseNotifier constructor to be no longer optional.
      • Change callback of runAsync() to no longer receive current data.
      • Change return type of callback of runAsync() from FutureOr to Future.
        • This is an improvement to prevent misuse that leads to unhandled error.
      • Deprecate runAsync() in favour of new update().
      // Before
      final notifier = AsyncPhaseNotifier<int>();
      // After
      final notifier = AsyncPhaseNotifier<int>(0);
      
      // Before
      class MyNotifier extends AsyncPhaseNotifier<int> {
        MyNotifier();
      }
      // After
      class MyNotifier extends AsyncPhaseNotifier<int> {
        MyNotifier() : super(0);
      }
      
      // Before
      await runAsync((data) => yourFunc(data));
      // After
      await update(() => yourFunc(data)); // `data` here is a new getter for `value.data`.
      
    • Upgrade async_phase to 0.5.0.
      • The return type of callback of AsyncPhase.from() is now Future instead of FutureOr.
      • error and stackTrace of AsyncError is now non-nullable.
      • See the change log of package:async_phase for details and non-breaking changes.
    • Add update() to AsyncPhaseNotifier as a replacement of deprecated runAsync().
    • Add updateOnlyPhase() to AsyncPhaseNotifier,
    • Add type-safe data getter for value.data to AsyncPhaseNotifier.
    • Fix runAsync().
      • Resulting AsyncError had stale data if fallback data was not provided and value.data was updated while the callback was executed.
    • Some minor improvements.
    Open source →
  10. 0.4.3 30 Apr 2024
    Release notes
    • Upgrade async_phase to 0.4.0.
    Open source →
  11. 0.4.2 25 Jan 2024
    Release notes
    • Improve comments and tests to reduce risk of nullability mistakes.
    • Fix and simplify description on nullability of data in README.
    • Update dependencies.
    Open source →
  12. 0.4.1 17 Sep 2023
    Release notes
    • Update dependencies.
      • copyWith() added to AsyncPhase at async_phase 0.3.2 is available.
    • Add tests for dispose() of AsyncPhaseNotifier.
    • Fix test for listenFor().
    • Small refactorings.
    Open source →
  13. 0.4.0 18 Aug 2023
    Release notes
    • Breaking changes:
      • Rename listen() to listenFor().
      • Add the new listen() method.
        • This method takes a single listener function that receives the latest phase, whereas listenFor() takes several callback functions, each of which corresponds to a certain phase.
    Open source →
  14. 0.3.0 31 May 2023
    Release notes
    • Raise minimum Flutter SDK version to 3.10.0.
    • Bump async_phase to 0.3.0.
    • Related refactorings.
    Open source →
  15. 0.2.0 25 Jan 2023
    Release notes
    • Breaking changes:
      • Change listeners to listen to not only errors but also changes to waiting/complete phases.
        • Rename listenError() to listen() and add callbacks.
        • Rename AsyncErrorListener to AsyncPhaseListener and add callbacks.
          • BuildContext is not passed to onError any more.
      • Require Flutter 3.7.0 or above.
    • Add dependency on meta.
    • Warn if the result of listen() is not used.
    Open source →
  16. 0.2.0+1 26 Jan 2023
    Release notes
    • Fix description on AsyncPhaseListener.
    Open source →
  17. 0.1.0 10 Dec 2022
    Release notes
    • Update async_phase to 0.1.0.
    • Simplify the value setter that was needlessly complex and possibly led to wrong behaviours.
    Open source →
  18. 0.0.1 05 Dec 2022
    Release notes
    • Initial version.
    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