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 get network status in flutter?
Sample usage to check current status: import ‘package:connectivity_plus/connectivity_plus. dart’; var connectivityResult = await (Connectivity(). checkConnectivity()); if (connectivityResult == ConnectivityResult .
Read moreHow do I connect my flutter to Wi-Fi?
Flutter WiFi Connect
Read more