cardChild property
Widget?
get
cardChild
Builds the child widget for the card, which includes the content and footer,
Implementation
Widget? get cardChild {
if (content == null && footer == null) return null;
final children = <Widget>[];
/// Add divider between title/subtitle and content if content exists and either title or subtitle is provided
if (title != null || subtitle != null) {
children.add(
const FDivider(
style: .delta(padding: .value(EdgeInsets.symmetric(vertical: 12))),
),
);
}
/// Add content
if (content != null) {
children.add(content!);
}
/// Add a divider between content and footer if both exist
if (content != null && footer != null) {
children.add(
const FDivider(
style: .delta(padding: .value(EdgeInsets.symmetric(vertical: 12))),
),
);
}
/// Add footer
if (footer != null) {
children.add(footer!);
}
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: children,
);
}