Closed yasngencc closed 3 years ago
That won't be dynamic i'm afraid. I'm trying to create a general way so that everyone can use that. If that still doesn't work for your project, you can always download the plugin, make changes you want to make and use it as a private plugin.
merhaba;
void subscribeToHubMethod(String methodName) async { try { assert(methodName != null, "methodName can not be null."); await _channel.invokeMethod("listenToHubMethod", methodName); } on PlatformException catch (ex) { print("Platform Error: ${ex.message}"); return Future.error(ex.message); } on Exception catch (ex) { print("Error: ${ex.toString()}"); return Future.error(ex.toString()); } }
burada nasıl bir değişiklik yapmam gerekiyor.. yardım edebilirmisiniz?
Get the latest version, this method has been deprecated, see the example.
await connection.start();
connection.on('ReceiveMessage', (message) { print(message.toString()); }); connection.on('ReceiveMessage2', (message) { print(message.toString()); });