merge method

S2ModalConfig merge(
  1. S2ModalConfig other
)

Returns a new S2ModalConfig that is a combination of this object and the given other style.

Implementation

S2ModalConfig merge(S2ModalConfig other) {
  // if null return current object
  if (other == null) return this;

  return copyWith(
    type: other.type,
    title: other.title,
    useHeader: other.useHeader,
    useConfirm: other.useConfirm,
    confirmIcon: other.confirmIcon,
    confirmLabel: other.confirmLabel,
    confirmColor: other.confirmColor,
    confirmMargin: other.confirmMargin,
    confirmBrightness: other.confirmBrightness,
    useFilter: other.useFilter,
    filterAuto: other.filterAuto,
    filterDelay: other.filterDelay,
    filterHint: other.filterHint,
    maxHeightFactor: other.maxHeightFactor,
    enableDrag: other.enableDrag,
    barrierDismissible: other.barrierDismissible,
    barrierColor: other.barrierColor,
    style: other.style,
    headerStyle: other.headerStyle,
  );
}