Future<Result<E>> tryCatch<E>(Function f) async { try { return await f.call(); } catch (e, st) { return Result.error(msg: e.toString(), stacktrace: st); } }