Clarify RenderObjectWidget.updateRenderObject (#6702)
Closes https://github.com/flutter/flutter/issues/5743
This commit is contained in:
parent
66d8aa1141
commit
8a91c8bc59
@ -1166,12 +1166,24 @@ abstract class RenderObjectWidget extends Widget {
|
|||||||
/// Creates an instance of the [RenderObject] class that this
|
/// Creates an instance of the [RenderObject] class that this
|
||||||
/// [RenderObjectWidget] represents, using the configuration described by this
|
/// [RenderObjectWidget] represents, using the configuration described by this
|
||||||
/// [RenderObjectWidget].
|
/// [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
|
@protected
|
||||||
RenderObject createRenderObject(BuildContext context);
|
RenderObject createRenderObject(BuildContext context);
|
||||||
|
|
||||||
/// Copies the configuration described by this [RenderObjectWidget] to the
|
/// Copies the configuration described by this [RenderObjectWidget] to the
|
||||||
/// given [RenderObject], which will be of the same type as returned by this
|
/// given [RenderObject], which will be of the same type as returned by this
|
||||||
/// object's [createRenderObject].
|
/// 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
|
@protected
|
||||||
void updateRenderObject(BuildContext context, @checked RenderObject renderObject) { }
|
void updateRenderObject(BuildContext context, @checked RenderObject renderObject) { }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user