initSDK method Null safety
- {required int sdkAppID,
- required LogLevelEnum loglevel,
- required V2TimSDKListener listener}
Initialize the SDK
Parameter
@required int sdkAppID App ID, required, you can get it in the console
@required LogLevelEnum loglevel Configuration information
@required [InitListener] listener SDK callback
Back
true: success;
false: failure
This sdk package and nativeSDk, you can also refer tonative documentation
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: EnumUtils.convertLogLevelEnum(loglevel),
listenerUuid: uuid,
listener: listener,
uiPlatform: platform,
);
}