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 2026Releases
latest 19-
2.2.007 Mar 2026Release notes
Open source →tapoperator for debugging and logging intermediate states in a chain.filteroperator for conditional Success-to-Failure conversion.zipoperator for combining two Results using Dart 3 Records.flattenoperator (extension) for unwrapping nested Results.recoverWhenoperator for conditional recovery by predicate.toString()override onSuccessandFailurefor better debug output.- Best Practices section in README (scoped recovery, custom exceptions with stack trace).
Release notes
Open source →Added
tapoperator for debugging and logging intermediate states in a chain.filteroperator for conditional Success-to-Failure conversion.zipoperator for combining two Results using Dart 3 Records.flattenoperator (extension) for unwrapping nested Results.recoverWhenoperator for conditional recovery by predicate.toString()override onSuccessandFailurefor better debug output.- Best Practices section in README (scoped recovery, custom exceptions with stack trace).
-
2.1.114 Jun 2025 -
2.1.010 Apr 2025 -
2.0.011 Dec 2024Release notes
Open source →- This version aims to reduce the
Resultboilerplate by making theFailuretype Exception by default. This will free the Result from having to typeFailure, making the declaration smaller.
If there is a need to type
Failure, useResultDart.Added
- Introduced
typedefforResult<S>andAsyncResult<S>to simplify usage:Result<S>is a simplified alias forResultDart<S, Exception>.AsyncResult<S>is a simplified alias forAsyncResultDart<S, Exception>.
Changed
- Replaced
Resultclass withResultDartas the base class for all results.- Default failure type for
ResultDartis nowException. - This change reduces boilerplate and improves usability by eliminating the need to specify the failure type explicitly in most cases.
- Default failure type for
Removed
- Remove factories
Result.successandResult.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, useResultDart<Success, Failure>.
only
Successtype:// Old Result<int, Exception> myResult = Success(42); // NEW Result<int> myResult = Success(42);
with
SuccessandFailuretypes:// Old Result<int, String> myResult = Success(42); // NEW ResultDart<int, String> myResult = Success(42);
Release notes
Open source →- This version aims to reduce the
Resultboilerplate by making theFailuretype Exception by default. This will free the Result from having to typeFailure, making the declaration smaller.
If there is a need to type
Failure, useResultDart.Added
- Introduced
typedefforResult<S>andAsyncResult<S>to simplify usage:Result<S>is a simplified alias forResultDart<S, Exception>.AsyncResult<S>is a simplified alias forAsyncResultDart<S, Exception>.
Changed
- Replaced
Resultclass withResultDartas the base class for all results.- Default failure type for
ResultDartis nowException. - This change reduces boilerplate and improves usability by eliminating the need to specify the failure type explicitly in most cases.
- Default failure type for
Removed
- Remove factories
Result.successandResult.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, useResultDart<Success, Failure>.
only
Successtype:// Old Result<int, Exception> myResult = Success(42); // NEW Result<int> myResult = Success(42);with
SuccessandFailuretypes:// Old Result<int, String> myResult = Success(42); // NEW ResultDart<int, String> myResult = Success(42); - This version aims to reduce the
-
2.0.0-alpha.411 Dec 2024 pre-releaseNothing published for this version
-
2.0.0-alpha.311 Dec 2024 pre-releaseNothing published for this version
-
2.0.0-alpha.211 Dec 2024 pre-releaseNothing published for this version
-
2.0.0-alpha.110 Dec 2024 pre-releaseNothing published for this version
-
1.1.128 Mar 2024Release notes
Open source →What's Changed
- Feature/const constructors by @eKaramihov in #4
- fix: remove unused generic param in onSuccess and onFailure by @davidmigloz in #5
- Update README.md discord link by @thKali in #14
- Update .gitignore to include .vscode directory by @EchoEllet in #9
- Delete .vscode/settings.json by @EchoEllet in #10
New Contributors
- @eKaramihov made their first contribution in #4
- @davidmigloz made their first contribution in #5
- @thKali made their first contribution in #14
- @EchoEllet made their first contribution in #9
Full Changelog: v1.0.5...1.1.1
-
1.1.005 Jul 2023 -
1.0.612 May 2023 -
1.0.526 Jan 2023 -
1.0.426 Jan 2023 -
1.0.322 Dec 2022 -
1.0.218 Dec 2022 -
1.0.117 Dec 2022 -
1.0.016 Dec 2022Nothing published for this version
-
1.0.0+116 Dec 2022Nothing published for this version
-
1.0.0+216 Dec 2022