Flutter Chopper Internet connectivity

440 views Asked by At

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

1

There are 1 answers

0
Michael Horn On

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