copyWith method

  1. @override
WxDrivenButtonStyle copyWith({
  1. Axis? direction,
  2. WxSheetVariant? variant,
  3. WxSheetSize? size,
  4. Color? severity,
  5. double? width,
  6. double? height,
  7. double? minWidth,
  8. double? maxWidth,
  9. double? minHeight,
  10. double? maxHeight,
  11. EdgeInsetsGeometry? margin,
  12. EdgeInsetsGeometry? padding,
  13. double? spacing,
  14. bool? adaptiveSpacing,
  15. Offset? offset,
  16. double? scale,
  17. double? rotate,
  18. bool? flipX,
  19. bool? flipY,
  20. double? opacity,
  21. Alignment? alignment,
  22. Clip? clipBehavior,
  23. Color? overlayColor,
  24. double? overlayOpacity,
  25. ShapeBorder? overlayShape,
  26. Size? overlayExtent,
  27. Color? surfaceTint,
  28. Color? elevationColor,
  29. double? elevation,
  30. CrossAxisAlignment? tileAlign,
  31. MainAxisAlignment? tileJustify,
  32. bool? tileWrap,
  33. TextStyle? textStyle,
  34. TextAlign? textAlign,
  35. double? textSpacing,
  36. Color? textColor,
  37. TextOverflow? textOverflow,
  38. bool? textSoftWrap,
  39. TextWidthBasis? textWidthBasis,
  40. bool? adaptiveForegroundColor,
  41. Color? foregroundColor,
  42. double? foregroundOpacity,
  43. int? foregroundAlpha,
  44. Color? backgroundColor,
  45. double? backgroundOpacity,
  46. int? backgroundAlpha,
  47. Color? borderColor,
  48. double? borderOpacity,
  49. int? borderAlpha,
  50. double? borderWidth,
  51. BorderRadius? borderRadius,
  52. BorderStyle? borderStyle,
  53. double? borderOffset,
  54. OutlinedBorder? border,
  55. DecorationImage? image,
  56. List<BoxShadow>? shadows,
  57. Gradient? gradient,
  58. Color? iconColor,
  59. double? iconOpacity,
  60. double? iconSize,
  61. Color? checkmarkColor,
  62. double? checkmarkSize,
  63. double? checkmarkWeight,
  64. Color? spinnerColor,
  65. Color? spinnerBackgroundColor,
  66. double? spinnerSize,
  67. double? spinnerWidth,
  68. bool? spinnerRounded,
  69. TextStyle? titleStyle,
  70. TextStyle? subtitleStyle,
  71. double? titleSize,
  72. double? subtitleSize,
  73. Color? titleColor,
  74. Color? subtitleColor,
  75. int? titleMaxLines,
  76. int? subtitleMaxLines,
  77. FontWeight? titleWeight,
  78. FontWeight? subtitleWeight,
  79. bool? inherits,
  80. WxButtonStyle? focusedStyle,
  81. WxButtonStyle? hoveredStyle,
  82. WxButtonStyle? pressedStyle,
  83. WxButtonStyle? loadingStyle,
  84. WxButtonStyle? disabledStyle,
})
override

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

Implementation

@override
WxDrivenButtonStyle copyWith({
  direction,
  variant,
  size,
  severity,
  width,
  height,
  minWidth,
  maxWidth,
  minHeight,
  maxHeight,
  margin,
  padding,
  spacing,
  adaptiveSpacing,
  offset,
  scale,
  rotate,
  flipX,
  flipY,
  opacity,
  alignment,
  clipBehavior,
  overlayColor,
  overlayOpacity,
  overlayShape,
  overlayExtent,
  surfaceTint,
  elevationColor,
  elevation,
  tileAlign,
  tileJustify,
  tileWrap,
  textStyle,
  textAlign,
  textSpacing,
  textColor,
  textOverflow,
  textSoftWrap,
  textWidthBasis,
  adaptiveForegroundColor,
  foregroundColor,
  foregroundOpacity,
  foregroundAlpha,
  backgroundColor,
  backgroundOpacity,
  backgroundAlpha,
  borderColor,
  borderOpacity,
  borderAlpha,
  borderWidth,
  borderRadius,
  borderStyle,
  borderOffset,
  border,
  image,
  shadows,
  gradient,
  iconColor,
  iconOpacity,
  iconSize,
  checkmarkColor,
  checkmarkSize,
  checkmarkWeight,
  spinnerColor,
  spinnerBackgroundColor,
  spinnerSize,
  spinnerWidth,
  spinnerRounded,
  titleStyle,
  subtitleStyle,
  titleSize,
  subtitleSize,
  titleColor,
  subtitleColor,
  titleMaxLines,
  subtitleMaxLines,
  titleWeight,
  subtitleWeight,
  bool? inherits,
  WxButtonStyle? focusedStyle,
  WxButtonStyle? hoveredStyle,
  WxButtonStyle? pressedStyle,
  WxButtonStyle? loadingStyle,
  WxButtonStyle? disabledStyle,
}) {
  final ancestor = super.copyWith(
    direction: direction,
    variant: variant,
    size: size,
    severity: severity,
    width: width,
    height: height,
    minWidth: minWidth,
    maxWidth: maxWidth,
    minHeight: minHeight,
    maxHeight: maxHeight,
    margin: margin,
    padding: padding,
    spacing: spacing,
    adaptiveSpacing: adaptiveSpacing,
    offset: offset,
    scale: scale,
    rotate: rotate,
    flipX: flipX,
    flipY: flipY,
    opacity: opacity,
    alignment: alignment,
    clipBehavior: clipBehavior,
    overlayColor: overlayColor,
    overlayOpacity: overlayOpacity,
    overlayShape: overlayShape,
    overlayExtent: overlayExtent,
    surfaceTint: surfaceTint,
    elevationColor: elevationColor,
    elevation: elevation,
    tileAlign: tileAlign,
    tileJustify: tileJustify,
    tileWrap: tileWrap,
    textStyle: textStyle,
    textAlign: textAlign,
    textSpacing: textSpacing,
    textColor: textColor,
    textOverflow: textOverflow,
    textSoftWrap: textSoftWrap,
    textWidthBasis: textWidthBasis,
    adaptiveForegroundColor: adaptiveForegroundColor,
    foregroundColor: foregroundColor,
    foregroundOpacity: foregroundOpacity,
    foregroundAlpha: foregroundAlpha,
    backgroundColor: backgroundColor,
    backgroundOpacity: backgroundOpacity,
    backgroundAlpha: backgroundAlpha,
    borderColor: borderColor,
    borderOpacity: borderOpacity,
    borderAlpha: borderAlpha,
    borderWidth: borderWidth,
    borderRadius: borderRadius,
    borderStyle: borderStyle,
    borderOffset: borderOffset,
    border: border,
    image: image,
    shadows: shadows,
    gradient: gradient,
    iconColor: iconColor,
    iconOpacity: iconOpacity,
    iconSize: iconSize,
    checkmarkColor: checkmarkColor,
    checkmarkSize: checkmarkSize,
    checkmarkWeight: checkmarkWeight,
    spinnerColor: spinnerColor,
    spinnerBackgroundColor: spinnerBackgroundColor,
    spinnerSize: spinnerSize,
    spinnerWidth: spinnerWidth,
    spinnerRounded: spinnerRounded,
    titleStyle: titleStyle,
    subtitleStyle: subtitleStyle,
    titleSize: titleSize,
    subtitleSize: subtitleSize,
    titleColor: titleColor,
    subtitleColor: subtitleColor,
    titleMaxLines: titleMaxLines,
    subtitleMaxLines: subtitleMaxLines,
    titleWeight: titleWeight,
    subtitleWeight: subtitleWeight,
  );
  return WxDrivenButtonStyle.fromAncestor(
    ancestor,
    inherits: inherits ?? this.inherits,
    focusedStyle: this.focusedStyle?.merge(focusedStyle) ?? focusedStyle,
    hoveredStyle: this.hoveredStyle?.merge(hoveredStyle) ?? hoveredStyle,
    pressedStyle: this.pressedStyle?.merge(pressedStyle) ?? pressedStyle,
    loadingStyle: this.loadingStyle?.merge(loadingStyle) ?? loadingStyle,
    disabledStyle: this.disabledStyle?.merge(disabledStyle) ?? disabledStyle,
  );
}