tryCall<R> function

R? tryCall<R>(
  1. R call()
)

Implementation

R? tryCall<R>(R Function() call) {
  try {
    return call();
  } catch (_) {
    return null;
  }
}