mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Effen] We need to update the layout manager in _syncNode() also,
otherwise when you switch from one Container instance to another, you end up with the the layout being done by the wrong instance. R=ojan@chromium.org Review URL: https://codereview.chromium.org/1086983004
This commit is contained in:
parent
987ba83d49
commit
f76dd382b8
@ -607,8 +607,12 @@ abstract class LayoutContainer extends Container {
|
||||
return result;
|
||||
}
|
||||
|
||||
// If we ever reuse sky nodes for different classes, then we should
|
||||
// call _root.setLayoutManager(null) during _remove() here.
|
||||
|
||||
void _syncNode(SkyNodeWrapper old) {
|
||||
super._syncNode(old);
|
||||
_root.setLayoutManager(() => layout(_root));
|
||||
_root.setNeedsLayout();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user