label property

String? label
final

What a screen reader would call this, from the semantics node this widget's render object contributes to.

Reached through the render tree, never by comparing rectangles. A semantics node and a widget's box are not the same rectangle and the mismatch goes both ways: a Checkbox's node is smaller than the CheckboxListTile that owns it, and a Tab's is 9.5× larger than the Tab widget, which is only its label. Matching by rect reported "Flutter does not publish tab selection", which is false.

It carries more than the words: Flutter writes its own positional hints in here, so a tab reads "Tab A\nTab 1 of 2". Null off the VM-service path (run's inspect), which cannot reach widgets, and null when the app has no semantics tree — a live app has none until something holds a SemanticsHandle.

Implementation

final String? label;