ResultTransformationX<T> extension
Core conversion extensions on Result to enhance developer experience and interoperability with standard Dart API structures.
- on
-
- Result<
T>
- Result<
Methods
-
inspectFailure(
void action(Failure failure)) → Result< T> -
Available on Result<
Invokes a passive side-effect callbackT> , provided by the ResultTransformationX extensionactionif the result context is a failure. -
inspectSuccess(
void action(T value)) → Result< T> -
Available on Result<
Invokes a passive side-effect callbackT> , provided by the ResultTransformationX extensionactionif the result context is successful. -
throwIfNeeded(
) → T -
Available on Result<
Forcefully unwraps the successful value or throws a managed ResultException.T> , provided by the ResultTransformationX extension -
toNullable(
) → T? -
Available on Result<
Unwraps the Result and returns the successful value if present, otherwise returnsT> , provided by the ResultTransformationX extensionnullwithout throwing an exception.