checkOutsideNet static method
dynamic
checkOutsideNet(
{ - dynamic callBack(
- bool isOutsideNet
)?,
})
Implementation
static checkOutsideNet({Function(bool isOutsideNet)? callBack}) {
BasicMessageChannel messageChannel = const BasicMessageChannel(
messageForWifiChannelID, StandardMessageCodec());
Map map = {'wifiName': '', 'wifiPassword': '', 'operation': 'check'};
messageChannel.send(map);
messageChannel.setMessageHandler((message) async {
bool isOutSide = message["isOutside"];
if (callBack != null) {
callBack(isOutSide);
}
});
}