copyWith method
WxDrivenButtonStyle
copyWith({
- Axis? direction,
- WxSheetVariant? variant,
- WxSheetSize? size,
- Color? severity,
- double? width,
- double? height,
- double? minWidth,
- double? maxWidth,
- double? minHeight,
- double? maxHeight,
- EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? padding,
- double? spacing,
- bool? adaptiveSpacing,
- Offset? offset,
- double? scale,
- double? rotate,
- bool? flipX,
- bool? flipY,
- double? opacity,
- Alignment? alignment,
- Clip? clipBehavior,
- Color? overlayColor,
- double? overlayOpacity,
- ShapeBorder? overlayShape,
- Size? overlayExtent,
- Color? surfaceTint,
- Color? elevationColor,
- double? elevation,
- CrossAxisAlignment? tileAlign,
- MainAxisAlignment? tileJustify,
- bool? tileWrap,
- TextStyle? textStyle,
- TextAlign? textAlign,
- double? textSpacing,
- Color? textColor,
- TextOverflow? textOverflow,
- bool? textSoftWrap,
- TextWidthBasis? textWidthBasis,
- bool? adaptiveForegroundColor,
- Color? foregroundColor,
- double? foregroundOpacity,
- int? foregroundAlpha,
- Color? backgroundColor,
- double? backgroundOpacity,
- int? backgroundAlpha,
- Color? borderColor,
- double? borderOpacity,
- int? borderAlpha,
- double? borderWidth,
- BorderRadius? borderRadius,
- BorderStyle? borderStyle,
- double? borderOffset,
- OutlinedBorder? border,
- DecorationImage? image,
- List<
BoxShadow> ? shadows, - Gradient? gradient,
- Color? iconColor,
- double? iconOpacity,
- double? iconSize,
- Color? checkmarkColor,
- double? checkmarkSize,
- double? checkmarkWeight,
- Color? spinnerColor,
- Color? spinnerBackgroundColor,
- double? spinnerSize,
- double? spinnerWidth,
- bool? spinnerRounded,
- TextStyle? titleStyle,
- TextStyle? subtitleStyle,
- double? titleSize,
- double? subtitleSize,
- Color? titleColor,
- Color? subtitleColor,
- int? titleMaxLines,
- int? subtitleMaxLines,
- FontWeight? titleWeight,
- FontWeight? subtitleWeight,
- bool? inherits,
- WxButtonStyle? focusedStyle,
- WxButtonStyle? hoveredStyle,
- WxButtonStyle? pressedStyle,
- WxButtonStyle? loadingStyle,
- 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,
);
}