setOnNewReplyReceivedCallback static method
Sets a block of code that gets executed when a new message is received.
function
- A callback that gets executed when a new message is received.
Implementation
static Future<void> setOnNewReplyReceivedCallback(Function function) async {
_channel.setMethodCallHandler(_handleMethod);
_onNewReplyReceivedCallback = function;
await _channel.invokeMethod<Object>('setOnNewReplyReceivedCallback');
}