Android devices detect captive portals requesting a specific URL , that currently is http://connectivitycheck.gstatic.com/generate_204. If they receive a 204 response then there’s connectivity. If they receive a 30x response, then there’s a captive portal in the way.
Read moreHow does flutter handle internet connection?
First, add it as a dependency in your pubspec. yaml file. Then, run flutter pub get to install the package.
Read moreHow do I know if my internet connection is fluttering?
To check whether the device is connected to a Wi-Fi or mobile network, you can use the connectivity_plus package , which has the capability to check the current connectivity state and listen to connectivity state change. If you want to check whether the device has internet access, you can perform an address lookup.
Read more