depth property

int get depth
inherited

How many ancestors this object has: 0 for the root. The owner lays out and paints what is marked outermost first, by depth.

Implementation

int get depth {
  var d = 0;
  for (var o = parent; o != null; o = o.parent) {
    d++;
  }
  return d;
}