-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Description
When ListTileThemeData.minTileHeight is set in the theme, ListTile reports its intrinsic height as the minTileHeight value rather than its actual content height. This causes a RenderFlex overflow when ListTile is used inside an IntrinsicHeight widget, because IntrinsicHeight constrains the layout to 35px while the actual ListTile content requires ~40px.
The minTileHeight property should act as a minimum constraint, not override the intrinsic height calculation. When content exceeds minTileHeight, the intrinsic height should reflect the actual content size.
Steps to Reproduce
- Set
ListTileThemeData(minTileHeight: 35)in the app theme - Place a
ListTileinsideColumn → IntrinsicHeight → Row → Expanded → Column - Run the app
Expected Behavior
IntrinsicHeight calculates the true intrinsic height of ListTile (~40px) and no overflow occurs.
Actual Behavior
IntrinsicHeight uses minTileHeight (35px) as the intrinsic height, causing a 5px overflow.
A RenderFlex overflowed by 5.0 pixels on the bottom.
constraints: BoxConstraints(w=600.0, 0.0<=h<=35.0)
size: Size(600.0, 35.0)
Minimal Reproduction Code
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(
title: 'Flutter Demo',
theme: ThemeData(
listTileTheme: ListTileThemeData(minTileHeight: 35),
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
Widget build(BuildContext context) {
return const Material(
type: MaterialType.transparency,
child: Column(
children: [
IntrinsicHeight(
child: Row(
children: [
Expanded(
child: Column(
children: [ListTile(title: Text('item.label'))],
),
),
Expanded(
child: Column(
children: [ListTile(title: Text('item.label'))],
),
),
],
),
),
],
),
);
}
}Flutter Doctor Output
[✓] Flutter (Channel stable, 3.38.3, on macOS 15.6 24G84 darwin-arm64 (Rosetta), locale en-AU)
• Flutter version 3.38.3 on channel stable at /Users/eric/development/flutter
• Framework revision 19074d12f7 (2025-11-20)
• Engine revision 13e658725d
• Dart version 3.10.1
• DevTools version 2.51.1
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 26.1.1)
[✓] Chrome - develop for the web
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!
Platform
Tested on Chrome (web)