markParentNeedsLayout method

  1. @protected
void markParentNeedsLayout()

Mark this render object's layout information as dirty, and then defer to the parent.

This function should only be called from markNeedsLayout or markNeedsLayoutForSizedByParentChange implementations of subclasses that introduce more reasons for deferring the handling of dirty layout to the parent. See markNeedsLayout for details.

Only call this if parent is not null.

Implementation

@protected
void markParentNeedsLayout() {
  assert(_debugCanPerformMutations);
  _needsLayout = true;
  assert(this.parent != null);
  final RenderObject parent = this.parent!;
  if (!_doingThisLayoutWithCallback) {
    parent.markNeedsLayout();
  } else {
    assert(parent._debugDoingThisLayout);
  }
  assert(parent == this.parent);
}