removeRenderObjectChild method Null safety
- covariant RenderObject child,
- covariant Object? slot
protected">@protected
Remove the given child from renderObject.
The given child is guaranteed to have been inserted at the given slot
and have renderObject as its parent.
Implementation
@protected
void removeRenderObjectChild(covariant RenderObject child, covariant Object? slot) {
assert(() {
throw FlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary('RenderObjectElement.removeChildRenderObject() is deprecated.'),
toDiagnosticsNode(
name: 'super.removeChildRenderObject() was called on this Element',
style: DiagnosticsTreeStyle.shallow,
),
ErrorDescription(
'removeChildRenderObject() has been deprecated in favor of '
'removeRenderObjectChild(). See https://github.com/flutter/flutter/issues/63269 '
'for details.',
),
ErrorHint(
'Rather than overriding removeChildRenderObject() in your '
'RenderObjectElement subclass, override removeRenderObjectChild() instead, '
"and DON'T call super.removeRenderObjectChild(). If you're implementing a "
'new RenderObjectElement, you should override/implement '
'insertRenderObjectChild(), moveRenderObjectChild(), and '
'removeRenderObjectChild().',
),
]);
}());
}