Future<T> tryOrAsync<T>(FutureOr<T> Function() worker, T onError) async { try { return await worker(); } catch (e) { return onError; } }