类 , 用于表示 将来 某个时间 可能出现的结果 ;
http.Get 返回值是 Futurehttp.Response> , 其中的 http.Response 泛型中 , 封装了 HTTP Request.../http.dart' as http;
调用 http.get 方法 , 发送 Get 请求 , 会返回一个包括 http.Response 泛型的 Future , 返回值类型为 Futurehttp.Response...类 , 用于表示 将来 某个时间 可能出现的结果 ;
http.Get 返回值是 Futurehttp.Response> , 其中的 http.Response 泛型中 , 封装了 HTTP Request...请求对应的 Response 响应数据 , 也就是服务器返回给请求端的数据 ;
五、将 Get / Post 请求结果 Futurehttp.Response> 转为 Dart 对象
----
将...Future 的泛型 CommonModel 对象作为参数 ;
最后获取到返回值后 , 将返回值设置到 httpGetResult 成员中 ;
调用 setState 方法 , 更新 UI ;
七、完整代码