Index: sky/sdk/lib/widgets/scaffold.dart |
diff --git a/sky/sdk/lib/widgets/scaffold.dart b/sky/sdk/lib/widgets/scaffold.dart |
index ae750c57358b71cffd0965db5786f4a00bdb27bd..b9b5e508e8415525a7a9b721b573b94ea34610b0 100644 |
--- a/sky/sdk/lib/widgets/scaffold.dart |
+++ b/sky/sdk/lib/widgets/scaffold.dart |
@@ -185,10 +185,12 @@ class Scaffold extends RenderObjectWrapper { |
root[slot] = child != null ? child.root : null; |
} |
- void removeChild(Widget node) { |
- assert(node != null); |
- root.remove(node.root); |
- super.removeChild(node); |
+ void detachChildRoot(RenderObjectWrapper child) { |
+ final root = this.root; // TODO(ianh): Remove this once the analyzer is cleverer |
+ assert(root is RenderScaffold); |
+ assert(root == child.root.parent); |
+ root.remove(child.root); |
+ assert(root == this.root); // TODO(ianh): Remove this once the analyzer is cleverer |
} |
void remove() { |