Result<T extends Object, E extends Exception>.err constructor
Result<T extends Object, E extends Exception>.err (
- E err
Err
An Err can be created with an exception
final err1 = Result<String, Exception>.err(Exception('Unexpected'));
final err2 = Err<String, Exception>(Exception('Unexpected'));
Implementation
factory Result.err(E err) = Err;