Intrinsic widgets | Decoding Flutter
Why Stack Overflow recommends it
Stack Overflow users link it when answering Flutter layout questions about making Row children share a height or stretch to fill it, and to warn about the performance cost of intrinsic widgets.
Recommended by 1 people across 1 different months, 2020 to 2023.
What it is
An 8-minute episode of the official Flutter channel's Decoding Flutter series explaining IntrinsicHeight and IntrinsicWidth, which size a widget relative to its siblings. It walks through the layout behavior with a DartPad example and links to the documentation.
What people said
Recommends Hussain · 2022-10 · Stack Overflow · on “Intrinsic Height Issue in row”
Recently Flutter released this video: [this video] Since you mentioned in the comments that your code can be considered a simple Row widget, I think the video has the answer to your problem.
Cites merfire · 2020-07 · Stack Overflow · on “Flutter vertical divider as tall as its parent”
You can use IntrinsicHeight for this. I used Container for my divider in this example, because I needed border radius on my divider, but you can use VerticalDivider too. IntrinsicHeight( child: Row( children: <Widget>[ // This is your divider Container( width: 3, height: double.infinity, color: Colors.blue, margin: const EdgeInsets.only(right: 4), ), Column( children: <Widget>[ Text( 'Text 1', style: TextStyle(fontSize: 20), ), Text( 'Text 2', style: TextStyle(fontSize: 20), ), Text( 'Text 3', style: TextStyle(fontSize: 20), ), ], ), ], ), ), This is the result [LINK] If you just need a simple divider on the side I would suggest that you add border to the Container, because documetnation for
Cites Jaecheol Park · 2023-06 · Stack Overflow · on “Flutter: Expand only the height of child widget in Row”
If you don't want to set the Row 's height, you could wrap Row widget with IntrinsicHeight . Then set the height of the button to double.infinity . IntrinsicHeight( child: Row( children: [ Expanded( child: ..., ), TextButton( ..., child: Container( height: double.infinity, ..., ), ), ], ), ), However, since IntrinsicHeight needs to be calculated before rendering, care should be taken when using it for heavy widgets. Please refer to the link below. [this video]