Skip to content
This repository has been archived by the owner on Mar 12, 2022. It is now read-only.

Adaptive banner not getting size properly #131

Open
erperejildo opened this issue Jan 30, 2022 · 2 comments
Open

Adaptive banner not getting size properly #131

erperejildo opened this issue Jan 30, 2022 · 2 comments

Comments

@erperejildo
Copy link

erperejildo commented Jan 30, 2022

return SafeArea(
            child: Stack(
              children: [
                Column(
                  children: <Widget>[
                    Provider.of<AdState>(context).initialized
                        ?
                        Container(
                            color: Theme.of(context).primaryColor,
                            width: double.infinity,
                            height: 150, // just to test it
                            child: BannerAd(
                              builder: (context, child) {
                                return child;
                              },
                              size: BannerSize.ADAPTIVE,
                            ),
                          )
                        : Container(),
                    Expanded(child: child!),
                  ],
                ),
              ],
            ),
          );

Simulator Screen Shot - iPhone 13 - 2022-01-30 at 13 03 00

Shouldn't it cover more of the blue and/or the black area?

@bdlukaa
Copy link
Owner

bdlukaa commented Jan 30, 2022

You can't define a height for it. Adaptive banner works this way:

It gets the current available width and provides you a height for the banner. The height will vary, but it should cover the whole width.

@erperejildo
Copy link
Author

You can't define a height for it. Adaptive banner works this way:

It gets the current available width and provides you a height for the banner. The height will vary, but it should cover the whole width.

you can see the black area on both sides

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants