Repository navigation
2.3.0 - Sep 02, 2026
https://pub.dev/packages/dart_either/versions/2.3.0
-
Added
isLeftAnd, which evaluates a predicate forLeftvalues and returns
falseforRightvalues. -
Added
tryCatchandtryCatchAsyncas the canonical synchronous and
asynchronous error-capture APIs. Both use required namedactionand
errorMapperparameters.tryCatchAsynccaptures errors thrown before a
future is returned as well as errors that complete the future.- Deprecated
catchErrorin favor oftryCatch. - Deprecated
catchFutureErrorin favor oftryCatchAsync. - Deprecated
catchStreamErrorin favor ofStream.toEitherStream. - The deprecated aliases retain their existing call syntax throughout
2.x.
- Deprecated
-
Added
registerFatalError<T>()to exclude a registered error type and its
subtypes from conversion toLeft. Registered errors retain their original
error and stack trace acrosstryCatch,tryCatchAsync,
Future.toEitherFuture, andStream.toEitherStream.
Registration is per isolate, additive, and idempotent; spawned isolates must
register their own fatal types. -
Added
bindingAsyncas the canonical asynchronous counterpart tobinding.
DeprecatedfutureBindingin favor ofbindingAsync; the alias retains its
existing call syntax and behavior throughout2.x. -
Fixed
handleErrorto preserve the originalRightinstance instead of
creating an equivalent one. Callback invocation andLeftrecovery behavior
are unchanged. -
Clarified the channel and callback semantics of
handleErrorWith,
handleError,redeem, andredeemWith.
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