unwrapOr method

  1. @override
S unwrapOr(
  1. S defaultValue
)
override

Returns the encapsulated value if this instance represents Ok or the defaultValue if it is Err. Note: This should not be used to determine is Ok or is Err, since when the success type is nullable, a default value of null can be provided, which is ambiguous in meaning.

Implementation

@override
@pragma("vm:prefer-inline")
S unwrapOr(S defaultValue) => defaultValue;