init static method

Future<bool> init({
  1. required String appId,
  2. SendbirdChatOptions? options,
})

Initializes SendbirdChat with given app ID.

Implementation

static Future<bool> init({
  required String appId,
  SendbirdChatOptions? options,
}) async {
  bool result = true;

  _instance._chat.chatContext.init(
    chat: _instance._chat,
    appId: appId,
    options: options ?? SendbirdChatOptions(),
  );

  //+ [DBManager]
  await _instance._chat.dbManager.init();

  _instance._chat.dbManager.appendLocalCacheStat(
    useLocalCache: _instance._chat.chatContext.options.useCollectionCaching,
  );
  //- [DBManager]
  return result;
}