Repository navigation
Breaking major. The core is now a Dart 3 sealed Result<T> — Ok<T> (non-null value) / Err<T> (single ResultError) — with compiler-enforced exhaustive switch and no more value!. The onException observability seam and mapper-free tryAsync are preserved.
Added
- Sealed
Ok/Errvariants; exhaustiveswitch; value-based, symmetric==/hashCode; immutable results. - Non-null
Ok.value; read via pattern matching /valueOrNull/valueOr/fold/match. ResultError.code/cause/stackTrace(the caught-exception path now lands the stack in theErr);runtimeTypein equality.Error-rethrow policy: an unmatched thrownErrorreaches the Zone / crash reporter; claim it with aResultMatcherto convert toErr.- Combinators:
map,flatMap,flatMapAsync, value-returningfold/match,valueOr,getOrElse,recover,mapError,Err.cast<R>.
Removed (breaking)
ResultOf<T>(→Result<T>),asResult, multi-error (errors/add/addAll/contains/get),ResultException, the deprecated 8.5exceptionHandler/exceptionHandlerMatchers/logSuccessResult, theResultConfig()factory, and thevoid fold({onFail,onSuccess})form.- The
collectiondependency — zero runtime dependencies. SDK floor>=3.0.0.
See the CHANGELOG and the README's 8.5 → 9.0 migration table.