Skip to content

2.3.0 - Sep 02, 2026

Choose a tag to compare

@hoc081098 hoc081098 released this 02 Sep 15:14
· 18 commits to master since this release
Immutable release. Only release title and notes can be modified.

https://pub.dev/packages/dart_either/versions/2.3.0

  • Added isLeftAnd, which evaluates a predicate for Left values and returns
    false for Right values.

  • Added tryCatch and tryCatchAsync as the canonical synchronous and
    asynchronous error-capture APIs. Both use required named action and
    errorMapper parameters. tryCatchAsync captures errors thrown before a
    future is returned as well as errors that complete the future.

    • Deprecated catchError in favor of tryCatch.
    • Deprecated catchFutureError in favor of tryCatchAsync.
    • Deprecated catchStreamError in favor of Stream.toEitherStream.
    • The deprecated aliases retain their existing call syntax throughout 2.x.
  • Added registerFatalError<T>() to exclude a registered error type and its
    subtypes from conversion to Left. Registered errors retain their original
    error and stack trace across tryCatch, tryCatchAsync,
    Future.toEitherFuture, and Stream.toEitherStream.
    Registration is per isolate, additive, and idempotent; spawned isolates must
    register their own fatal types.

  • Added bindingAsync as the canonical asynchronous counterpart to binding.
    Deprecated futureBinding in favor of bindingAsync; the alias retains its
    existing call syntax and behavior throughout 2.x.

  • Fixed handleError to preserve the original Right instance instead of
    creating an equivalent one. Callback invocation and Left recovery behavior
    are unchanged.

  • Clarified the channel and callback semantics of handleErrorWith,
    handleError, redeem, and redeemWith.


What's Changed

  • chore(deps): update actions/checkout action to v7 by @renovate[bot] in #40
  • chore(deps): update codecov/codecov-action action to v7 by @renovate[bot] in #39
  • chore(deps): update dart-lang/setup-dart action to v1.8.0 by @renovate[bot] in #37
  • feat(Either): add isLeftAnd to match Left value with a predicate by @hoc081098 in #45
  • feat(either): add selective error capture and align catch APIs by @hoc081098 in #46
  • chore(deps): update dart-lang/setup-dart action to v1.8.1 by @renovate[bot] in #44
  • bindingAsync by @hoc081098 in #47
  • complete the Either covariance audit and clarifies recovery API semantics by @hoc081098 in #48

Full Changelog: 2.2.0...2.3.0