connect method

void connect(
  1. String address,
  2. void onConnected(
    1. String
    ),
  3. void onDisconnected(),
  4. void onConnectionError(
    1. String
    ),
)

Implementation

void connect(String address, void Function(String) onConnected,
    void Function() onDisconnected, void Function(String) onConnectionError) {
  _connectCbMap[address] = onConnected;
  _disconnectCbMap[address] = onDisconnected;
  _connectErrorCbMap[address] = onConnectionError;
  _channel.invokeMethod('connect', {"address": address});
}