doesConnectTo method

  1. @override
Future<bool> doesConnectTo(
  1. String address
)
override

Implementation

@override
Future<bool> doesConnectTo(String address) async {
  try {
    final result = await InternetAddress.lookup(address);
    return result.isNotEmpty && result[0].rawAddress.isNotEmpty;
  } catch (_) {
    return false;
  }
}