-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextField widget hint text is not vertically aligned #40248
Comments
Same issue with Flutter 1.9.1+hotfix.2 • channel stable • https://github.com/flutter/flutter.git |
Same problem with v1.9.1+hotfix.2. |
Maybe you can hack as follows before this bug fixed:
|
@heyman0823 this will make cutButtonLabel not automatically show Chinese or etc.... |
@virskor You can wrap TextFormField with a custom widget, and pass the localized string(label, hint) by constructor:
|
+1 |
1 similar comment
+1 |
试试 TextField > style > textBaseline: TextBaseline.alphabetic |
Good, 全局修改的话,设置主题即可:
|
谢谢 very much.
|
use TextTheme()
|
This should be fixed by #44029 |
you can set TextField->hintStyle->height:1.0 |
The CupertinoTextField has the same problem. |
Put it inside a container |
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 |
Details
I am using Flutter TextField widget, and i found that hint text is not automatically vertically aligned.
I found no methods to modify hint text Align.
look at this picture.
I found many people troubled by this problem, and i had try my best to find out reason why??
I FOUND THAT, DUDE.
Using theme data widget to modify app fonts, like Chinese font on IOS named PingFang SC.
![2019-09-11 20 20 32](https://user-images.githubusercontent.com/16968535/64697122-b49e3a80-d4d2-11e9-86d0-fb86bf497921.jpg)
After remove any fonts setting, you see this widget rendered perfect.
Hope any method to modify hint text align.
Thanks ,Dude i know that you are working hard to make Flutter better, and i am grateful to you for your help.
Logs
[✓] Flutter (Channel dev, v1.10.1, on Mac OS X 10.14.6 18G95, locale zh-Hans-CN)
• Flutter version 1.10.1 at /Users/weizhang/flutter
• Framework revision ce45c2d (5 天前), 2019-09-06 20:11:41 -0400
• Engine revision b9ce250
• Dart version 2.5.0 (build 2.5.0-dev.4.0 be66176534)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/weizhang/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.3, Build version 10G8
• CocoaPods version 1.7.5
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.38.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.4.1
[✓] Connected device (1 available)
• iPhone Xs Max • 2FF110A8-4E4F-42EA-99D5-918CEF5422C3 • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator)
The text was updated successfully, but these errors were encountered: