hasEthernet static method

Future<bool> hasEthernet()

Implementation

static Future<bool> hasEthernet() async {
  if (!kIsWeb) {
    final List<ConnectivityResult> connectivityResult = await Connectivity().checkConnectivity();
    return connectivityResult.contains(ConnectivityResult.ethernet);
  }
  return true;
}