the below code can work very well if wifi is not connected
var connectivityResult = await (Connectivity().checkConnectivity()); if (connectivityResult == Con