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 moreHow do I make network calls in flutter?
Luckily, Dart and Flutter provide tools, such as the http package, for this type of work. This recipe uses the following steps: Add the http package.
Read moreHow do you network like a pro in flutter?
How to do Networking like a Pro in Flutter?
Read more