getInlineAdaptiveBannerAdSize static method

InlineAdaptiveSize getInlineAdaptiveBannerAdSize(
  1. int width,
  2. int maxHeight
)

Gets an AdSize with the given width and height that is always 0.

This ad size allows Google servers to choose an optimal ad size with a height less than or equal to maxHeight. After the ad is loaded, you should update the height of the ad container by calling BannerAd.getPlatformAdSize or AdManagerBannerAd.getPlatformAdSize from the ad load callback. This ad size is most suitable for ads intended to be displayed inside scrollable content.

Implementation

static InlineAdaptiveSize getInlineAdaptiveBannerAdSize(
    int width, int maxHeight) {
  return InlineAdaptiveSize._(width: width, maxHeight: maxHeight);
}