PackageTrack
Sign in Get early access

dart_either

Either monad for Dart language and Flutter framework. Type-safe error handling, railway oriented programming. Supports Monad comprehensions, async map, async flatMap.

2.1.0 29K downloads/mo #1869 most downloaded on pub.dev hoc081098/dart_either

What this package is like to depend on

Last release 5 months ago

07 Mar 2026

Ships fairly regularly

a new release about every 1.4 years

Nearly every release is documented

notes for 4 of 4 stable releases

Nothing withdrawn

no release was ever pulled

5 years old

10 releases · first in 2021

1 release in the last 12 months

see the full history below

Release timeline

10 releases · Apr 2021 to Mar 2026
2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 10
  1. 2.1.0 07 Mar 2026
    Release notes

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

    • Promoted Either.parSequenceN and Either.parTraverseN from experimental to stable.
    • Added complete API docs and examples for Either.parSequenceN and Either.parTraverseN.
    • Added unit tests for Either.parSequenceN and Either.parTraverseN, including concurrency-limit and short-circuit cases.
    • Added @useResult annotations to public APIs that should not be ignored (for example: isLeft, isRight, map, flatMap, swap, exists, all, toEitherStream, left, right, and others).

    API migration notes

    • Either.parSequenceN changed from positional parameters to named parameters:
      // Before (2.0.0)
      Either.parSequenceN<String, int>(functions, n);
      
      // Now (2.1.0)
      Either.parSequenceN<String, int>(
        functions: functions,
        maxConcurrent: n,
      );
    • Either.parTraverseN changed from positional parameters to named parameters:
      // Before (2.0.0)
      Either.parTraverseN<String, int, int>(values, mapper, n);
      
      // Now (2.1.0)
      Either.parTraverseN<String, int, int>(
        values: values,
        mapper: mapper,
        maxConcurrent: n,
      );
    • maxConcurrent controls concurrency.
      • Pass a number (for example 2) to limit concurrency.
      • Pass null for unlimited concurrency.
    Open source →
    Release notes
    • Promoted Either.parSequenceN and Either.parTraverseN from experimental to stable.
    • Added complete API docs and examples for Either.parSequenceN and Either.parTraverseN.
    • Added unit tests for Either.parSequenceN and Either.parTraverseN, including concurrency-limit and short-circuit cases.
    • Added @useResult annotations to public APIs that should not be ignored (for example: isLeft, isRight, map, flatMap, swap, exists, all, toEitherStream, left, right, and others).

    API migration notes

    • Either.parSequenceN changed from positional parameters to named parameters:
      // Before (2.0.0)
      Either.parSequenceN<String, int>(functions, n);
      
      // Now (2.1.0)
      Either.parSequenceN<String, int>(
        functions: functions,
        maxConcurrent: n,
      );
      
    • Either.parTraverseN changed from positional parameters to named parameters:
      // Before (2.0.0)
      Either.parTraverseN<String, int, int>(values, mapper, n);
      
      // Now (2.1.0)
      Either.parTraverseN<String, int, int>(
        values: values,
        mapper: mapper,
        maxConcurrent: n,
      );
      
    • maxConcurrent controls concurrency.
      • Pass a number (for example 2) to limit concurrency.
      • Pass null for unlimited concurrency.
    Open source →
  2. 2.0.0 01 Sep 2024
    Release notes

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

    • Require Dart 3.0.0 or higher >=3.0.0 <4.0.0.

    • Make Either a sealed class, EitherEffect a sealed class, and ControlError a final class.
      Now you can use exhaustive switch expressions on Either instances.

      final Either<String, int> either = Either.right(10);
      
      // Use the `when` method to handle
      either.when(
        ifLeft: (l) => print('Left: $l'),
        ifRight: (r) => print('Right: $r'),
      ); // Prints Right: Either.Right(10)
      
      // Or use Dart 3.0 switch expression syntax 🤘
      print(
        switch (either) {
          Left() => 'Left: $either',
          Right() => 'Right: $either',
        },
      ); // Prints Right: Either.Right(10)

    What's Changed

    • chore(deps): update codecov/codecov-action action to v3.1.1 by @renovate in #11
    • chore(deps): update dart-lang/setup-dart action to v1.4 by @renovate in #12
    • chore(deps): update codecov/codecov-action action to v3.1.2 by @renovate in #13
    • chore(deps): update codecov/codecov-action action to v3.1.6 by @renovate in #14
    • fix(deps): update dependency http to v1 - autoclosed by @renovate in #15
    • chore(deps): update actions/checkout action to v4 by @renovate in #17
    • chore(deps): update codecov/codecov-action action to v4 by @renovate in #19
    • dart 3.0.0, switch expression, sealed class by @hoc081098 in #23

    Full Changelog: 1.0.0...2.0.0

    Open source →
    Release notes
    • Require Dart 3.0.0 or higher >=3.0.0 <4.0.0.

    • Make Either a sealed class, EitherEffect a sealed class, and ControlError a final class. Now you can use exhaustive switch expressions on Either instances.

      final Either<String, int> either = Either.right(10);
      
      // Use the `when` method to handle
      either.when(
        ifLeft: (l) => print('Left: $l'),
        ifRight: (r) => print('Right: $r'),
      ); // Prints Right: Either.Right(10)
      
      // Or use Dart 3.0 switch expression syntax 🤘
      print(
        switch (either) {
          Left() => 'Left: $either',
          Right() => 'Right: $either',
        },
      ); // Prints Right: Either.Right(10)
      
    Open source →
  3. 1.0.0 23 Aug 2022
    Release notes

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

    • This is our first stable release.

    Full Changelog: 0.0.1...1.0.0

    Open source →
    Release notes
    • This is our first stable release.
    Open source →
  4. 1.0.0-beta06 23 Aug 2022 pre-release
    Release notes Open source →
  5. 1.0.0-beta05 23 Aug 2022 pre-release
    Release notes Open source →
  6. 1.0.0-beta04 21 Aug 2022 pre-release
    Release notes

    What's Changed

    Full Changelog: 1.0.0-beta03...1.0.0-beta04

    Open source →
  7. 1.0.0-beta03 17 Aug 2022 pre-release
    Release notes

    TBD
    Full Changelog: 1.0.0-beta02...1.0.0-beta03

    Open source →
  8. 1.0.0-beta02 16 Aug 2022 pre-release
    Release notes

    TBD
    Full Changelog: 1.0.0-beta01...1.0.0-beta02

    Open source →
  9. 1.0.0-beta01 15 Aug 2022 pre-release
    Release notes

    TBD

    Full Changelog: 0.0.1...1.0.0-beta01

    Open source →
  10. 0.0.1 27 Apr 2021
    Release notes

    0.0.1 - Apr 27, 2021

    • Initial version, created by Stagehand
    Open source →
    Release notes
    • Initial version, created by Stagehand
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive