depth property

int depth
final

The widget to whose state the state reference refers.

This identifies the widget by depth starting at the widget that was created by Runtime.build (or a RemoteWidget, which uses that method).

Since state references always go up the tree, this is an unambiguous way to reference state, even though in practice in the entire tree multiple widgets may be stateful at the same depth.

Implementation

final int depth;