init static method

void init(
  1. {required String appId,
  2. SendbirdChatOptions? options}
)

Initializes SendbirdChat with given app ID.

Implementation

static void init({
  required String appId,
  SendbirdChatOptions? options,
}) {
  if (appId == _instance._chat.chatContext.appId) {
    return;
  }

  _instance._chat.disconnect();
  _instance = SendbirdChat._internal();
  _instance._chat =
      Chat(appId: appId, options: options ?? SendbirdChatOptions());
}