dnaextrim / flutter_ironsource_x

IronSource Ads & Mediation Plugin for Flutter
https://pub.dev/packages/flutter_ironsource_x
Apache License 2.0
10 stars 17 forks source link

banner ad not work #12

Closed hortigado closed 2 years ago

hortigado commented 2 years ago

hi. the banner ad work? i implement it but the banner not displayed

hortigado commented 2 years ago

I already solved it, you have to wait for the await IronSource.initialize to finish and you have to show the banner

Loukili-Rachid commented 2 years ago

@hortigado could please share an example I have the same prblm. I will be very thankful

hortigado commented 2 years ago

`

void onInit() async {    
super.onInit();
    var userId = await IronSource.getAdvertiserId();
    await IronSource.validateIntegration();
    await IronSource.setUserId(userId);
    await IronSource.initialize(appKey: appKey, gdprConsent: true);
    bannerAd = IronSourceBannerAd(
      keepAlive: true,
      listener: BannerAdListener(),
      size: BannerSize.BANNER,
    );
    update();
}

`

hortigado commented 2 years ago

`

Align(
            alignment: Alignment.bottomCenter,
            child: GetBuilder<AddController>(
              init: AddController(),
              builder: (AddController _) {
                return Container(child: _.bannerAd);
              },
            ),
          ),

` i use getx

Loukili-Rachid commented 2 years ago

@hortigado many thank first , i tried but without succeed , i'm using getx i cant figure out how to handle your code with it