GridDelegate delegate

The delegate that controls the layout of the children.

For example, a FixedColumnCountGridDelegate for grids that have a fixed number of columns or a MaxTileWidthGridDelegate for grids that have a maximum tile width.

If the new delegate is the same as the previous one, this does nothing.

If the new delegate is the same class as the previous one, then the new delegate has its GridDelegate.shouldRelayout called; if the result is true, then the delegate will be called.

If the new delegate is a different class than the previous one, then the delegate will be called.

The delegate must not be null.

Source

GridDelegate get delegate => _delegate;
void delegate=(GridDelegate newDelegate)

Source

set delegate (GridDelegate newDelegate) {
  assert(newDelegate != null);
  if (_delegate == newDelegate)
    return;
  if (newDelegate.runtimeType != _delegate.runtimeType || newDelegate.shouldRelayout(_delegate)) {
    _specification = null;
    markNeedsLayout();
  }
  _delegate = newDelegate;
}