mediumAdTemplateLayoutBuilder top-level property

AdLayoutBuilder mediumAdTemplateLayoutBuilder

The medium template is meant to be a one-half to three-quarter page view but can also be used in feeds. It is good for landing pages or splash pages.

Feel free to experiment with placement. Of course, you can also change the source code to suit your requirements.

The default height for this template is 320

Medium Template Preview

Implementation

AdLayoutBuilder get mediumAdTemplateLayoutBuilder {
  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(
          padding: EdgeInsets.only(top: 6.0),
          height: WRAP_CONTENT,
          orientation: HORIZONTAL,
          children: [
            icon,
            AdExpanded(
              flex: 2,
              child: AdLinearLayout(
                width: WRAP_CONTENT,
                margin: EdgeInsets.symmetric(horizontal: 4),
                children: [headline, body, advertiser],
              ),
            ),
          ],
        ),
        media,
        button
      ],
    );
  };
}