You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proposal: softWrap Property for the TextFormFieldlabelText #53166
This was originally posted on StackOverflow. Check it out here.
To avoid height changes when receiving error messages, I decided to show the error messages on the labelText. However, the labelText only allows for short error messages, even though there is still space for many more characters.
I wish there were a way of controlling the amount of characters shown before everything gets replaced by the ellipsis (… or Unicode 2026) character.
This could be achieved through a softWrap property, similar to what's on the TextField. We wouldn't be able to control how many characters are shown, but at least we could explore the full width of the labelText.
The closest I've been able to get to know where the ellipsis is put in is this line, inside the TextPainter class. I've checked out plenty of other related files, but with no success1.
1 This should be related to TextStyle, shouldn't it?
The ellipsis behavior in Flutter is a bit weird, see #18761. Is that the same problem you're seeing in the label here? I worry that a new parameter might not fix this without fixing that generic ellipsis issue first.
The workaround mentioned created by @marcglasberg is basically what I wanted to do indeed, though I haven't tested it yet and would like it to be more generic.
By the way, how did you find that issue? Was it only by Googling it? Was it by experience with the repo only or do you guys at Google have a more specialized tool for search inside repos?
No special tool, I just remembered seeing it before, and I had written it down as an issue that I'd like to get fixed. The only search tip I have is to use the labels if it clearly should be related to one of them. There are tons of issues to narrow down, but most of them do have labels now at least.
I'm going to close this since there is a workaround mentioned above, and it hasn't received much attention in the last few years. If anyone still thinks we should implement something like this, please comment and I can reopen, or open a new issue.
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 -v and a minimal reproduction of the issue.
Activity
justinmc commentedon Mar 27, 2020
The ellipsis behavior in Flutter is a bit weird, see #18761. Is that the same problem you're seeing in the label here? I worry that a new parameter might not fix this without fixing that generic ellipsis issue first.
psygo commentedon Mar 30, 2020
The workaround mentioned created by @marcglasberg is basically what I wanted to do indeed, though I haven't tested it yet and would like it to be more generic.
justinmc commentedon Mar 30, 2020
Sounds good. I'll prioritize #18761 and revisit this when that one gets fixed. I hope that workaround helps you out in the meantime.
psygo commentedon Mar 30, 2020
By the way, how did you find that issue? Was it only by Googling it? Was it by experience with the repo only or do you guys at Google have a more specialized tool for search inside repos?
justinmc commentedon Mar 30, 2020
No special tool, I just remembered seeing it before, and I had written it down as an issue that I'd like to get fixed. The only search tip I have is to use the labels if it clearly should be related to one of them. There are tons of issues to narrow down, but most of them do have labels now at least.
olfek commentedon May 3, 2022
I need the
TextwidgetsoftWrapproperty forTextField, find it hard to believe that something so simple but important is missing.flutter-triage-bot commentedon Mar 7, 2024
This issue is missing a priority label. Please set a priority label when adding the
triaged-designlabel.justinmc commentedon Mar 7, 2024
I'm going to close this since there is a workaround mentioned above, and it hasn't received much attention in the last few years. If anyone still thinks we should implement something like this, please comment and I can reopen, or open a new issue.
github-actions commentedon Mar 22, 2024
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.