Skip to content

Commit d50b5a0

Browse files
authored
Stop recommending "shrinkWrap" (#104008)
1 parent 4b67827 commit d50b5a0

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,9 +1385,9 @@ class RenderViewport extends RenderViewportBase<SliverPhysicalContainerParentDat
13851385
'If this widget is always nested in a scrollable widget there '
13861386
'is no need to use a viewport because there will always be enough '
13871387
'vertical space for the children. In this case, consider using a '
1388-
'Column instead. Otherwise, consider using the "shrinkWrap" property '
1389-
'(or a ShrinkWrappingViewport) to size the height of the viewport '
1390-
'to the sum of the heights of its children.',
1388+
'Column or Wrap instead. Otherwise, consider using a '
1389+
'CustomScrollView to concatenate arbitrary slivers into a '
1390+
'single scrollable.',
13911391
),
13921392
]);
13931393
}
@@ -1415,9 +1415,9 @@ class RenderViewport extends RenderViewportBase<SliverPhysicalContainerParentDat
14151415
'If this widget is always nested in a scrollable widget there '
14161416
'is no need to use a viewport because there will always be enough '
14171417
'horizontal space for the children. In this case, consider using a '
1418-
'Row instead. Otherwise, consider using the "shrinkWrap" property '
1419-
'(or a ShrinkWrappingViewport) to size the width of the viewport '
1420-
'to the sum of the widths of its children.',
1418+
'Row or Wrap instead. Otherwise, consider using a '
1419+
'CustomScrollView to concatenate arbitrary slivers into a '
1420+
'single scrollable.',
14211421
),
14221422
]);
14231423
}

packages/flutter/test/rendering/viewport_test.dart

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,9 +1708,8 @@ void main() {
17081708
' If this widget is always nested in a scrollable widget there is\n'
17091709
' no need to use a viewport because there will always be enough\n'
17101710
' horizontal space for the children. In this case, consider using a\n'
1711-
' Row instead. Otherwise, consider using the "shrinkWrap" property\n'
1712-
' (or a ShrinkWrappingViewport) to size the width of the viewport\n'
1713-
' to the sum of the widths of its children.\n',
1711+
' Row or Wrap instead. Otherwise, consider using a CustomScrollView\n'
1712+
' to concatenate arbitrary slivers into a single scrollable.\n',
17141713
);
17151714
});
17161715

@@ -1743,9 +1742,9 @@ void main() {
17431742
' If this widget is always nested in a scrollable widget there is\n'
17441743
' no need to use a viewport because there will always be enough\n'
17451744
' vertical space for the children. In this case, consider using a\n'
1746-
' Column instead. Otherwise, consider using the "shrinkWrap"\n'
1747-
' property (or a ShrinkWrappingViewport) to size the height of the\n'
1748-
' viewport to the sum of the heights of its children.\n',
1745+
' Column or Wrap instead. Otherwise, consider using a\n'
1746+
' CustomScrollView to concatenate arbitrary slivers into a single\n'
1747+
' scrollable.\n',
17491748
);
17501749
});
17511750
});

0 commit comments

Comments
 (0)