From 43b653e93f35fc8dcb1379798871e1e140ad7d78 Mon Sep 17 00:00:00 2001 From: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:21:06 -0700 Subject: [PATCH] Add a more typical / concrete example to IntrinsicHeight / IntrinsicWidth (#152246) The current example: > for example, when unlimited width is available and /// you would like a child that would otherwise attempt to expand infinitely to /// instead size itself to a more reasonable width. doesn't seem to be the most useful example because most leaf widgets will just size themselves to their intrinsic size if the incoming constraints are not tight, so when I was reading the doc I wasn't able to come up with any concrete widget combination that would require the use of `IntrinsicHeight`. --- packages/flutter/lib/src/widgets/basic.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 2374114e61..43f08bf735 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -3406,7 +3406,9 @@ class AspectRatio extends SingleChildRenderObjectWidget { /// /// This class is useful, for example, when unlimited width is available and /// you would like a child that would otherwise attempt to expand infinitely to -/// instead size itself to a more reasonable width. +/// instead size itself to a more reasonable width. Additionally, putting a +/// [Column] inside an [IntrinsicWidth] will allow all [Column] children to be +/// as wide as the widest child. /// /// The constraints that this widget passes to its child will adhere to the /// parent's constraints, so if the constraints are not large enough to satisfy @@ -3483,7 +3485,9 @@ class IntrinsicWidth extends SingleChildRenderObjectWidget { /// /// This class is useful, for example, when unlimited height is available and /// you would like a child that would otherwise attempt to expand infinitely to -/// instead size itself to a more reasonable height. +/// instead size itself to a more reasonable height. Additionally, putting a +/// [Row] inside an [IntrinsicHeight] will allow all [Row] children to be as tall +/// as the tallest child. /// /// The constraints that this widget passes to its child will adhere to the /// parent's constraints, so if the constraints are not large enough to satisfy