depth property

int depth

Implementation

int get depth {
  return (parent?.depth ?? -1) + 1;
}