getPortraitInlineAdaptiveBannerAdSize static method

InlineAdaptiveSize getPortraitInlineAdaptiveBannerAdSize(
  1. int width
)

Gets an AdSize in portrait orientation with the given width and 0 height.

This ad size allows Google servers to choose an optimal ad size with a height less than or equal to the height of the screen in portrait orientation. 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 getPortraitInlineAdaptiveBannerAdSize(int width) {
  return InlineAdaptiveSize._(
      width: width, orientation: Orientation.portrait);
}