invokeSafelyWith<T, A> static method
Invokes the given function safely. By safely, we mean it will catch all exceptions and ignore them.
Implementation
static Future<T?> invokeSafelyWith<T, A>(FutureOr<T> action(A arg), A arg) async {
try {
return await action(arg);
} catch (_) {
}
}