From 8a91c8bc59c0a3eb7e407893d17bbd58f315d110 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Thu, 3 Nov 2016 14:39:00 -0700 Subject: [PATCH] Clarify RenderObjectWidget.updateRenderObject (#6702) Closes https://github.com/flutter/flutter/issues/5743 --- packages/flutter/lib/src/widgets/framework.dart | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) { }