multiple_result
Multiple results for dart. Inspired by dartz's Either and Kotlin's sealed classes
5.3.0
38K downloads/mo
#1660 most downloaded on pub.dev
higorlapa/result
What this package is like to depend on
Last release 5 months ago
14 Mar 2026
Release timing varies
gaps range from 3 weeks to 1.8 years
Most releases are documented
notes for 8 of 13 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
13 releases · first in 2021
1 release in the last 12 months
see the full history below
Release timeline
13 releases · Mar 2021 to Mar 2026Releases
latest 13-
5.3.014 Mar 2026Release notes
Open source →Bug Fixes
Error.getOrThrow()now correctly passes<S, E>toSuccessResultNotFoundException, sotoString()shows the actual types instead ofdynamic.
New Features
Result.tryCatch(action, onError)— static factory that wraps a potentially-throwing synchronous computation.getOrElse(orElse)— returns the success value or a fallback computed from the error.onSuccess(action)/onError(action)— side-effect tap methods that execute an action without transforming the result, returningthisfor chaining.flatMapError(mapper)— symmetric counterpart toflatMapfor the error channel.recover(mapper)— alias forflatMapError.swap()— convertsSuccesstoErrorand vice versa.AsyncResult<S, E>— zero-costFuture<Result<S, E>>wrapper via Dart extension types, with a full mirrored API (mapSuccess,mapError,map,flatMap,flatMapAsync,flatMapError,swap,onSuccess,onError,getOrThrow,getOrElse,tryGetSuccess,tryGetError,when,isSuccess,isError, andtryCatch).AsyncResultOf<S, E>typedef alias forAsyncResult<S, E>.
Full Changelog: v5.2.0...v5.3.0
-
5.2.029 Apr 2025 -
5.1.017 Jul 2023Release notes
Open source →What's Changed
- Adds [getOrThrow] method
- Update result.dart by @NerdFaisal404 in #12
New Contributors
- @NerdFaisal404 made their first contribution in #12
Full Changelog: v5.0.0...v5.1.0
-
5.0.010 May 2023 -
4.0.021 Dec 2022Release notes
Open source →What's Changed
- Revert previous releases
- Change
onSuccessandonErrortowhenSuccessandwhenError
Full Changelog: v3.1.0...v4.0.0
-
3.1.006 Dec 2022Release notes
Open source →What's Changed
- Refactor AsyncResult to typedef of Future by @jacobaraujo7 in #6
Full Changelog: v3.0.0...v3.1.0
-
3.0.005 Dec 2022Release notes
Open source →What's Changed
- Add new operators, a Unit type for void return and AsyncResult by @jacobaraujo7 in #5
Full Changelog: v2.0.0...v3.0.0
-
2.0.003 Dec 2022Release notes
Open source →What's Changed
- fix: Flip the types by @JoDeveloper in #4
New Contributors
- @JoDeveloper made their first contribution in #4
Full Changelog: v1.0.4...v2.0.0
-
1.0.419 Jul 2021Nothing published for this version
-
1.0.302 May 2021Nothing published for this version
-
1.0.228 Mar 2021Nothing published for this version
-
1.0.126 Mar 2021Nothing published for this version
-
1.0.023 Mar 2021Nothing published for this version