connect static method

Future connect({
  1. void onConnectionStateChange(
    1. ConnectionStateChange?
    )?,
  2. void onError(
    1. ConnectionError?
    )?,
})

Connect the client to pusher

Implementation

static Future connect({
  void Function(ConnectionStateChange?)? onConnectionStateChange,
  void Function(ConnectionError?)? onError,
}) async {
  _onConnectionStateChange = onConnectionStateChange;
  _onError = onError;
  await _channel.invokeMethod('connect');
}