removeRenderObjectChild method Null safety

  1. @protected
void removeRenderObjectChild(
  1. covariant RenderObject child,
  2. covariant Object? slot

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.


void removeRenderObjectChild(covariant RenderObject child, covariant Object? slot) {
  assert(() {
    throw FlutterError.fromParts(<DiagnosticsNode>[
      ErrorSummary('RenderObjectElement.removeChildRenderObject() is deprecated.'),
        name: 'super.removeChildRenderObject() was called on this Element',
        style: DiagnosticsTreeStyle.shallow,
        'removeChildRenderObject() has been deprecated in favor of '
        'removeRenderObjectChild(). See '
        'for details.',
        '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 '