Unverified Commit 1c530a92 authored by Todd Volkert's avatar Todd Volkert Committed by GitHub

Override MultiChildRenderObjectElement renderObject getter to provide covariant type (#72530)

parent d6857bc0
...@@ -6223,6 +6223,11 @@ class MultiChildRenderObjectElement extends RenderObjectElement { ...@@ -6223,6 +6223,11 @@ class MultiChildRenderObjectElement extends RenderObjectElement {
@override @override
MultiChildRenderObjectWidget get widget => super.widget as MultiChildRenderObjectWidget; MultiChildRenderObjectWidget get widget => super.widget as MultiChildRenderObjectWidget;
@override
ContainerRenderObjectMixin<RenderObject, ContainerParentDataMixin<RenderObject>> get renderObject {
return super.renderObject as ContainerRenderObjectMixin<RenderObject, ContainerParentDataMixin<RenderObject>>;
}
/// The current list of children of this element. /// The current list of children of this element.
/// ///
/// This list is filtered to hide elements that have been forgotten (using /// This list is filtered to hide elements that have been forgotten (using
...@@ -6238,8 +6243,7 @@ class MultiChildRenderObjectElement extends RenderObjectElement { ...@@ -6238,8 +6243,7 @@ class MultiChildRenderObjectElement extends RenderObjectElement {
@override @override
void insertRenderObjectChild(RenderObject child, IndexedSlot<Element?> slot) { void insertRenderObjectChild(RenderObject child, IndexedSlot<Element?> slot) {
final ContainerRenderObjectMixin<RenderObject, ContainerParentDataMixin<RenderObject>> renderObject = final ContainerRenderObjectMixin<RenderObject, ContainerParentDataMixin<RenderObject>> renderObject = this.renderObject;
this.renderObject as ContainerRenderObjectMixin<RenderObject, ContainerParentDataMixin<RenderObject>>;
assert(renderObject.debugValidateChild(child)); assert(renderObject.debugValidateChild(child));
renderObject.insert(child, after: slot.value?.renderObject); renderObject.insert(child, after: slot.value?.renderObject);
assert(renderObject == this.renderObject); assert(renderObject == this.renderObject);
...@@ -6247,8 +6251,7 @@ class MultiChildRenderObjectElement extends RenderObjectElement { ...@@ -6247,8 +6251,7 @@ class MultiChildRenderObjectElement extends RenderObjectElement {
@override @override
void moveRenderObjectChild(RenderObject child, IndexedSlot<Element?> oldSlot, IndexedSlot<Element?> newSlot) { void moveRenderObjectChild(RenderObject child, IndexedSlot<Element?> oldSlot, IndexedSlot<Element?> newSlot) {
final ContainerRenderObjectMixin<RenderObject, ContainerParentDataMixin<RenderObject>> renderObject = final ContainerRenderObjectMixin<RenderObject, ContainerParentDataMixin<RenderObject>> renderObject = this.renderObject;
this.renderObject as ContainerRenderObjectMixin<RenderObject, ContainerParentDataMixin<RenderObject>>;
assert(child.parent == renderObject); assert(child.parent == renderObject);
renderObject.move(child, after: newSlot.value?.renderObject); renderObject.move(child, after: newSlot.value?.renderObject);
assert(renderObject == this.renderObject); assert(renderObject == this.renderObject);
...@@ -6256,8 +6259,7 @@ class MultiChildRenderObjectElement extends RenderObjectElement { ...@@ -6256,8 +6259,7 @@ class MultiChildRenderObjectElement extends RenderObjectElement {
@override @override
void removeRenderObjectChild(RenderObject child, dynamic slot) { void removeRenderObjectChild(RenderObject child, dynamic slot) {
final ContainerRenderObjectMixin<RenderObject, ContainerParentDataMixin<RenderObject>> renderObject = final ContainerRenderObjectMixin<RenderObject, ContainerParentDataMixin<RenderObject>> renderObject = this.renderObject;
this.renderObject as ContainerRenderObjectMixin<RenderObject, ContainerParentDataMixin<RenderObject>>;
assert(child.parent == renderObject); assert(child.parent == renderObject);
renderObject.remove(child); renderObject.remove(child);
assert(renderObject == this.renderObject); assert(renderObject == this.renderObject);
......
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