contentVisibility property

  1. @override
ContentVisibility? contentVisibility
override

Whether the child is hidden from the rest of the tree.

If ContentVisibility.hidden, the child is laid out as if it was in the tree, but without painting anything, without making the child available for hit testing, and without taking any room in the parent.

If ContentVisibility.visible, the child is included in the tree as normal.

If ContentVisibility.auto, the framework will compute the intersection bounds and not to paint when child renderObject are no longer intersection with this renderObject.

Implementation

@override
ContentVisibility? get contentVisibility => _contentVisibility;
void contentVisibility=(ContentVisibility? value)

Implementation

set contentVisibility(ContentVisibility? value) {
  if (value == null) return;
  if (value == _contentVisibility) return;
  _contentVisibility = value;
  renderBoxModel?.markNeedsPaint();
}