describe method

String describe()

What is worth knowing about the surface, in a line or three.

Implementation

String describe() {
  final out = StringBuffer();
  if (!hasRoot) {
    out.writeln(
      '${definition.surfaceId} has no "$genUiRootComponentId" component, so '
      'nothing renders.',
    );
  }
  out.writeln(
    '${order.length} component${order.length == 1 ? '' : 's'} on '
    '${definition.surfaceId}, bound to ${pathBindings.length} '
    'path${pathBindings.length == 1 ? '' : 's'}.',
  );
  if (unreachable.isNotEmpty) {
    out.writeln(
      'Created and never reached: '
      '${(unreachable.toList()..sort()).join(', ')}.',
    );
  }
  if (cyclic.isNotEmpty) {
    out.writeln('Contains itself: ${(cyclic.toList()..sort()).join(', ')}.');
  }
  return out.toString().trimRight();
}