NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #4980 most downloaded on pub.dev
A Dart implementation of the Result Monad which allows for more expressive result generation and processing without using exceptions.
Last release 6 months ago
23 Mar 2026
Ships fairly regularly
a new release about every 10 months
Nearly every release is documented
notes for 14 of 15 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
15 releases · first in 2021
One column per quarter.
Change Ok class's field to be "value" which overrides base-class value property. Since the 3.x version has been pulled and this technically changes th
Fix having version in CHANGELOG align with pub.dev version to get perfect score.
- Update README to new syntax
NOTE 1: This release has some breaking changes and an increased minimum SDK version bump from the 2.3.2 release.
NOTE 1: This release has some breaking changes and an increased minimum SDK version bump from the 2.3.2 release.
NOTE 2: Many thanks to the contributions to the ADT-related updates and StackTrace functionality updates contributed by Daniel Gomez Rico (danielgomezrico@gmail.com). Some of the changes were taken through Pull Request acceptance while others were back-ported with some changes from his fork of this project
Result.ok('Good') => Ok('Good)Result.error('Bad') => Error('Bad')// The below fold function...
final value = invert(2).fold(
onSuccess: (v) => v,
onError: (e, trace) => e,
);
// Can be expressed:
final value = switch (invert(2)) {
Ok o => o.value,
Error e => e.cause,
Result _ => throw UnimplementedError(), // there since Result isn't sealed
};
Result: fold, match, withError, withErrorAsyncFutureResult: fold, match, withError, withErrorAsyncStackTrace parameter on Error result creation Error('Bad', StackTrace.current)Result has a stackTrace property that can be called if and only if the type is an Error. Result can be null.Result has asOk and asError properties for casting to specific type. This will throw an Exception if is against
the underlying type for that instance.FutureResult to their corresponding Result methods: getErrorOrElse, getValueOrElse, getErrorOrElseAsync,
getValueOrElseAsyncTweak to documentation headers to avoid lint error
Tweak to README to include withError and withErrorAsync
withError and withErrorAsyncExamples and documentation updates for the new syntax.
FutureResult: andThen, errorCast, mapError, mapValue, withResult, withError, match, foldwithError to Result and withError and withErrorAsync to FutureResultNothing published for this version
Add pass through methods withResult and withResultAsync on Result and Future extension method
withResult and withResultAsync on Result and Future extension methodAdd exception catching on addThen and addThenSuccess and FutureResult extension methods.
addThen and addThenSuccess and FutureResult extension methods.- Tweaks to the README only.
Allow nullable types for success and failure types
andThenSuccess and andThenSuccessAsync methods for allowing returning results without explicit Result.ok
wrapping to allow more concise syntaxFutureResult to make async chaining syntax much more conciseerrorCast method for when need to pass up an error Result with the same error type with different success type.Added temp file "intermediate" level example and added it to example.md as well
example.md as wellAdded an example.md file for pub.dev.
example.md file for pub.dev.- Initial version.
Your coding agent can read these notes before it upgrades. Set up the MCP server →