initSDK method
Future<V2TimValueCallback<bool> >
initSDK({
- required int sdkAppID,
- required LogLevelEnum loglevel,
- required V2TimSDKListener listener,
初始化SDK
参数
@required int sdkAppID 应用 ID,必填项,可以在控制台中获取
@required LogLevelEnum loglevel 配置信息
@required [InitListener] listener SDK的回调
返回
true:成功;
false:失败
本sdk封装与nativeSDk,也可以参考native文档
Implementation
Future<V2TimValueCallback<bool>> initSDK({
required int sdkAppID,
required LogLevelEnum loglevel,
required V2TimSDKListener listener,
}) {
String 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,
);
}