native_admob_flutter icon indicating copy to clipboard operation
native_admob_flutter copied to clipboard

Adaptive banner not getting size properly

Open erperejildo opened this issue 3 years ago • 2 comments

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?

erperejildo avatar Jan 30 '22 12:01 erperejildo

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.

bdlukaa avatar Jan 30 '22 12:01 bdlukaa

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

erperejildo avatar Jan 30 '22 20:01 erperejildo