depth property

int get depth

Implementation

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