|
|
|
|
|
|
|
|
|
|
HashSet<Element> _debugForgottenChildrenWithGlobalKey = new HashSet<Element>(); |
|
|
|
|
|
|
|
internal virtual void forgetChild(Element child) { |
|
|
|
public virtual void forgetChild(Element child) { |
|
|
|
D.assert(() => { |
|
|
|
if (child.widget.key is GlobalKey) |
|
|
|
_debugForgottenChildrenWithGlobalKey.Add(child); |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
internal override void forgetChild(Element child) { |
|
|
|
public override void forgetChild(Element child) { |
|
|
|
D.assert(child == _child); |
|
|
|
_child = null; |
|
|
|
base.forgetChild(child); |
|
|
|
|
|
|
protected RenderObjectElement(RenderObjectWidget widget) : base(widget) { |
|
|
|
} |
|
|
|
|
|
|
|
public new RenderObjectWidget widget { |
|
|
|
public new virtual RenderObjectWidget widget { |
|
|
|
get { return (RenderObjectWidget) base.widget; } |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
public LeafRenderObjectElement(LeafRenderObjectWidget widget) : base(widget) { |
|
|
|
} |
|
|
|
|
|
|
|
internal override void forgetChild(Element child) { |
|
|
|
public override void forgetChild(Element child) { |
|
|
|
D.assert(false); |
|
|
|
base.forgetChild(child); |
|
|
|
} |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
internal override void forgetChild(Element child) { |
|
|
|
public override void forgetChild(Element child) { |
|
|
|
D.assert(child == _child); |
|
|
|
_child = null; |
|
|
|
base.forgetChild(child); |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
internal override void forgetChild(Element child) { |
|
|
|
public override void forgetChild(Element child) { |
|
|
|
D.assert(_children.Contains(child)); |
|
|
|
D.assert(!_forgottenChildren.Contains(child)); |
|
|
|
_forgottenChildren.Add(child); |
|
|
|