Skip to content

2.4.0 - Sep 06, 2026

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Sep 16:36
· 12 commits to master since this release
Immutable release. Only release title and notes can be modified.

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

Either operations

  • Relocated flatMap, getOrElse, getOrHandle, handleError,
    and handleErrorWith from Either instance members to exported generic extensions.

    • Statically typed dot-call syntax and behavior are unchanged,
      while analyzer-valid widened receivers no longer fail at a covariant virtual
      method boundary.
    • Selective imports must include the relevant extension type,
      and dynamic receivers no longer dispatch to these operations.
  • Split every value-operation extension exported by either_extensions.dart
    into a method-named source file. This file split changes only the source
    layout; public exports, call syntax, and behavior remain unchanged, so no
    consumer migration is required for the split.

Either.parSequenceN and Either.parTraverseN

  • Fixed Either.parSequenceN and Either.parTraverseN with finite concurrency
    so functions still waiting for a permit are not invoked after the first
    observed Left, thrown error, or failed future.

    • A Left is returned when it is observed first;
      an ordinary error observed first is propagated with its stack trace.
    • Already-running functions remain non-cancellable and may finish their side effects.
  • A non-null maxConcurrent less than or equal to zero now throws an
    ArgumentError synchronously, before inputs are traversed, the
    parTraverseN mapper is called, or callbacks are invoked.

  • Errors thrown while iterating the input or invoking the parTraverseN
    mapper now propagate synchronously instead of completing the returned future
    with an error. No asynchronous operation callback is invoked if this input
    preparation fails.


What's Changed

Full Changelog: 2.3.0...2.4.0