initSDK method

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

Implementation

Future<V2TimValueCallback<bool>> initSDK({
  required int sdkAppID,
  required LogLevelEnum loglevel,
  required V2TimSDKListener listener,
  bool? showImLog = false,
}) {
  int platform = _getUiPlatform(StackTrace.current.toString());
  final String uuid = Uuid().v4();
  this.initSDKListenerList[uuid] = listener;
  return ImFlutterPlatform.instance.initSDK(
    sdkAppID: sdkAppID,
    loglevel: loglevel.index,
    listenerUuid: uuid,
    listener: listener,
    uiPlatform: platform,
    showImLog: showImLog,
  );
}