PackageTrack
Sign in Get early access

either_dart

Error handler library for type-safe and easy work with errors on Dart and Flutter. Either is an alternative to Nullable value and Exceptions.

1.0.0 54K downloads/mo #1430 most downloaded on pub.dev avdosev/either_dart

What this package is like to depend on

Last release 3 years ago

no release in 18 months

Ships fairly regularly

a new release about every 3 months

Most releases are documented

notes for 12 of 14 stable releases

Nothing withdrawn

no release was ever pulled

6 years old

17 releases · first in 2020

0 releases in the last 12 months

see the full history below

Release timeline

17 releases · Sep 2020 to Jun 2023
2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 17
  1. 1.0.0 10 Jun 2023
    Release notes

    remove deprecated methods from Future[Either]

    Either is now sealed - this gives you support pattern matching.

    You now have an alternative for the fold and either

    before:

    
    final either = ...;
    
    final result = either.fold(
      (left) => do something with left
      (right) => do something with right
    );
    
    

    after:

    
    final either = ...;
    
    switch (either) {
      case Left(value: final left):
        do something with left
      case Right(value: final right):
        do something with right
    }
    
    

    Thanks to @dballance for creating the issue

    Also, you can still use:
    either.isLeft - check either is left
    either.isRight- check either is right

    Open source →
  2. 0.4.0 27 Apr 2023
    Release notes

    Provide more async flexible type support for FutureEither's fold operation.

    Thanks to @lukasbalaz for creating the issue

    add:

    • tryExcept - A simple but powerful constructor for exception handling. Just specify the type of error you expect from the function and you will get Either<ExpectedError, RightType>
    Open source →
  3. 0.3.0 06 Nov 2022
    Release notes

    Either now overrides equality and hash.

    Thanks to @memishood for creating the issue

    Open source →
  4. 0.2.0 31 Jul 2022
    Release notes

    Updated to support FutureOr<T> instead of Future<T>:

    • Either:
      • thenAsync
      • thenLeftAsync
      • mapAsync
      • mapLeftAsync
    • Future[Either]:
      • thenRight
      • thenLeft

    Updated to support FutureOr<T> instead of T:

    • Future[Either]:
      • mapRight
      • mapLeft

    Mark deprecated (not delete):

    • Future[Either].thenRightSync
    • Future[Either].thenLeftSync
    • Future[Either].mapRightAsync
    • Future[Either].mapLeftAsync

    The following methods were not needed after FutureOr support, so they are marked Deprecated.

    Open source →
  5. 0.1.4 07 Nov 2021
    Release notes

    Update:

    • Readme

    (just this)

    Open source →
  6. 0.1.3 18 Aug 2021
    Release notes

    Added:

    • thenLeft
    • thenLeftAsync
    • similiar methods for FutureEither<L, R> extension
    Open source →
  7. 0.1.2 07 Jun 2021
    Release notes

    Fixed:

    • remove the lint warning from Either.tryCatch
    Open source →
  8. 0.1.1 19 Apr 2021

    Nothing published for this version

  9. 0.1.0 19 Apr 2021

    Nothing published for this version

  10. 0.1.0-nullsafety.2 19 Apr 2021 pre-release
    Release notes

    Added:

    • mapLeftAsync
    • FutureEither<L, R> extension

    Fixed:

    • change the naming of the async methods of Either class

    Changes Either:

    • asyncThen -> thenAsync
    • asyncMap -> mapAsync
    Open source →
  11. 0.1.0-nullsafety.1 05 Jan 2021 pre-release
    Release notes

    Added:

    • mapLeft

    Fixed:

    • documentation
    Open source →
  12. 0.1.0-nullsafety.0 04 Jan 2021 pre-release
    Release notes

    Added:

    • null-safety
    • swap method
    • const constructor for Left and Right

    Changed:

    • rename unite to fold
    Open source →
  13. 0.0.5 25 Nov 2020
    Release notes

    Added:

    • asyncMap
    • asyncThen
    Open source →
  14. 0.0.4 24 Nov 2020
    Release notes

    Fixed:

    • Not convenient use with autocomplete
    Open source →
  15. 0.0.3 15 Sep 2020
    Release notes

    Added:

    • Unit test
    • Lazy condition
    • Flutter example
    Open source →
  16. 0.0.2 15 Sep 2020
    Release notes

    Added:

    • Unit test
    • creators by:
      • condition
      • exception

    Fixed:

    • pubspec
    • Readme
    Open source →
  17. 0.0.1 13 Sep 2020
    Release notes

    Added:

    • Base implementation
    • Unit test
    • Example with flutter
    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