initSDK method

Future<V2TimValueCallback<bool>> initSDK({
  1. required int sdkAppID,
  2. required LogLevelEnum loglevel,
  3. required V2TimSDKListener listener,
  4. bool? showImLog = false,
  5. List<V2TimPlugins>? plugins,
})

Implementation

Future<V2TimValueCallback<bool>> initSDK({
  required int sdkAppID,
  required LogLevelEnum loglevel,
  required V2TimSDKListener listener,
  bool? showImLog = false,
  List<V2TimPlugins>? plugins,
}) {
  int platform = _getUiPlatform(StackTrace.current.toString());
  currentLoginInfo["a"] = sdkAppID.toString();
  return TencentCloudChatSdkPlatform.instance.initSDK(
    sdkAppID: sdkAppID,
    loglevel: loglevel.index,
    listener: listener,
    uiPlatform: platform,
    showImLog: showImLog,
    plugins: plugins ?? [],
  );
}