setOnConnectionHandler method

void setOnConnectionHandler (
  1. Function callback
)

Implementation

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

  _channel.invokeMethod("setOnConnectionHandler");

  this._onConnectionHandler = callback;
}