visible property
bool
get
visible
Whether the node is drawn and laid out at all. Not opacity zero: a hidden node takes no room in a row, and a column closes over it. The boolean a component most often exposes — show the badge, hide the footer — which is why it is a property and not an effect.
Implementation
bool get visible => _visible;
set
visible
(bool value)
Implementation
set visible(bool value) {
_visible = value;
// A node that is not laid out keeps no rect: the last one it had would
// otherwise still catch a click and draw a selection box over nothing.
if (!value) measured = null;
}