只需要关键字async就表示该函数异步执行,返回类型是Future<T>。 Future<String> getStr()async{ var str = HttpRequest.getString('www.fgyong.cn'); return str; }.
確定! 回上一頁