-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.24Found to occur in 3.24Found to occur in 3.24found in release: 3.27Found to occur in 3.27Found to occur in 3.27frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-text-inputOwned by Text Input teamOwned by Text Input team
Description
Steps to reproduce
- Run the code sample.
- Observe the InputDecorator height using the widget inspector.
Expected results
The InputDecorator height is 48 (content height = 32 + default vertical padding = 8 * 2).
Notice that when adding an Icon to the content (uncomment the corresponding line in the code sample), the InputDecorator is properly sized.
Actual results
The InputDecorator height is 71.4:
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 const MaterialApp(
home: Scaffold(
body: Center(
child: InputDecorator(
decoration: InputDecoration(
filled: true
),
child: SizedBox(
height: 32.0,
child: Row(
children: [
Text(
'Text',
style: TextStyle(fontSize: 60.0),
),
// Uncomment this line to get the correct height
// for the InputDecorator.
Icon(Icons.arrow_drop_down),
],
),
),
),
),
),
);
}
}
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
Flutter (Channel master, 3.27.0-1.0.pre.632, on Ubuntu 24.04.1 LTS 6.8.0-49-generic, locale fr_FR.UTF-8)
Metadata
Metadata
Assignees
Labels
a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.24Found to occur in 3.24Found to occur in 3.24found in release: 3.27Found to occur in 3.27Found to occur in 3.27frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-text-inputOwned by Text Input teamOwned by Text Input team



