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