depth property

int get depth

The depth of this context (0 for root).

Implementation

int get depth => parent == null ? 0 : parent!.depth + 1;