ValueToErrorOrExt<TValue> extension
This Dart extension named ValueToErrorOrExt
is adding a method toErrorOr()
to any type TValue
.
This method allows converting a value of type TValue
into an ErrorOr<TValue>
object by calling
the fromValue
constructor of the ErrorOr
class and passing the value as a parameter. This
extension simplifies the process of creating an ErrorOr
object from a single value.
- on
-
- TValue
Methods
-
toErrorOr(
) → ErrorOr< TValue> -
Available on TValue, provided by the ValueToErrorOrExt extension