import 'dart:io';
void main() async {
// ignore: prefer_typing_uninitialized_variables
String connect;
try {
final result = await InternetAddress.lookup('DESKTOP-TR4ANSP',
type: InternetAddressType.IPv4);
if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) {
connect = 'true';
print(result[0].rawAddress);
}
} on SocketException catch (_) {
connect = 'false';
}
print(connect);
}