loadSplashAd static method
void
loadSplashAd(})
加载原生开屏
Implementation
static void loadSplashAd(
/// 广告位ID
String posId,
{
/// 用户ID,选填,用于定位错误日志
String userId = "",
/// 自定义背景图的原生资源类型,仅支持(default|mipmap|drawable),其他值无效
/// default时不需要配置bgResName,SDK会读取原生的默认启动页背景
/// mipmap或drawable时,需要配置资源名,默认或原生资源不存在时默认主题背景
String bgResType = "",
/// 自定义背景图的原生资源名,需要搭配 bgResType 传入,默认开屏页为白色背景
String bgResName = "",
/// 开屏回调。具体事件见 example
Function(IPDEvent ret)? splashListener}) {
IPDSdkMessageChannel.setSplashListener(splashListener);
_sdkMethodChannel.invokeMethod("splash", {
"posId": posId,
"userId": userId,
"bgResType": bgResType,
"bgResName": bgResName
});
}