delegate property

SingleChildLayoutDelegate get delegate

A delegate that controls this object's layout.

Implementation

SingleChildLayoutDelegate get delegate => _delegate;
set delegate (SingleChildLayoutDelegate newDelegate)

Implementation

set delegate(SingleChildLayoutDelegate newDelegate) {
  if (_delegate == newDelegate) {
    return;
  }
  final SingleChildLayoutDelegate oldDelegate = _delegate;
  if (newDelegate.runtimeType != oldDelegate.runtimeType || newDelegate.shouldRelayout(oldDelegate)) {
    markNeedsLayout();
  }
  _delegate = newDelegate;
  if (attached) {
    oldDelegate._relayout?.removeListener(markNeedsLayout);
    newDelegate._relayout?.addListener(markNeedsLayout);
  }
}