SemanticsNode constructor Null safety

SemanticsNode(
  1. {Key? key,
  2. VoidCallback? showOnScreen}
)

Creates a semantic node.

Each semantic node has a unique identifier that is assigned when the node is created.

Implementation

SemanticsNode({
  this.key,
  VoidCallback? showOnScreen,
}) : _id = _generateNewId(),
     _showOnScreen = showOnScreen;