copyWith method

ButtonThemeData copyWith({
  1. Axis? axis,
  2. IconThemeData? iconThemeData,
  3. double? itemSpacing,
  4. double? filledSpacing,
  5. double? height,
  6. double? minWidth,
  7. TextStyle? textStyle,
  8. Color? disabledColor,
  9. Color? color,
  10. Color? focusColor,
  11. Color? hoverColor,
  12. Color? highlightColor,
  13. Color? background,
  14. Color? focusBackground,
  15. Color? hoverBackground,
  16. Color? highlightBackground,
  17. Color? foreground,
  18. Color? hoverForeground,
  19. Color? highlightForeground,
  20. Duration? animationDuration,
})

Makes a copy of ButtonThemeData overwriting selected fields.

Implementation

ButtonThemeData copyWith({
  Axis? axis,
  IconThemeData? iconThemeData,
  double? itemSpacing,
  double? filledSpacing,
  double? height,
  double? minWidth,
  TextStyle? textStyle,
  Color? disabledColor,
  Color? color,
  Color? focusColor,
  Color? hoverColor,
  Color? highlightColor,
  Color? background,
  Color? focusBackground,
  Color? hoverBackground,
  Color? highlightBackground,
  Color? foreground,
  Color? hoverForeground,
  Color? highlightForeground,
  Duration? animationDuration,
}) {
  return ButtonThemeData(
    axis: axis ?? this.axis,
    iconThemeData: iconThemeData ?? this.iconThemeData,
    itemSpacing: itemSpacing ?? this.itemSpacing,
    filledSpacing: filledSpacing ?? this.filledSpacing,
    height: height ?? this.height,
    minWidth: minWidth ?? this.minWidth,
    textStyle: textStyle ?? this.textStyle,
    disabledColor: disabledColor ?? this.disabledColor,
    color: color ?? this.color,
    focusColor: focusColor ?? this.focusColor,
    hoverColor: hoverColor ?? this.hoverColor,
    highlightColor: highlightColor ?? this.highlightColor,
    background: background ?? this.background,
    focusBackground: focusBackground ?? this.focusBackground,
    hoverBackground: hoverBackground ?? this.hoverBackground,
    highlightBackground: highlightBackground ?? this.highlightBackground,
    foreground: foreground ?? this.foreground,
    hoverForeground: hoverForeground ?? this.hoverForeground,
    highlightForeground: highlightForeground ?? this.highlightForeground,
    animationDuration: animationDuration ?? this.animationDuration,
  );
}