diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index e67c2b7e57..94eca1e1be 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -1166,12 +1166,24 @@ abstract class RenderObjectWidget extends Widget { /// Creates an instance of the [RenderObject] class that this /// [RenderObjectWidget] represents, using the configuration described by this /// [RenderObjectWidget]. + /// + /// This method should not do anything with the children of the render object. + /// That should instead be handled by the method that overrides + /// [RenderObjectElement.mount] in the object rendered by this object's + /// [createElement] method. See, for example, + /// [SingleChildRenderObjectElement.mount]. @protected RenderObject createRenderObject(BuildContext context); /// Copies the configuration described by this [RenderObjectWidget] to the /// given [RenderObject], which will be of the same type as returned by this /// object's [createRenderObject]. + /// + /// This method should not do anything to update the children of the render + /// object. That should instead be handled by the method that overrides + /// [RenderObjectElement.update] in the object rendered by this object's + /// [createElement] method. See, for example, + /// [SingleChildRenderObjectElement.update]. @protected void updateRenderObject(BuildContext context, @checked RenderObject renderObject) { }