GTAdsBannerWidget(
//需要的广告位组
codes: [
GTAdsCode(alias: "ylh", probability: 5,androidId: "9055941703623169",iosId: "3015049793632342"),
],
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.width/6.4,
//超时时间 当广告失败后会依次重试其他广告 直至所有广告均加载失败 设置超时时间可提前取消
timeout: 5,
//默认随机模式
model: GTAdsModel.RANDOM,
callBack: GTAdsCallBack(
onShow: (code) {
print("横幅显示 ${code.toJson()}");
},
onClick: (code) {
print("横幅点击 ${code.toJson()}");
},
onFail: (code,message) {
print("横幅错误 $message");
},
onClose: (code) {
print("横幅关闭 ${code.toJson()}");
},
onTimeout: () {
print("横幅加载超时");
},
onEnd: () {
print("横幅所有广告位都加载失败");
},
),
)
E/flutter_tencentad_BannerAdView(18267): ---onADReceive---BannerAdView Banner广告加载成功回调
I/flutter (18267): onShow ==== {width: 373.2272644042969, height: 0.8636363744735718}
I/flutter (18267): 横幅显示 {alias: ylh, androidId: 9055941703623169, iosId: 3015049793632342, probability: 5}
E/FrameEvents(18267): updateAcquireFence: Did not find frame.
E/gdt_ad_mob(18267): ADEvent 参数为空,type:109
E/FrameEvents(18267): updateAcquireFence: Did not find frame.
E/flutter_tencentad_BannerAdView(18267): ---onADExposure---BannerAdView Banner广告曝光