maintainSemantics property Null safety

bool maintainSemantics

Whether to maintain the semantics for the widget when it is hidden (e.g. for accessibility).

To set this, maintainSize must also be set.

By default, with maintainSemantics set to false, the child is not visible to accessibility tools when it is hidden from the user. If this flag is set to true, then accessibility tools will report the widget as if it was present.

Dynamically changing this value may cause the current state of the subtree to be lost (and a new instance of the subtree, with new State objects, to be immediately created if visible is true).


final bool maintainSemantics;