toStringShort method

  1. @override
String toStringShort()
override

Returns a human understandable name.

Implementation

@override
String toStringShort() {
  String header = describeIdentity(this);
  if (!kReleaseMode) {
    if (_debugDisposed) {
      header += ' DISPOSED';
      return header;
    }

    int count = 0;
    for (
      RenderObject? node = this;
      node != null && !(node._isRelayoutBoundary ?? false);
      node = node.parent
    ) {
      if (node._isRelayoutBoundary == null) {
        count = -1;
        break;
      }
      count += 1;
    }
    if (count > 0) {
      header += ' relayoutBoundary=up$count';
    }
    if (_needsLayout) {
      header += ' NEEDS-LAYOUT';
    }
    if (_needsPaint) {
      header += ' NEEDS-PAINT';
    }
    if (_needsCompositingBitsUpdate) {
      header += ' NEEDS-COMPOSITING-BITS-UPDATE';
    }
    if (!attached) {
      header += ' DETACHED';
    }
  }
  return header;
}