-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Closed
Labels
in triagePresently being triaged by the triage teamPresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Description
Steps to reproduce
i.e.
- have a
Row
wrapped inIntrinsicHeight
- inside this row have
LimitedBox
that constraints its childs width - the child, a
Text
should take up all the vertical space it needs, but instead only takes one line
Expected results
as mentioned in step 3., the child should take the height it needs, as it does when replaceing LimitedBox
with ConstrainedBox
Actual results
it only takes minimum height of 1 text line
Code sample
Code sample
This is the same as linked in dartPad
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData(),
home: Scaffold(
body: ListView(
children: [
WorkingExample(),
const SizedBox(height: 100),
DisfunctExample(),
],
),
),
);
}
}
class WorkingExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return IntrinsicHeight(
child: Row(
children: List.generate(
4,
(i) => ConstrainedBox(
constraints: BoxConstraints(maxWidth: 300),
child: Container(
child: Text('very very long text' * 20 * i),
color: Colors.teal,
),
),
),
),
);
}
}
class DisfunctExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return IntrinsicHeight(
child: Row(
children: List.generate(
4,
(i) => LimitedBox(
maxWidth: 300,
child: Container(
child: Text('very very long text' * 20 * i),
color: Colors.amber,
),
),
),
),
);
}
}
Screenshots or Video
Screenshots / Video demonstration
Top: expected, archieved with constrainedBox
Bottom: actual result

Logs
Flutter Doctor output
Doctor output
dart pad stable channel: Based on Dart SDK 3.8.1 and Flutter SDK 3.32.6
Metadata
Metadata
Assignees
Labels
in triagePresently being triaged by the triage teamPresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds