📅  最后修改于: 2022-03-11 15:00:19.105000             🧑  作者: Mango
final http.Response response =
await http.get(Uri.parse(URL_TO_FETCH_DATA))
.timeout(const Duration(seconds: 5));
reference:
https://stackoverflow.com/questions/51487818/set-timeout-for-httpclient-get-request