copyWith method
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,
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,
);
}