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`.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user