merge method

ShadContextMenuTheme merge(
  1. ShadContextMenuTheme? other
)
inherited

Implementation

ShadContextMenuTheme merge(ShadContextMenuTheme? other) {
  final _this = (this as ShadContextMenuTheme);

  if (other == null || identical(_this, other)) {
    return _this;
  }

  if (!other.canMerge) {
    return other;
  }

  return copyWith(
    popoverReverseDuration: other.popoverReverseDuration,
    constraints: other.constraints,
    padding: other.padding,
    leadingPadding: other.leadingPadding,
    trailingPadding: other.trailingPadding,
    itemPadding: other.itemPadding,
    insetPadding: other.insetPadding,
    anchor: other.anchor,
    showDelay: other.showDelay,
    height: other.height,
    buttonVariant: other.buttonVariant,
    itemDecoration:
        _this.itemDecoration?.merge(other.itemDecoration) ??
        other.itemDecoration,
    textStyle: _this.textStyle?.merge(other.textStyle) ?? other.textStyle,
    trailingTextStyle:
        _this.trailingTextStyle?.merge(other.trailingTextStyle) ??
        other.trailingTextStyle,
    itemConstraints: other.itemConstraints,
    subMenuPadding: other.subMenuPadding,
    backgroundColor: other.backgroundColor,
    selectedBackgroundColor: other.selectedBackgroundColor,
    closeOnTap: other.closeOnTap,
    effects: other.effects,
    shadows: other.shadows,
    decoration: _this.decoration?.merge(other.decoration) ?? other.decoration,
    filter: other.filter,
  );
}