async_phase 0.5.0 async_phase: ^0.5.0 copied to clipboard
A sealed class and its subclasses representing phases of an asynchronous operation.
0.5.0 #
- Breaking:
- Change return type of callback of
AsyncPhase.from()
fromFutureOr
toFuture
.- This is an improvement to prevent misuse that leads to unhandled error.
- Change
error
andstackTrace
ofAsyncError
to be non-nullable.
- Change return type of callback of
- Fix
AsyncComplete
having data redundantly in boththis._data
andsuper.data
. - Fix
AsyncPhase.from()
so that resulting phase is not affected by error thrown inonComplete
oronError
callback. - Add
rethrowError()
toAsyncError
.
0.4.0 #
- Breaking:
- Change
onError
function ofAsyncPhase.from()
to receive data.
- Change
- Improve
AsyncPhase.from()
.- Change
fallbackData
to optional. - Add
onComplete
. - Refactor
when()
to use destructured fields.
- Change
0.3.2 #
- Add
copyWith()
. - Minor refactorings.
0.3.1 #
- Update dependencies.
0.3.0 #
- Raise minimum Dart SDK version to 3.0.0.
- Change AsyncPhase class to
sealed
. - Change subclasses of AsyncPhase to
final
. - Related refactorings.
0.2.0 #
- Raise minimum Dart SDK version to 2.19.0.
0.1.0 #
- Breaking:
- Improve
data
ofAsyncComplete<T>
to be non-null ifT
is not nullable. - Hide
error
andstackTrace
in AsyncPhase and make them only available in AsyncError.
- Improve
- Make sure
data
is of typeObject?
instead ofdynamic
when the type is unknown. - Add tests.
- Improve documentation.
0.0.1+1 #
- Update README.
0.0.1 #
- Initial version.