async_phase 0.5.0 copy "async_phase: ^0.5.0" to clipboard
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() from FutureOr to Future.
      • This is an improvement to prevent misuse that leads to unhandled error.
    • Change error and stackTrace of AsyncError to be non-nullable.
  • Fix AsyncComplete having data redundantly in both this._data and super.data.
  • Fix AsyncPhase.from() so that resulting phase is not affected by error thrown in onComplete or onError callback.
  • Add rethrowError() to AsyncError.

0.4.0 #

  • Breaking:
    • Change onError function of AsyncPhase.from() to receive data.
  • Improve AsyncPhase.from().
    • Change fallbackData to optional.
    • Add onComplete.
    • Refactor when() to use destructured fields.

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 of AsyncComplete<T> to be non-null if T is not nullable.
    • Hide error and stackTrace in AsyncPhase and make them only available in AsyncError.
  • Make sure data is of type Object? instead of dynamic when the type is unknown.
  • Add tests.
  • Improve documentation.

0.0.1+1 #

  • Update README.

0.0.1 #

  • Initial version.
7
likes
160
points
193
downloads

Publisher

verified publisherkaboc.cc

Weekly Downloads

A sealed class and its subclasses representing phases of an asynchronous operation.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

meta

More

Packages that depend on async_phase