switchServer method
Switch current server
Stops current connection, changes configuration and connects to new server
config - JSON string with new server configuration
Implementation
@override
Future<bool> switchServer(String config) async {
try {
final result = await methodChannel.invokeMethod<bool>('switchServer', {'config': config});
return result ?? false;
} catch (e) {
debugPrint('Error switching server: $e');
return false;
}
}