initSDK static method
Future<void>
initSDK(
- String appId,
- String url, {
- String channel = "",
- bool isDebug = false,
- DTLogLevel logLevel = DTLogLevel.DEBUG,
初始化入口
appId应用id,后台分配url服务器地址,后台分配channel渠道,默认为空字符串,可用 ROIQueryChannel.GP,具体联系商务isDebug是否打开调试,调试模式下将打印log, 默认关闭logLevellog 的级别,默认为 2 (Log.VERBOSE),仅在 isDebug = true 有效
Implementation
static Future<void> initSDK(String appId, String url,
{String channel = "",
bool isDebug = false,
DTLogLevel logLevel = DTLogLevel.DEBUG}) {
var typeSuffix = "";
if (Platform.isIOS) {
typeSuffix = "-iOS";
} else if (Platform.isAndroid) {
typeSuffix = "-Android";
} else {
// Unsupported platforms
typeSuffix = "-${Platform.operatingSystem}";
}
return DTPigeon().initSDK(appId, url, channel, isDebug, logLevel, {
"#sdk_type": "Flutter$typeSuffix",
"#sdk_version_name": _versionName,
});
}