init static method
- @Deprecated("使用 initWithoutStart() 和 start() 方法替代")
- String appId, {
- bool isDebug = true,
- int age = 0,
- ZJCustomController? customController,
- dynamic initListener(
- ZJEvent ret
初始化SDK
Implementation
@Deprecated("使用 initWithoutStart() 和 start() 方法替代")
static void init(
/// 应用ID
String appId,
{
/// 控制日志打印
bool isDebug = true,
/// 用户年龄,默认为0
int age = 0,
/// 隐私权限控制
ZJCustomController? customController,
/// 初始化回调
/// [ret.event] {ZJEventAction.initSuccess | ZJEventAction.initFailed},初始化失败时,需要解析ret.code等信息排查
/// [ret.code] 错误码
/// [ret.msg] 错误描述
Function(ZJEvent ret)? initListener}) {
ZJSdkMessageChannel.init(initListener);
_sdkMethodChannel.invokeMethod("init", {
"appId": appId,
"isDebug": isDebug,
"age": age,
"customController": customController?.toMap(),
});
}