errorOrNull property
The contained error if this
is an Err, or null
otherwise.
Examples
// prints "null"
print(const Ok<int, String>(2).errorOrNull);
// prints "error"
print(const Err<int, String>('error').errorOrNull);
Implementation
@override
@useResult
E get errorOrNull => error;