checkDomainExists function
Native implementation of DNS lookup using dart:io.
Implementation
Future<bool> checkDomainExists(String host) async {
try {
final lookup = await InternetAddress.lookup(host);
return lookup.isNotEmpty && lookup.first.address.isNotEmpty;
} catch (_) {
return false;
}
}