PackageTrack
Sign in Get early access

result_dart

Result for dart. It is an implementation based on Kotlin Result and Swift Result.

2.2.0 92K downloads/mo #1161 most downloaded on pub.dev Flutterando/result_dart

What this package is like to depend on

Last release 5 months ago

07 Mar 2026

Ships fairly regularly

a new release about every 4 months

Most releases are documented

notes for 13 of 15 stable releases

Nothing withdrawn

no release was ever pulled

4 years old

19 releases · first in 2022

1 release in the last 12 months

see the full history below

Release timeline

19 releases · Dec 2022 to Mar 2026
2023 2024 2025 2026
Release Pre-release

Releases

latest 19
  1. 2.2.0 07 Mar 2026
    Release notes
    • tap operator for debugging and logging intermediate states in a chain.
    • filter operator for conditional Success-to-Failure conversion.
    • zip operator for combining two Results using Dart 3 Records.
    • flatten operator (extension) for unwrapping nested Results.
    • recoverWhen operator for conditional recovery by predicate.
    • toString() override on Success and Failure for better debug output.
    • Best Practices section in README (scoped recovery, custom exceptions with stack trace).
    Open source →
    Release notes

    Added

    • tap operator for debugging and logging intermediate states in a chain.
    • filter operator for conditional Success-to-Failure conversion.
    • zip operator for combining two Results using Dart 3 Records.
    • flatten operator (extension) for unwrapping nested Results.
    • recoverWhen operator for conditional recovery by predicate.
    • toString() override on Success and Failure for better debug output.
    • Best Practices section in README (scoped recovery, custom exceptions with stack trace).
    Open source →
  2. 2.1.1 14 Jun 2025
    Release notes
    • Fix linter problems.
    Open source →
  3. 2.1.0 10 Apr 2025
    Release notes

    What's Changed

    Full Changelog: 1.1.1...v2.1.0

    Open source →
    Release notes
    • Added pureFold and mapFold operators.
    Open source →
  4. 2.0.0 11 Dec 2024
    Release notes
    • This version aims to reduce the Result boilerplate by making the Failure type Exception by default. This will free the Result from having to type Failure, making the declaration smaller.

    If there is a need to type Failure, use ResultDart.

    Added

    • Introduced typedef for Result<S> and AsyncResult<S> to simplify usage:
      • Result<S> is a simplified alias for ResultDart<S, Exception>.
      • AsyncResult<S> is a simplified alias for AsyncResultDart<S, Exception>.

    Changed

    • Replaced Result class with ResultDart as the base class for all results.
      • Default failure type for ResultDart is now Exception.
      • This change reduces boilerplate and improves usability by eliminating the need to specify the failure type explicitly in most cases.

    Removed

    • Remove factories Result.success and Result.failure.

    Migration Guide

    • In version >=2.0.0, the Failure typing is by default an Exception, but if there is a need to type it, use ResultDart<Success, Failure>.

    only Success type:

    // Old
    Result<int, Exception> myResult = Success(42);
    
    // NEW
    Result<int> myResult = Success(42);
    

    with Success and Failure types:

    // Old
    Result<int, String> myResult = Success(42);
    
    // NEW
    ResultDart<int, String> myResult = Success(42);
    
    Open source →
    Release notes
    • This version aims to reduce the Result boilerplate by making the Failure type Exception by default. This will free the Result from having to type Failure, making the declaration smaller.

    If there is a need to type Failure, use ResultDart.

    Added

    • Introduced typedef for Result<S> and AsyncResult<S> to simplify usage:
      • Result<S> is a simplified alias for ResultDart<S, Exception>.
      • AsyncResult<S> is a simplified alias for AsyncResultDart<S, Exception>.

    Changed

    • Replaced Result class with ResultDart as the base class for all results.
      • Default failure type for ResultDart is now Exception.
      • This change reduces boilerplate and improves usability by eliminating the need to specify the failure type explicitly in most cases.

    Removed

    • Remove factories Result.success and Result.failure.

    Migration Guide

    • In version >=2.0.0, the Failure typing is by default an Exception, but if there is a need to type it, use ResultDart<Success, Failure>.

    only Success type:

    // Old
    Result<int, Exception> myResult = Success(42);
    
    // NEW
    Result<int> myResult = Success(42);
    
    

    with Success and Failure types:

    // Old
    Result<int, String> myResult = Success(42);
    
    // NEW
    ResultDart<int, String> myResult = Success(42);
    
    
    Open source →
  5. 2.0.0-alpha.4 11 Dec 2024 pre-release

    Nothing published for this version

  6. 2.0.0-alpha.3 11 Dec 2024 pre-release

    Nothing published for this version

  7. 2.0.0-alpha.2 11 Dec 2024 pre-release

    Nothing published for this version

  8. 2.0.0-alpha.1 10 Dec 2024 pre-release

    Nothing published for this version

  9. 1.1.1 28 Mar 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v1.0.5...1.1.1

    Open source →
    Release notes
    • pump Dart version to 3.0.0
    • fix: factory const
    Open source →
  10. 1.1.0 05 Jul 2023
    Release notes
    • feat: Added onSuccess and onFailure callbacks
    Open source →
  11. 1.0.6 12 May 2023
    Release notes
    • feat: Dart 3.0.0 support
    Open source →
  12. 1.0.5 26 Jan 2023
    Release notes

    feat: Added FutureOr in AsyncResult.MapError

    Open source →
    Release notes
    • feat: Added FutureOr in AsyncResult.MapError
    Open source →
  13. 1.0.4 26 Jan 2023
    Release notes

    feat: Added FutureOr in AsyncResult.Map

    Open source →
    Release notes
    • feat: Added FutureOr in AsyncResult.Map
    Open source →
  14. 1.0.3 22 Dec 2022
    Release notes

    fix: AsyncResult recover

    Open source →
    Release notes
    • fix: AsyncResult recover
    Open source →
  15. 1.0.2 18 Dec 2022
    Release notes

    fix: separed functions.dart import

    Open source →
    Release notes
    • fix: separed functions.dart import
    Open source →
  16. 1.0.1 17 Dec 2022
    Release notes
    • fix: recover operator return a Result instead a Result.
    Open source →
    Release notes
    • fix: recover operator return a Result instead a Failure.
    Open source →
  17. 1.0.0 16 Dec 2022

    Nothing published for this version

  18. 1.0.0+1 16 Dec 2022

    Nothing published for this version

  19. 1.0.0+2 16 Dec 2022
    Release notes
    • Initial release
    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