excludeSemantics method

Widget excludeSemantics({
  1. Key? key,
  2. bool excluding = true,
})

Drops all the semantics of its descendants.

When excluding is true, this widget (and its subtree) is excluded from the semantics tree.

This can be used to hide descendant widgets that would otherwise be reported but that would only be confusing. For example, the material library's Chip widget hides the avatar since it is redundant with the chip label.

Implementation

Widget excludeSemantics({
  Key? key,
  bool excluding = true,
}) {
  return ExcludeSemantics(
    key: key,
    excluding: excluding,
    child: this,
  );
}