copyWith method

ToggleButtonsThemeData copyWith(
  1. {TextStyle? textStyle,
  2. BoxConstraints? constraints,
  3. Color? color,
  4. Color? selectedColor,
  5. Color? disabledColor,
  6. Color? fillColor,
  7. Color? focusColor,
  8. Color? highlightColor,
  9. Color? hoverColor,
  10. Color? splashColor,
  11. Color? borderColor,
  12. Color? selectedBorderColor,
  13. Color? disabledBorderColor,
  14. BorderRadius? borderRadius,
  15. double? borderWidth}
)

Creates a copy of this object but with the given fields replaced with the new values.

Implementation

ToggleButtonsThemeData copyWith({
  TextStyle? textStyle,
  BoxConstraints? constraints,
  Color? color,
  Color? selectedColor,
  Color? disabledColor,
  Color? fillColor,
  Color? focusColor,
  Color? highlightColor,
  Color? hoverColor,
  Color? splashColor,
  Color? borderColor,
  Color? selectedBorderColor,
  Color? disabledBorderColor,
  BorderRadius? borderRadius,
  double? borderWidth,
}) {
  return ToggleButtonsThemeData(
    textStyle: textStyle ?? this.textStyle,
    constraints: constraints ?? this.constraints,
    color: color ?? this.color,
    selectedColor: selectedColor ?? this.selectedColor,
    disabledColor: disabledColor ?? this.disabledColor,
    fillColor: fillColor ?? this.fillColor,
    focusColor: focusColor ?? this.focusColor,
    highlightColor: highlightColor ?? this.highlightColor,
    hoverColor: hoverColor ?? this.hoverColor,
    splashColor: splashColor ?? this.splashColor,
    borderColor: borderColor ?? this.borderColor,
    selectedBorderColor: selectedBorderColor ?? this.selectedBorderColor,
    disabledBorderColor: disabledBorderColor ?? this.disabledBorderColor,
    borderRadius: borderRadius ?? this.borderRadius,
    borderWidth: borderWidth ?? this.borderWidth,
  );
}