How do I check Internet Connectivity using HTTP requests(Flutter/Dart)?

前端 未结 3 546
野的像风
野的像风 2020-12-21 11:21

This is probably a noob question, but how do I make my response throw an exception if the user does not have an internet connection or if it takes too long to fetch the data

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-21 11:34

    You don't need to use http to check the connectivity yourself, simply use connectivity library

提交回复
热议问题