copyWith method
S2ChoiceStyle
copyWith({
- TextStyle? titleStyle,
- TextStyle? subtitleStyle,
- EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? padding,
- double? spacing,
- bool? showCheckmark,
- S2ChoiceControl? control,
- Color? highlightColor,
- Color? color,
- Color? accentColor,
- Clip? clipBehavior,
- bool? outlined,
- bool? raised,
- double? opacity,
- double? elevation,
- ShapeBorder? shape,
Creates a copy of this S2ChoiceStyle but with the given fields replaced with the new values.
Implementation
S2ChoiceStyle copyWith({
TextStyle? titleStyle,
TextStyle? subtitleStyle,
EdgeInsetsGeometry? margin,
EdgeInsetsGeometry? padding,
double? spacing,
bool? showCheckmark,
S2ChoiceControl? control,
Color? highlightColor,
Color? color,
Color? accentColor,
Clip? clipBehavior,
bool? outlined,
bool? raised,
double? opacity,
double? elevation,
ShapeBorder? shape,
}) {
return S2ChoiceStyle(
titleStyle: this.titleStyle?.merge(titleStyle) ?? titleStyle,
subtitleStyle: this.subtitleStyle?.merge(subtitleStyle) ?? subtitleStyle,
margin: margin ?? this.margin,
padding: padding ?? this.padding,
spacing: spacing ?? this.spacing,
showCheckmark: showCheckmark ?? this.showCheckmark,
control: control ?? this.control,
highlightColor: highlightColor ?? this.highlightColor,
color: color ?? this.color,
accentColor: accentColor ?? this.accentColor,
clipBehavior: clipBehavior ?? this.clipBehavior,
outlined: outlined ?? this.outlined,
raised: raised ?? this.raised,
opacity: opacity ?? this.opacity,
elevation: elevation ?? this.elevation,
shape: shape ?? this.shape,
);
}