debugDescribeChildren method

  1. @override
List<DiagnosticsNode> debugDescribeChildren ()

Returns a list of DiagnosticsNode objects describing this node's children.

Children that are offstage should be added with style set to DiagnosticsTreeStyle.offstage to indicate that they are offstage.

The list must not contain any null entries. If there are explicit null children to report, consider new DiagnosticsNode.message or DiagnosticsProperty<Object> as possible DiagnosticsNode objects to provide.

See also:

Used by toStringDeep, toDiagnosticsNode and toStringShallow.


List<DiagnosticsNode> debugDescribeChildren() {
  if (_children.isEmpty) {
    return <DiagnosticsNode>[DiagnosticsNode.message('table is empty')];

  final List<DiagnosticsNode> children = <DiagnosticsNode>[];
  for (int y = 0; y < rows; y += 1) {
    for (int x = 0; x < columns; x += 1) {
      final int xy = x + y * columns;
      final RenderBox child = _children[xy];
      final String name = 'child ($x, $y)';
      if (child != null)
        children.add(child.toDiagnosticsNode(name: name));
        children.add(DiagnosticsProperty<Object>(name, null, ifNull: 'is null', showSeparator: false));
  return children;