File tree Expand file tree Collapse file tree
packages/flet/lib/src/controls Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,17 +105,24 @@ class ResponsiveRowControl extends StatelessWidget with FletStoreMixin {
105105 );
106106 }
107107
108+ final crossAxisAlignment = control.getCrossAxisAlignment (
109+ "vertical_alignment" , CrossAxisAlignment .start)! ;
110+
108111 Widget row = Row (
109112 spacing: bpSpacing - 0.1 ,
110113 mainAxisAlignment: control.getMainAxisAlignment (
111114 "alignment" , MainAxisAlignment .start)! ,
112115 mainAxisSize: MainAxisSize .max,
113- crossAxisAlignment: control.getCrossAxisAlignment (
114- "vertical_alignment" , CrossAxisAlignment .start)! ,
116+ crossAxisAlignment: crossAxisAlignment,
115117 children: controls,
116118 );
117119
118- if (control.get ("scroll" ) != null ) {
120+ // `IntrinsicHeight` is only needed when the row is both vertically
121+ // scrollable (unbounded height) and asked to stretch children
122+ // cross-axis — otherwise the row sizes to its children naturally,
123+ // so we avoid the extra intrinsic-sizing pass.
124+ if (control.get ("scroll" ) != null &&
125+ crossAxisAlignment == CrossAxisAlignment .stretch) {
119126 row = IntrinsicHeight (child: row);
120127 }
121128
You can’t perform that action at this time.
0 commit comments