addTagForChildren method

void addTagForChildren (SemanticsTag tag)

Specifies a SemanticsTag that this configuration wants to apply to all child SemanticsNodes.

The tag is added to all SemanticsNode that pass through the RenderObject owning this configuration while looking to be attached to a parent SemanticsNode.

Tags are used to communicate to a parent SemanticsNode that a child SemanticsNode was passed through a particular RenderObject. The parent can use this information to determine the shape of the semantics tree.

See also:

  • RenderSemanticsGestureHandler.excludeFromScrolling for an example of how tags are used.

Implementation

void addTagForChildren(SemanticsTag tag) {
  _tagsForChildren ??= <SemanticsTag>{};
  _tagsForChildren.add(tag);
}