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
Releases
latest 18-
0.8.108 Jan 2026Release notes
Open source →- Fix issue where
updateType()didn't correctly detect type returned by wrapped higher-order functions.
- Fix issue where
-
0.8.020 Dec 2025Release notes
Open source →- Bump async_phase version to 0.6.2.
- Update the minimum Dart SDK version to 3.6.2.
- Breaking:
- Remove deprecated
updateOnlyPhase()fromAsyncPhaseNotifier. - Standardize callbacks for consistency across all methods:
onCompleteinupdateType()now receives data, matching other methods.onWaitingnow triggers only on start and receives data.- Previously, its trigger timing (start/end) and parameter type (bool) were inconsistent among methods.
- Remove deprecated
-
0.7.118 Dec 2025Release notes
Open source →- Improve method signatures for better auto-completion of callback parameters.
- Add
updateType()toAsyncPhaseNotifierfor more flexible phase control. - Deprecate
updateOnlyPhase()in favour ofupdateType(). - Bump async_phase version to 0.6.1.
Migration Guide: updateOnlyPhase() to updateType()
- Return value required:
- The function in
updateType()must return a value. (Addreturnor use an arrow function=>).
- The function in
- Automatic Phase Mapping:
- If the function returns an
AsyncPhase, the notifier'svaluereflects that specific phase.
- If the function returns an
- Simplified Error Handling:
- If you call a method that returns an
AsyncPhase(e.g. from a repository) and it results in anAsyncError, you can now simply return that phase to apply the error state to the notifier, without needing to callrethrowError().
- If you call a method that returns an
- Simplified
onComplete:- The
onCompletecallback no longer receives the result data, as the data remains unchanged.
- The
-
0.7.006 Oct 2025Release notes
Open source →- Bump async_phase version to 0.6.0.
- Add
onWaiting,onCompleteandonErrorcallbacks toupdate()andupdateOnlyPhase().
-
0.6.104 Oct 2025 -
0.6.026 Aug 2025Release notes
Open source →- Remove deprecated
runAsync(). - Avoid the error that occurred when
update()ended afterAsyncPhaseNotifierwas disposed. - Refactor
update()and remove unnecessary reassignment of new phase tovalue. - Refactor and improve tests.
- Remove deprecated
-
0.5.202 Mar 2025 -
0.5.102 Mar 2025 -
0.5.030 Nov 2024Release notes
Open source →- Breaking:
- Change parameter of
AsyncPhaseNotifierconstructor to be no longer optional. - Change callback of
runAsync()to no longer receive current data. - Change return type of callback of
runAsync()fromFutureOrtoFuture.- This is an improvement to prevent misuse that leads to unhandled error.
- Deprecate
runAsync()in favour of newupdate().
// 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`. - Change parameter of
- Upgrade async_phase to 0.5.0.
- The return type of callback of
AsyncPhase.from()is nowFutureinstead ofFutureOr. errorandstackTraceofAsyncErroris now non-nullable.- See the change log of package:async_phase for details and non-breaking changes.
- The return type of callback of
- Add
update()toAsyncPhaseNotifieras a replacement of deprecatedrunAsync(). - Add
updateOnlyPhase()toAsyncPhaseNotifier, - Add type-safe
datagetter forvalue.datatoAsyncPhaseNotifier. - Fix
runAsync().- Resulting
AsyncErrorhad stale data if fallback data was not provided andvalue.datawas updated while the callback was executed.
- Resulting
- Some minor improvements.
- Breaking:
-
0.4.330 Apr 2024 -
0.4.225 Jan 2024Release notes
Open source →- Improve comments and tests to reduce risk of nullability mistakes.
- Fix and simplify description on nullability of
datain README. - Update dependencies.
-
0.4.117 Sep 2023Release notes
Open source →- 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.
- Update dependencies.
-
0.4.018 Aug 2023Release notes
Open source →- Breaking changes:
- Rename
listen()tolistenFor(). - 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.
- This method takes a single listener function that receives the latest phase, whereas
- Rename
- Breaking changes:
-
0.3.031 May 2023Release notes
Open source →- Raise minimum Flutter SDK version to 3.10.0.
- Bump async_phase to 0.3.0.
- Related refactorings.
-
0.2.025 Jan 2023Release notes
Open source →- Breaking changes:
- Change listeners to listen to not only errors but also changes to waiting/complete phases.
- Rename
listenError()tolisten()and add callbacks. - Rename
AsyncErrorListenertoAsyncPhaseListenerand add callbacks.BuildContextis not passed toonErrorany more.
- Rename
- Require Flutter 3.7.0 or above.
- Change listeners to listen to not only errors but also changes to waiting/complete phases.
- Add dependency on meta.
- Warn if the result of
listen()is not used.
- Breaking changes:
-
0.2.0+126 Jan 2023 -
0.1.010 Dec 2022Release notes
Open source →- Update async_phase to 0.1.0.
- There are some breaking changes.
- Simplify the
valuesetter that was needlessly complex and possibly led to wrong behaviours.
- Update async_phase to 0.1.0.
-
0.0.105 Dec 2022