err method
Converts from Result<T, E>
to E?
.
Examples
Basic usage:
Result<int, String> x = Ok(2);
expect(x.err(), null);
Result<int, String> x = Err('An error occured');
expect(x.err(), 'An error occured');
Implementation
@override
E? err() => null;