build method
Builds the layout for the content item. This transforms the content into a Flutter Widget.
Implementation
@override
Widget build(BuildContext context, e.Card content) {
final variant = _getVariant(content);
final child = switch (variant) {
_CardRenderVariant.imageOnly => _buildImageOnly(context, content),
_CardRenderVariant.imageAndText => _buildImageAndText(context, content),
_CardRenderVariant.textOnly => _buildTextOnly(context, content),
};
return e.PressEffect(
onTap: content.action != null
? (context) => content.action!.execute(context)
: null,
child: child);
}