Merge pull request #3329 from alhaad/repaint_childview
Repaint child view on attach / detach.
This commit is contained in:
commit
c40f4cfedb
@ -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 {
|
|||||||
@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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user