disconnect static method

Future<Null> disconnect()

will disable the Web-socket connections manually

While calling the init() function on the app startup, need to inform the SDK that you will be managing the web socket connect from autoEstablishSocketConnection.

Once the connection is disables , you will stop receiving all the real-time events for the logged in user

Implementation

static Future<Null> disconnect() async {
  try {
    await channel.invokeMethod('disconnect', {});
  } on PlatformException catch (_) {
  } catch (e) {
    throw e;
  }
}