showInterstitialAd static method
展示插屏广告
posId
广告位 id
showPopup
Popup 形式显示(仅 Android)
showFullScreenVideo
插屏全屏视频形式显示
showRewardVideo
插屏激励视频形式显示
autoPlayOnWifi
是否仅在 WiFi 网络下自动播放
autoPlayMuted
自动播放是否静音
detailPageMuted
详情页是否静音
customData
设置服务端验证的自定义信息
userId
设置服务端验证的用户信息
Implementation
static Future<bool> showInterstitialAd(
String posId, {
bool showPopup = false,
bool showFullScreenVideo = false,
bool showRewardVideo = false,
bool autoPlayOnWifi = false,
bool autoPlayMuted = true,
bool detailPageMuted = false,
String? customData,
String? userId,
}) async {
final bool result = await _methodChannel.invokeMethod(
'showInterstitialAd',
{
'posId': posId,
'showPopup': showPopup,
'showFullScreenVideo': showFullScreenVideo,
'showRewardVideo': showRewardVideo,
'autoPlayOnWifi': autoPlayOnWifi,
'autoPlayMuted': autoPlayMuted,
'detailPageMuted': detailPageMuted,
'customData': customData,
'userId': userId,
},
);
return result;
}