copyWith method

S2ChoiceStyle copyWith({
  1. TextStyle titleStyle,
  2. TextStyle subtitleStyle,
  3. EdgeInsetsGeometry margin,
  4. EdgeInsetsGeometry padding,
  5. double spacing,
  6. bool showCheckmark,
  7. S2ChoiceControl control,
  8. Color highlightColor,
  9. Color color,
  10. Color accentColor,
  11. Clip clipBehavior,
  12. bool outlined,
  13. bool raised,
  14. double opacity,
  15. double elevation,
  16. 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,
  );
}