How in flutter project check internet connectivity and throw a page with text like "No internet" using Chopper only? without data_connection_checker or else
Asked
Active
Viewed 363 times
1 Answers
1
Chopper interacts with HTTP/HTTPS, whereas internet connectivity checking deals with lower levels of the IP stack.
You can technically try to make a request, and see if you get some kind of error, but that's not a reliable way. Often if there's no connection, the request will timeout, which could take a while. Even if you set a short timeout, it's much better to use a connectivity client.
The canonical plugin is connectivity_plus

Michael Horn
- 3,819
- 9
- 22