unwrapOrNull method
Unwraps a result, yielding the content of an Ok
.
If the value is an Err
, returns null
instead of throwing an exception.
Implementation
Future<T?> unwrapOrNull() => then((result) => result.unwrapOrNull());
Unwraps a result, yielding the content of an Ok
.
If the value is an Err
, returns null
instead of throwing an exception.
Future<T?> unwrapOrNull() => then((result) => result.unwrapOrNull());