AdUnitConfiguration.multiplexAdUnit constructor

AdUnitConfiguration.multiplexAdUnit({
  1. required String adSlot,
  2. required AdFormat adFormat,
  3. MatchedContentUiType? matchedContentUiType,
  4. int? rowsNum,
  5. int? columnsNum,
  6. bool isFullWidthResponsive = true,
  7. bool isAdTest = kDebugMode,
})

Creates a configuration object for a Multiplex ad.

Arguments:

  • adSlot: Identifies a specific ad unit from the AdSense console.
  • adFormat: (Desktop only) Specifies a general shape (horizontal, vertical, and/or rectangle) that this ad unit should conform to. To learn more, check: How to use responsive ad tag parameters.
  • matchedContentUiType: Controls the arrangement of the text and images in this Multiplex ad unit. For example, you can choose to have the image and text side by side, the image above the text, etc. More information: How to customize your responsive Multiplex ad unit
  • rowsNum: Specifies how many rows to show within the Multiplex ad unit grid. Requires matchedContentUiType to be set.
  • columnsNum: Specifies how many columns to show within the Multiplex ad unit grid. Requires matchedContentUiType to be set.
  • isFullWidthResponsive: Determines whether this responsive ad unit expands to use the full width of a visitor's mobile device screen. See: How to use responsive ad tag parameters.
  • isAdTest: Whether this ad will be shown in a test environment. Defaults to true in debug mode.

Implementation

AdUnitConfiguration.multiplexAdUnit({
  required String adSlot,
  required AdFormat adFormat,
  MatchedContentUiType? matchedContentUiType,
  int? rowsNum,
  int? columnsNum,
  bool isFullWidthResponsive = true,
  bool isAdTest = kDebugMode,
}) : this._internal(
          adSlot: adSlot,
          adFormat: adFormat,
          matchedContentUiType: matchedContentUiType,
          rowsNum: rowsNum,
          columnsNum: columnsNum,
          isFullWidthResponsive: isFullWidthResponsive,
          isAdTest: isAdTest);