disconnect method
Disconnect current connection
Implementation
@override
Future<void> disconnect() async {
if (!isSupported) {
throw UnsupportedError('LibXray is not supported on this platform');
}
try {
if (Platform.isIOS || Platform.isMacOS) {
await _iosEngine.disconnect();
} else if (Platform.isAndroid) {
await _androidEngine.disconnect();
}
} catch (e) {
print('LibXray disconnect error: $e');
}
}