reconnect static method

Future<bool> reconnect()

Tries reconnection with previously and successfully connected user information. This can be called in ConnectionHandler.onReconnectFailed or where you check the device network status to let the SDK try reconnection. ConnectionHandler.onReconnectStarted will be called after you call this (note that it will not be called if there is previously started connection process which has not finished), and ConnectionHandler.onReconnectFailed or ConnectionHandler.onReconnectSucceeded will be called according to the connection status afterwards. Usually, the SDK automatically retries connection process when the network connection is lost with some backoff period. When you call this method, you can start connection process immediately.

Implementation

static Future<bool> reconnect() async {
  sbLog.i(StackTrace.current);
  return await _instance._chat.reconnect(reset: true);
}