createHeaderCard static method

DynamicCardConfig createHeaderCard({
  1. required String headerTitle,
  2. required String title,
  3. required List<CardContentItem> content,
  4. String? headerSubtitle,
  5. IconData? headerIcon,
  6. Color? headerIconColor,
  7. TextStyle? titleStyle,
  8. double elevation = 1.0,
  9. Color backgroundColor = Colors.white,
  10. EdgeInsets? padding,
  11. EdgeInsets? margin,
})

Creates a card with header section including icon and title

Implementation

static DynamicCardConfig createHeaderCard({
  required String headerTitle,
  required String title,
  required List<CardContentItem> content,
  String? headerSubtitle,
  IconData? headerIcon,
  Color? headerIconColor,
  TextStyle? titleStyle,
  double elevation = 1.0,
  Color backgroundColor = Colors.white,
  EdgeInsets? padding,
  EdgeInsets? margin,
}) {
  return DynamicCardConfig(
    title: title,
    titleStyle: titleStyle,
    header: CardHeader(
      title: headerTitle,
      subtitle: headerSubtitle,
      icon: headerIcon,
      iconColor: headerIconColor,
    ),
    content: content,
    elevation: elevation,
    backgroundColor: backgroundColor,
    padding: padding,
    margin: margin,
    layout: CardLayout.header,
  );
}