Repository navigation
Closed
flutter/packages
#13522Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue
Description
Steps to reproduce
- Execute the example code (Tested on mac and web)
Expected results
To not give an overflow pixel error
Actual results
A RenderFlex overflowed by 8.0 pixels on the bottom.
Code sample
Code sample
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(
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
final String title;
const MyHomePage({super.key, required this.title});
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(widget.title)),
body: IntrinsicHeight(
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(
child: Card(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text('Text'),
TextField(
decoration: InputDecoration(
isDense: true,
isCollapsed: true,
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
hintText: 'Test',
),
),
],
),
),
),
// As an example, the ard should adapt to the same height as its left neighbour
Card(child: Text('Right text')),
],
),
),
);
}
}
Screenshots or Video
Logs
Logs
======== Exception caught by rendering library =====================================================
The following assertion was thrown during layout:
A RenderFlex overflowed by 8.0 pixels on the bottom.
The relevant error-causing widget was:
Column Column: .../Documents/git/flutter/flutter_beta/examples/platform_view/lib/main.dart:36:24
The overflowing RenderFlex has an orientation of Axis.vertical.
The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the RenderFlex to fit within the available space instead of being sized to their natural size.
This is considered an error condition because it indicates that there is content that cannot be seen. If the content is legitimately bigger than the available space, consider clipping it with a ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex, like a ListView.
The specific RenderFlex in question is: RenderFlex#4b4dd OVERFLOWING
... needs compositing
... parentData: <none> (can use size)
... constraints: BoxConstraints(w=718.0, h=36.0)
... size: Size(718.0, 36.0)
... direction: vertical
... mainAxisAlignment: start
... mainAxisSize: min
... crossAxisAlignment: center
... verticalDirection: down
... spacing: 0.0
◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
====================================================================================================Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel beta, 3.47.0-0.3.pre, on macOS 26.5.2 25F84 darwin-arm64, locale en-US)
! Warning: `flutter` on your path resolves to /opt/homebrew/share/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/swi-oberhauser/Documents/git/flutter/flutter_beta. Consider adding /Users/swi-oberhauser/Documents/git/flutter/flutter_beta/bin to the front of your path.
! Warning: `dart` on your path resolves to /opt/homebrew/share/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/swi-oberhauser/Documents/git/flutter/flutter_beta. Consider adding /Users/swi-oberhauser/Documents/git/flutter/flutter_beta/bin to the front of your path.
[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.5)
[✓] Chrome - develop for the web
[✓] Connected device (4 available)
[✓] Network resources
! Doctor found issues in 1 category.Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsp: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages teamworkaround availableThere is a workaround available to overcome the issueThere is a workaround available to overcome the issue

Activity
Gustl22 commentedon Aug 4, 2026
AI analysis:
Root cause
The discrepancy is in _RenderDecoration in packages/flutter/lib/src/material/input_decorator.dart. The minContainerHeight guard is computed differently in the two paths:
Two issues compared to the layout path:
Suggested fix
Align the intrinsic path with the layout path:
Workaround (app-side)
Pass isDense: false and isCollapsed: true to InputDecoration when the field is inside an IntrinsicHeight tree.
puneetkukreja98 commentedon Aug 5, 2026
@Gustl22 Thanks for reporting this issue. I was able to reproduce it on both macOS and Web. Routing this to team-design for further investigation as it pertains to InputDecoration.
Flutter doctor -v:
[material_ui] Fix InputDecorator intrinsic height when isDense or isC… (