copyWith method

AppCard copyWith({
  1. AppCardVariant? variant,
  2. String? title,
  3. String? subtitle,
  4. Widget? leading,
  5. Widget? trailing,
  6. Widget? child,
  7. List<Widget>? actions,
  8. VoidCallback? onTap,
  9. VoidCallback? onLongPress,
  10. EdgeInsets? padding,
  11. EdgeInsets? margin,
  12. double? elevation,
  13. Color? backgroundColor,
  14. double? borderRadius,
  15. Color? borderColor,
  16. double? borderWidth,
  17. TextStyle? titleStyle,
  18. TextStyle? subtitleStyle,
  19. EdgeInsetsGeometry? headerPadding,
  20. EdgeInsetsGeometry? actionsPadding,
  21. Color? shadowColor,
  22. MainAxisAlignment? actionsAlignment,
  23. double? headerSpacing,
})

Creates a copy of this card with the given fields replaced by the new values.

Implementation

AppCard copyWith({
  AppCardVariant? variant,
  String? title,
  String? subtitle,
  Widget? leading,
  Widget? trailing,
  Widget? child,
  List<Widget>? actions,
  VoidCallback? onTap,
  VoidCallback? onLongPress,
  EdgeInsets? padding,
  EdgeInsets? margin,
  double? elevation,
  Color? backgroundColor,
  double? borderRadius,
  Color? borderColor,
  double? borderWidth,
  TextStyle? titleStyle,
  TextStyle? subtitleStyle,
  EdgeInsetsGeometry? headerPadding,
  EdgeInsetsGeometry? actionsPadding,
  Color? shadowColor,
  MainAxisAlignment? actionsAlignment,
  double? headerSpacing,
}) {
  return AppCard(
    key: key,
    variant: variant ?? this.variant,
    title: title ?? this.title,
    subtitle: subtitle ?? this.subtitle,
    leading: leading ?? this.leading,
    trailing: trailing ?? this.trailing,
    actionsAlignment: actionsAlignment ?? this.actionsAlignment,
    headerSpacing: headerSpacing ?? this.headerSpacing,
    child: child ?? this.child,
  );
}