copyWith method

BsCard copyWith({
  1. Widget? header,
  2. Widget? body,
  3. Widget? footer,
  4. List<Widget>? children,
  5. Widget? image,
  6. BsCardImagePosition? imagePosition,
  7. int? imageFlex,
  8. int? contentFlex,
  9. BsVariant? variant,
  10. BsVariant? borderVariant,
  11. Color? color,
  12. Color? borderColor,
  13. BorderRadius? borderRadius,
  14. double? width,
  15. double? height,
})

Creates a copy of this card with the given parameters overridden.

Implementation

BsCard copyWith({
  Widget? header,
  Widget? body,
  Widget? footer,
  List<Widget>? children,
  Widget? image,
  BsCardImagePosition? imagePosition,
  int? imageFlex,
  int? contentFlex,
  BsVariant? variant,
  BsVariant? borderVariant,
  Color? color,
  Color? borderColor,
  BorderRadius? borderRadius,
  double? width,
  double? height,
}) {
  return BsCard(
    key: key,
    header: header ?? this.header,
    body: body ?? this.body,
    footer: footer ?? this.footer,
    image: image ?? this.image,
    imagePosition: imagePosition ?? this.imagePosition,
    imageFlex: imageFlex ?? this.imageFlex,
    contentFlex: contentFlex ?? this.contentFlex,
    variant: variant ?? this.variant,
    borderVariant: borderVariant ?? this.borderVariant,
    color: color ?? this.color,
    borderColor: borderColor ?? this.borderColor,
    borderRadius: borderRadius ?? this.borderRadius,
    width: width ?? this.width,
    height: height ?? this.height,
    children: children ?? this.children,
  );
}