Skip to content

Commit 317b9e7

Browse files
authored
Revert "Document reasoning for why CustomMultiChildLayout size can't depend on children and how to do it (flutter#47797)" (flutter#48369)
This reverts commit de2514c as it breaks analyze-linux and web_tests-0-linux checks.
1 parent 087e90a commit 317b9e7

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

packages/flutter/lib/src/rendering/custom_layout.dart

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,7 @@ class MultiChildLayoutParentData extends ContainerBoxParentData<RenderBox> {
2929
/// given the previous instance.
3030
///
3131
/// Override [getSize] to control the overall size of the layout. The size of
32-
/// the layout cannot depend on layout properties of the children. This was
33-
/// a design decision to simplify the delegate implementations: This way,
34-
/// the delegate implementations do not have to also handle various intrinsic
35-
/// sizing functions if the parent's size depended on the children.
36-
/// If you want to build a custom layout where you define the size of that widget
37-
/// based on its children, then you will have to create a custom render object.
38-
/// See [MultiChildRenderObjectWidget] with [ContainerRenderObjectMixin] and
39-
/// [RenderBoxContainerDefaultsMixin] to get started or [RenderStack] for an
40-
/// example implementation.
32+
/// the layout cannot depend on layout properties of the children.
4133
///
4234
/// Override [performLayout] to size and position the children. An
4335
/// implementation of [performLayout] must call [layoutChild] exactly once for

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1955,7 +1955,7 @@ class LayoutId extends ParentDataWidget<CustomMultiChildLayout> {
19551955
/// the children.
19561956
///
19571957
/// [CustomMultiChildLayout] is appropriate when there are complex relationships
1958-
/// between the size and positioning of multiple widgets. To control the
1958+
/// between the size and positioning of a multiple widgets. To control the
19591959
/// layout of a single child, [CustomSingleChildLayout] is more appropriate. For
19601960
/// simple cases, such as aligning a widget to one or another edge, the [Stack]
19611961
/// widget is more appropriate.

0 commit comments

Comments
 (0)