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