Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8a91c8b

Browse files
authored
Clarify RenderObjectWidget.updateRenderObject (flutter#6702)
Closes flutter#5743
1 parent 66d8aa1 commit 8a91c8b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/flutter/lib/src/widgets/framework.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,12 +1166,24 @@ abstract class RenderObjectWidget extends Widget {
11661166
/// Creates an instance of the [RenderObject] class that this
11671167
/// [RenderObjectWidget] represents, using the configuration described by this
11681168
/// [RenderObjectWidget].
1169+
///
1170+
/// This method should not do anything with the children of the render object.
1171+
/// That should instead be handled by the method that overrides
1172+
/// [RenderObjectElement.mount] in the object rendered by this object's
1173+
/// [createElement] method. See, for example,
1174+
/// [SingleChildRenderObjectElement.mount].
11691175
@protected
11701176
RenderObject createRenderObject(BuildContext context);
11711177

11721178
/// Copies the configuration described by this [RenderObjectWidget] to the
11731179
/// given [RenderObject], which will be of the same type as returned by this
11741180
/// object's [createRenderObject].
1181+
///
1182+
/// This method should not do anything to update the children of the render
1183+
/// object. That should instead be handled by the method that overrides
1184+
/// [RenderObjectElement.update] in the object rendered by this object's
1185+
/// [createElement] method. See, for example,
1186+
/// [SingleChildRenderObjectElement.update].
11751187
@protected
11761188
void updateRenderObject(BuildContext context, @checked RenderObject renderObject) { }
11771189

0 commit comments

Comments
 (0)