flutter_ads

Last updated:

0 purchases

flutter_ads Image
flutter_ads Images
Add to Cart

Description:

flutter ads

0.4.3 #
新的广告使用方法 #
flutter_ads: ^0.4.3
新增预初始化 TTAD激励视频接口 #
preInitVideo
参数配置 bannerWidth nativeWidth bannerHeight nativeHeight分别设置banner和native广告的期望高度 这在调试ttad广告中很有用 #
setConfig(
{bool isNeedPermission = true,
int bannerWidth = 360,
int nativeWidth = 360,
double bannerHeight,
double nativeHeight})
开屏广告 #
Android平台内部集成了广告sdk 目前支持gdt和穿山甲广告
if(Platform.isAndroid){
adsSplashView = AdsSplashView(
adsTick: (int) {
print(int);
},
asdIsFinish: () {
Navigator.of(context).pop();
},
);
}else if(Platform.isIOS){
adsSplashView = AdsSplashView(

adsTick: (int) {
print(int);
},
asdIsFinish: () {
Navigator.of(context).pop();
},
);
}

copied to clipboard
Bannner广告 #
if (Platform.isAndroid) {
adsBannerView = AdsBannerView();
} else if (Platform.isIOS) {
adsBannerView = AdsBannerView(
adsFailure: () {
print('加载失败');
},
asdIsFinish: () {
print('加载结束');
},
);
}
Container(
color: Colors.blue,
child: ListView.builder(
itemCount: 10,
itemBuilder: (context, index) {
return adsBannerView;
})),
copied to clipboard
激励视频(目前仅限于Android平台的穿山甲广告) #

激励视频
FlutterAds.initRewardVideo(callback: (value){
print("广告结果$value");
test ="广告结果1$value";
setState(() {});
});

插屏 initInsertVideo

copied to clipboard
Android广告加载不出来请检查后台kv配置,包名,签名是否有误 #

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.