setOnMessageCallback method

void setOnMessageCallback (
  1. dynamic callback
)

Implementation

void setOnMessageCallback(callback) {
  if (callback == null) {
    print("Callback parameter in setOnMessageCallback method is required.");
    return;
  }

  _channel.invokeMethod("setOnMessageCallback");

  this._onMessageHandler = callback;
}