buildContent method
Implementation
Widget buildContent() {
return Expanded(
child: Container(
height: Style.cardThumbSize,
child: Stack(
children: <Widget>[
Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: centered
? CrossAxisAlignment.center
: CrossAxisAlignment.start,
children: <Widget>[
customTitle ??
Text(title!,
style: TextStyle(
fontSize: Style.cardFontSize,
fontWeight: FontWeight.bold)),
customDesc ??
Text(desc!,
maxLines: 1,
style: TextStyle(
fontSize: Style.cardFontSize,
color: Style.cardDescColor)),
SizedBox(height: Style.intervalSm),
customTags ?? Container()
],
),
Positioned(
bottom: 0,
left: 0,
right: 0,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.ideographic,
children: <Widget>[
customPrice ?? Price(value: price, currency: currency),
SizedBox(width: Style.intervalSm),
customOriginPrice ??
(originPrice != null
? Text(
"$currency${originPrice!.toStringAsFixed(2)}",
style: TextStyle(
color: Style.cardOriginPriceColor,
fontSize: Style.cardOriginPriceFontSize,
decoration: TextDecoration.lineThrough))
: Container())
],
),
customNum ??
Text("x$num",
style: TextStyle(
fontSize: Style.cardFontSize,
color: Style.cardNumColor))
],
),
)
],
),
),
);
}