totalSize property

int totalSize

Cumulative size of this node and all of its children.

Implementation

int get totalSize {
  return (size ?? 0) +
      children.values.fold<int>(0, (s, n) => s + n.totalSize);
}