Repository navigation
InputDecoration: looks like contentPadding is broken on master branch #44726
Copy link
Copy link
Closed
Labels
frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packages
Description
I updated flutter on master and can't reduce contentPadding anymore
Steps to Reproduce
import 'package:flutter/material.dart';
class TestWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Material(
child: Padding(
padding: EdgeInsets.all(30),
child: Column(
children: <Widget>[
Container(
color: Colors.red,
child: TextField(
decoration: InputDecoration(
hintText: 'Hello World',
border: InputBorder.none,
contentPadding: EdgeInsets.zero
),
),
)
],
),
),
);
}
}Target Platform: Android
Logs
[✓] Flutter (Channel unknown, v1.10.15-pre.503, on Mac OS X 10.15 19A602, locale en-GB)
• Flutter version 1.10.15-pre.503 at /Users/eugenepisotsky/Development/flutter
• Framework revision 9e0df259df (17 hours ago), 2019-11-11 15:56:43 -0800
• Engine revision 31cd2dfca2
• Dart version 2.7.0
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/eugenepisotsky/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.1, Build version 11A1027
• CocoaPods version 1.8.4
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 35.3.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] IntelliJ IDEA Community Edition (version 2019.1.4)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 40.2.2
• Dart plugin version 191.8593
[✓] Connected device (3 available)
• ASUS X00TD • K2AXB761Z914LDJ • android-arm64 • Android 9 (API 28)
• Chrome • chrome • web-javascript • Google Chrome 76.0.3809.100
• Web Server • web-server • web-javascript • Flutter Tools
! Doctor found issues in 1 category.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packages
Activity
[-]InputDecoration: contentPadding looks like is broken on master branch[/-][+]InputDecoration: looks like contentPadding is broken on master branch[/+]ajviera commentedon Nov 25, 2019
+1 The same problem
algodave commentedon Nov 26, 2019
Same problem here
MohsinN commentedon Nov 26, 2019
Facing the same issue.
MohsinN commentedon Nov 27, 2019
Following changes to
TextFormFieldare the cause.#44726
Recently
isDenseproperty was added to classInputDecoration. Setting it totruealong withcontentPadding, resolves the issue.Whether it should be included in collapsed by default is a separate discussion.
rafagith commentedon Dec 13, 2019
Same issue here
droplet-js commentedon Dec 16, 2019
same issue #46964
justinmc commentedon Dec 17, 2019
This is caused by #42449, which increased the height of TextFields by 8px in order to make them meet the Material guidelines for minimum interactive size.
The solution is to use
isDenseas @MohsinN said.I'll go ahead and close this, but let me know if any problem still remains and we can reopen.
github-actions commentedon Aug 25, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.