mergeWith method
Implementation
ComponentConfig mergeWith(ComponentConfig patch) {
return ComponentConfig(
type: patch.type ?? type,
builder: patch.builder ?? builder,
isFloating: patch._isFloatingSpecified ? patch.isFloating : isFloating,
isDraggable:
patch._isDraggableSpecified ? patch.isDraggable : isDraggable,
dragSnapToEdge:
patch._dragSnapToEdgeSpecified
? patch.dragSnapToEdge
: dragSnapToEdge,
hasAnimation:
patch._hasAnimationSpecified ? patch.hasAnimation : hasAnimation,
isCollapsible:
patch._isCollapsibleSpecified
? patch.isCollapsible
: isCollapsible,
initiallyExpanded:
patch._initiallyExpandedSpecified
? patch.initiallyExpanded
: initiallyExpanded,
animationDuration:
patch._animationDurationSpecified
? patch.animationDuration
: animationDuration,
animationType: patch.animationType ?? animationType,
width: patch.width ?? width,
height: patch.height ?? height,
top: patch.top ?? top,
left: patch.left ?? left,
bottom: patch.bottom ?? bottom,
right: patch.right ?? right,
margin: patch.margin ?? margin,
padding: patch.padding ?? padding,
customProps: patch.customProps ?? customProps,
backgroundColor: patch.backgroundColor ?? backgroundColor,
showToggleButton:
patch._showToggleButtonSpecified
? patch.showToggleButton
: showToggleButton,
isShow: patch._isShowSpecified ? patch.isShow : isShow,
);
}