smallAdTemplateLayoutBuilder top-level property

AdLayoutBuilder smallAdTemplateLayoutBuilder

The small template is ideal for ListView, or any time you need a long rectangular ad view. For instance you could use it for in-feed ads.

The default height for this template is 115

Small Template Preview

Implementation

AdLayoutBuilder get smallAdTemplateLayoutBuilder {
  return (ratingBar, media, icon, headline, advertiser, body, price, store,
      attribution, button) {
    return AdLinearLayout(
      decoration: AdDecoration(backgroundColor: Colors.white),
      width: MATCH_PARENT,
      height: MATCH_PARENT,
      gravity: LayoutGravity.center_vertical,
      padding: EdgeInsets.all(8.0),
      children: [
        attribution,
        AdLinearLayout(
          margin: EdgeInsets.only(top: 6.0),
          orientation: HORIZONTAL,
          children: [
            icon,
            AdExpanded(
              flex: 2,
              child: AdLinearLayout(
                width: WRAP_CONTENT,
                margin: EdgeInsets.symmetric(horizontal: 4),
                children: [headline, body, advertiser],
              ),
            ),
            AdExpanded(flex: 3, child: button),
          ],
        ),
      ],
    );
  };
}