flutter_ads 0.1.3

开屏广告

Android平台内部集成了广告sdk 目前支持gdt和穿山甲广告,ios目前只能手动填入appid和广告位id
if(Platform.isAndroid){
      adsSplashView = AdsSplashView(
        adsTick: (int) {
          print(int);
        },
        asdIsFinish: () {
          Navigator.of(context).pop();
        },
      );
    }else if(Platform.isIOS){
      adsSplashView = AdsSplashView(
        appid: "1105344611",
        placementID: "9040714184494018",
        adsTick: (int) {
          print(int);
        },
        asdIsFinish: () {
          Navigator.of(context).pop();
        },
      );
    }

Bannner广告

if (Platform.isAndroid) {
      adsBannerView = AdsBannerView();
    } else if (Platform.isIOS) {
      adsBannerView = AdsBannerView(
        appid: '1105344611',
        placementID: '4090812164690039',
        adsFailure: () {
          print('加载失败');
        },
        asdIsFinish: () {
          print('加载结束');
        },
      );
    }
Container(
          color: Colors.blue,
          child: ListView.builder(
              itemCount: 10,
              itemBuilder: (context, index) {
                return adsBannerView;
              })),

激励视频(目前仅限于Android平台的穿山甲广告)


 FlutterAds.initRewardVideo(appKey:"5007439",codeId: "907439399",userId:"1992",callback: (value){
                      print("广告结果$value");
                      test ="广告结果1$value";
                      setState(() {});
                    });

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

Libraries

ads_bannerview
ads_nativeview
ads_splashview
ads_videoview
flutter_ads
i18n