checkNetwork method
Implementation
Future<bool> checkNetwork(BuildContext context) async {
var result = await Connectivity().checkConnectivity();
if (result != ConnectivityResult.none) return true;
Fluttertoast.showToast(msg: S.of(context).networkErrorTip);
return false;
}