setOnNewReplyReceivedCallback static method

Future<void> setOnNewReplyReceivedCallback(
  1. Function function
)

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');
}