result method
Wraps a Function with a Result, if no exception is thrown
returns Ok otherwise returns Err
Implementation
Result<T, Object?> result() {
try {
///
//ignore: avoid_dynamic_calls
return Ok(call());
} catch (e, st) {
return Err(e, st);
}
}