getResult<V> function
Implementation
Future<Result<V, Exception>> getResult<V>(Function function) async {
try {
final result = await function.call();
return Result.success(result);
} on Exception catch (error) {
return Result.failure(error);
}
}