getCardContent method

List<Widget> getCardContent (
  1. BuildContext context
)

Implementation

List<Widget> getCardContent(BuildContext context) {
  List<Widget> content = <Widget>[
    Container(
        padding: EdgeInsets.fromLTRB(5.0, 15.0, 5.0, 5.0),
        child: Text(renderCardName())),
    Container(
      height: 70.0,
      padding: EdgeInsets.fromLTRB(4.0, 12.0, 4.0, 4.0),
      child: ListView(
        scrollDirection: Axis.horizontal,
        children: rankPromotionsWithTimeRange(cardMetaData.promotions)
            .reversed
            .map((Promotion promo) {
          return PromotionChip(promo);
        }).toList(),
      ),
    ),
  ];
  Widget editContent = getEditContent(context);
  if (editContent != null) {
    content.add(editContent);
  }
  if (actions != null) {
    content.add(actions);
  }
  return content;
}