disconnect method

  1. @override
Future<void> disconnect()
override

Disconnect current connection

Implementation

@override
Future<void> disconnect() async {
  if (!isSupported) {
    throw UnsupportedError('SingBox is not supported on this platform');
  }

  try {
    await _iosEngine.disconnect();
  } catch (e) {
    print('SingBox disconnect error: $e');
  }
}