column method Null safety

Iterable<RenderBox> column(
  1. int x
)

Returns the list of RenderBox objects that are in the given column, in row order, starting from the first row.

This is a lazily-evaluated iterable.

Implementation

// The following uses sync* because it is public API documented to return a
// lazy iterable.
Iterable<RenderBox> column(int x) sync* {
  for (int y = 0; y < rows; y += 1) {
    final int xy = x + y * columns;
    final RenderBox? child = _children[xy];
    if (child != null) {
      yield child;
    }
  }
}