copyWith method
TxExpansionPanelThemeData
copyWith({
- Color? backgroundColor,
- Color? collapsedBackgroundColor,
- EdgeInsetsGeometry? panelPadding,
- AlignmentGeometry? expandedAlignment,
- EdgeInsetsGeometry? childrenPadding,
- Color? iconColor,
- Color? collapsedIconColor,
- Color? textColor,
- Color? collapsedTextColor,
- ShapeBorder? shape,
- ShapeBorder? collapsedShape,
- Clip? clipBehavior,
- AnimationStyle? expansionAnimationStyle,
- ExpansionPanelControlAffinity? controlAffinity,
- Decoration? childrenDecoration,
override
创建此对象的副本,并将给定字段替换为新值。
Implementation
@override
TxExpansionPanelThemeData copyWith({
Color? backgroundColor,
Color? collapsedBackgroundColor,
EdgeInsetsGeometry? panelPadding,
AlignmentGeometry? expandedAlignment,
EdgeInsetsGeometry? childrenPadding,
Color? iconColor,
Color? collapsedIconColor,
Color? textColor,
Color? collapsedTextColor,
ShapeBorder? shape,
ShapeBorder? collapsedShape,
Clip? clipBehavior,
AnimationStyle? expansionAnimationStyle,
ExpansionPanelControlAffinity? controlAffinity,
Decoration? childrenDecoration,
}) {
return TxExpansionPanelThemeData(
backgroundColor: backgroundColor ?? this.backgroundColor,
collapsedBackgroundColor:
collapsedBackgroundColor ?? this.collapsedBackgroundColor,
panelPadding: panelPadding ?? this.panelPadding,
expandedAlignment: expandedAlignment ?? this.expandedAlignment,
childrenPadding: childrenPadding ?? this.childrenPadding,
iconColor: iconColor ?? this.iconColor,
collapsedIconColor: collapsedIconColor ?? this.collapsedIconColor,
textColor: textColor ?? this.textColor,
collapsedTextColor: collapsedTextColor ?? this.collapsedTextColor,
shape: shape ?? this.shape,
collapsedShape: collapsedShape ?? this.collapsedShape,
clipBehavior: clipBehavior ?? this.clipBehavior,
expansionAnimationStyle:
expansionAnimationStyle ?? this.expansionAnimationStyle,
childrenDecoration: childrenDecoration,
controlAffinity: controlAffinity,
);
}