activeInteraction function

PerfInteraction? activeInteraction()

The most recently opened interaction that has not settled, or null when none is open or no perf session is.

For work that runs in the frame zone and so cannot read the interaction off its own zone: a build, an initState refetch, a post-frame callback. Interactions may overlap (an agent can tap again before the last tap settles); the newest is the one a frame just produced most plausibly belongs to.

Implementation

PerfInteraction? activeInteraction() {
  if (!perfSessionOpen || _open.isEmpty) return null;
  return _open.last;
}