copyWith method

  1. @override
WxDrivenAnchorStyle copyWith({
  1. EdgeInsetsGeometry? margin,
  2. EdgeInsetsGeometry? padding,
  3. double? scale,
  4. double? opacity,
  5. Color? overlayColor,
  6. double? overlayOpacity,
  7. ShapeBorder? overlayShape,
  8. Size? overlayExtent,
  9. Color? textColor,
  10. TextStyle? textStyle,
  11. TextAlign? textAlign,
  12. Color? iconColor,
  13. double? iconOpacity,
  14. double? iconSize,
  15. WxAnchorStyle? focusedStyle,
  16. WxAnchorStyle? hoveredStyle,
  17. WxAnchorStyle? pressedStyle,
  18. WxAnchorStyle? disabledStyle,
  19. bool? inherits,
})
override

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

Implementation

@override
WxDrivenAnchorStyle copyWith({
  margin,
  padding,
  scale,
  opacity,
  overlayColor,
  overlayOpacity,
  overlayShape,
  overlayExtent,
  textColor,
  textStyle,
  textAlign,
  iconColor,
  iconOpacity,
  iconSize,
  WxAnchorStyle? focusedStyle,
  WxAnchorStyle? hoveredStyle,
  WxAnchorStyle? pressedStyle,
  WxAnchorStyle? disabledStyle,
  bool? inherits,
}) {
  final ancestor = super.copyWith(
    margin: margin,
    padding: padding,
    scale: scale,
    opacity: opacity,
    overlayColor: overlayColor,
    overlayOpacity: overlayOpacity,
    overlayShape: overlayShape,
    overlayExtent: overlayExtent,
    textColor: textColor,
    textStyle: textStyle,
    textAlign: textAlign,
    iconColor: iconColor,
    iconOpacity: iconOpacity,
    iconSize: iconSize,
  );
  return WxDrivenAnchorStyle.fromAncestor(
    ancestor,
    inherits: inherits ?? this.inherits,
    focusedStyle: this.focusedStyle?.merge(focusedStyle) ?? focusedStyle,
    hoveredStyle: this.hoveredStyle?.merge(hoveredStyle) ?? hoveredStyle,
    pressedStyle: this.pressedStyle?.merge(pressedStyle) ?? pressedStyle,
    disabledStyle: this.disabledStyle?.merge(disabledStyle) ?? disabledStyle,
  );
}