ResultTransformationX<T> extension

Core conversion extensions on Result to enhance developer experience and interoperability with standard Dart API structures.

on

Methods

inspectFailure(void action(Failure failure)) Result<T>

Available on Result<T>, provided by the ResultTransformationX extension

Invokes a passive side-effect callback action if the result context is a failure.
inspectSuccess(void action(T value)) Result<T>

Available on Result<T>, provided by the ResultTransformationX extension

Invokes a passive side-effect callback action if the result context is successful.
throwIfNeeded() → T

Available on Result<T>, provided by the ResultTransformationX extension

Forcefully unwraps the successful value or throws a managed ResultException.
toNullable() → T?

Available on Result<T>, provided by the ResultTransformationX extension

Unwraps the Result and returns the successful value if present, otherwise returns null without throwing an exception.