Commit 6f9acb84 authored by Alhaad Gokhale's avatar Alhaad Gokhale

Repaint child view on attach / detach.

parent ec85af59
...@@ -124,8 +124,8 @@ class ChildViewConnection { ...@@ -124,8 +124,8 @@ class ChildViewConnection {
assert(_attached); assert(_attached);
assert(_viewOwner != null); assert(_viewOwner != null);
assert(_viewKey == null); assert(_viewKey == null);
assert(_viewInfo == null);
_viewKey = _nextViewKey++; _viewKey = _nextViewKey++;
_viewInfo = null;
_viewContainer?.addChild(_viewKey, _viewOwner.impl); _viewContainer?.addChild(_viewKey, _viewOwner.impl);
_viewOwner = null; _viewOwner = null;
assert(!_ViewContainerListenerImpl.instance._connections.containsKey(_viewKey)); assert(!_ViewContainerListenerImpl.instance._connections.containsKey(_viewKey));
...@@ -253,12 +253,20 @@ class RenderChildView extends RenderBox { ...@@ -253,12 +253,20 @@ class RenderChildView extends RenderBox {
@override @override
void attach(PipelineOwner owner) { void attach(PipelineOwner owner) {
super.attach(owner); super.attach(owner);
_child?._attach(); if (_child != null) {
_child._attach();
assert(_child._onViewInfoAvailable == null);
_child._onViewInfoAvailable = markNeedsPaint;
}
} }
@override @override
void detach() { void detach() {
_child?._detach(); if (_child != null) {
_child._detach();
assert(_child._onViewInfoAvailable != null);
_child._onViewInfoAvailable = null;
}
super.detach(); super.detach();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment