rows property Null safety

int rows

The number of horizontal alignment lines in this table.

Changing the number of rows will remove any children that no longer fit in the table.

Implementation

int get rows => _rows;
void rows=(int value)

Implementation

set rows(int value) {
  assert(value != null);
  assert(value >= 0);
  if (value == rows) {
    return;
  }
  if (_rows > value) {
    for (int xy = columns * value; xy < _children.length; xy += 1) {
      if (_children[xy] != null) {
        dropChild(_children[xy]!);
      }
    }
  }
  _rows = value;
  _children.length = columns * rows;
  markNeedsLayout();
}