mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Rename insert() to insertChildRoot() so it's consistent with detachChildRoot().
TBR=abarth Review URL: https://codereview.chromium.org/1187023005.
This commit is contained in:
parent
fa88ab16f3
commit
1ab539735f
@ -359,7 +359,7 @@ class Inline extends RenderObjectWrapper {
|
||||
root.inline = text;
|
||||
}
|
||||
|
||||
void insert(RenderObjectWrapper child, dynamic slot) {
|
||||
void insertChildRoot(RenderObjectWrapper child, dynamic slot) {
|
||||
assert(false);
|
||||
// Inline does not support having children currently
|
||||
}
|
||||
@ -398,7 +398,7 @@ class Image extends RenderObjectWrapper {
|
||||
root.requestedSize = size;
|
||||
}
|
||||
|
||||
void insert(RenderObjectWrapper child, dynamic slot) {
|
||||
void insertChildRoot(RenderObjectWrapper child, dynamic slot) {
|
||||
assert(false);
|
||||
// Image does not support having children currently
|
||||
}
|
||||
@ -424,7 +424,7 @@ class WidgetToRenderBoxAdapter extends RenderObjectWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
void insert(RenderObjectWrapper child, dynamic slot) {
|
||||
void insertChildRoot(RenderObjectWrapper child, dynamic slot) {
|
||||
assert(false);
|
||||
// WidgetToRenderBoxAdapter cannot have Widget children; by
|
||||
// definition, it is the transition out of the Widget world.
|
||||
|
||||
@ -181,7 +181,7 @@ class Scaffold extends RenderObjectWrapper {
|
||||
RenderScaffold get root => super.root;
|
||||
RenderScaffold createNode() => new RenderScaffold();
|
||||
|
||||
void insert(RenderObjectWrapper child, ScaffoldSlots slot) {
|
||||
void insertChildRoot(RenderObjectWrapper child, ScaffoldSlots slot) {
|
||||
root[slot] = child != null ? child.root : null;
|
||||
}
|
||||
|
||||
|
||||
@ -491,7 +491,7 @@ abstract class RenderObjectWrapper extends Widget {
|
||||
static RenderObjectWrapper _getMounted(RenderObject node) => _nodeMap[node];
|
||||
|
||||
RenderObjectWrapper _ancestor;
|
||||
void insert(RenderObjectWrapper child, dynamic slot);
|
||||
void insertChildRoot(RenderObjectWrapper child, dynamic slot);
|
||||
void detachChildRoot(RenderObjectWrapper child);
|
||||
|
||||
void _sync(Widget old, dynamic slot) {
|
||||
@ -503,7 +503,7 @@ abstract class RenderObjectWrapper extends Widget {
|
||||
_root = createNode();
|
||||
_ancestor = findAncestor(RenderObjectWrapper);
|
||||
if (_ancestor is RenderObjectWrapper)
|
||||
_ancestor.insert(this, slot);
|
||||
_ancestor.insertChildRoot(this, slot);
|
||||
} else {
|
||||
_root = old.root;
|
||||
_ancestor = old._ancestor;
|
||||
@ -563,7 +563,7 @@ abstract class OneChildRenderObjectWrapper extends RenderObjectWrapper {
|
||||
_child = syncChild(child, oldChild, null);
|
||||
}
|
||||
|
||||
void insert(RenderObjectWrapper child, dynamic slot) {
|
||||
void insertChildRoot(RenderObjectWrapper child, dynamic slot) {
|
||||
final root = this.root; // TODO(ianh): Remove this once the analyzer is cleverer
|
||||
assert(root is RenderObjectWithChildMixin);
|
||||
assert(slot == null);
|
||||
@ -600,7 +600,7 @@ abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper {
|
||||
|
||||
final List<Widget> children;
|
||||
|
||||
void insert(RenderObjectWrapper child, dynamic slot) {
|
||||
void insertChildRoot(RenderObjectWrapper child, dynamic slot) {
|
||||
final root = this.root; // TODO(ianh): Remove this once the analyzer is cleverer
|
||||
assert(slot == null || slot is RenderObject);
|
||||
assert(root is ContainerRenderObjectMixin);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user