createBasicCard static method

DynamicCardConfig createBasicCard({
  1. required String title,
  2. required String content,
  3. TextStyle? titleStyle,
  4. TextStyle? contentStyle,
  5. double elevation = 1.0,
  6. Color backgroundColor = Colors.white,
  7. EdgeInsets? padding,
  8. EdgeInsets? margin,
})

Creates a basic card with title and text content

Implementation

static DynamicCardConfig createBasicCard({
  required String title,
  required String content,
  TextStyle? titleStyle,
  TextStyle? contentStyle,
  double elevation = 1.0,
  Color backgroundColor = Colors.white,
  EdgeInsets? padding,
  EdgeInsets? margin,
}) {
  return DynamicCardConfig(
    title: title,
    titleStyle: titleStyle,
    content: [
      CardContentItem(
        type: ContentType.text,
        text: content,
        textStyle: contentStyle,
      ),
    ],
    elevation: elevation,
    backgroundColor: backgroundColor,
    padding: padding,
    margin: margin,
  );
}