merge method

  1. @override
WxDrivenAnchorStyle merge(
  1. WxAnchorStyle? other
)
override

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

Implementation

@override
WxDrivenAnchorStyle merge(WxAnchorStyle? other) {
  final result = WxDrivenAnchorStyle.fromAncestor(
    super.merge(other),
    inherits: inherits,
    focusedStyle: focusedStyle,
    hoveredStyle: hoveredStyle,
    pressedStyle: pressedStyle,
    disabledStyle: disabledStyle,
  );

  if (other is WxDrivenAnchorStyle) {
    return result.copyWith(
      inherits: other.inherits,
      focusedStyle: other.focusedStyle,
      hoveredStyle: other.hoveredStyle,
      pressedStyle: other.pressedStyle,
      disabledStyle: other.disabledStyle,
    );
  }
  return result;
}