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
Improve the ListTile docs: explain the Text maxLines dependency #15423
Docs say ListTiles are all the same height, and all 1–3 lines high. When I build ListTiles with subtitle property containing a very length Text object, those ListTiles are wayyyy taller than three lines and certainly not of equal height like the docs say they're supposed to (even if you construe "three lines" as "three spans of text separated by \n".
I just implemented some truncation just to keep really long content from making a full-screen ListTile and I can see the ListTiles are not the same height (any of them; they're all slightly different). Is it because the ListTiles are wrapped in a Dismissible, so that maybe ListView no longer can set the height of the ListTiles to be the same? Do the ListTiles have to be immediate children of ListView?
Yeah, the ListTile only knows that the title and subtitle are widgets. The parameter "isThreeLine" is a little misleading in that regard, and we should probably document that better. Three line tiles differ from two line tiles only in their min height. One line tiles have a smaller min height than two line, and also don't show the subtitle widget.
It does expand to fit the widgets put inside it, so you will need to set maxLines and overflow on your Text arguments to match what you want your limits to be.
Or perhaps those should be added to a DefaultTextStyle inside of the ListTile...
changed the title [-]ListTile WAY longer than three lines![/-][+]Improve the ListTile documentation: explain the Text maxLines dependency[/+]on Jun 12, 2018
changed the title [-]Improve the ListTile documentation: explain the Text maxLines dependency[/-][+]Improve the ListTile docs: explain the Text maxLines dependency[/+]on Jun 12, 2018
Not sure if it is related or not, but there is no docs explaining how ListTile works with contentPadding, margin and probably something like min height.
I'am trying to build column with 2 divided list tiles, one of them has long text.
There is no extension point to make "paddings" between dividers to be the same for both single line and multi line list tiles.
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
Hixie commentedon Mar 12, 2018
cc @gspencergoog
We probably lost some limits when adding support for text scaling; I guess the texts should have explicit maxLines and ellipses enabled.
kylegoetz commentedon Mar 12, 2018
I just implemented some truncation just to keep really long content from making a full-screen ListTile and I can see the ListTiles are not the same height (any of them; they're all slightly different). Is it because the ListTiles are wrapped in a Dismissible, so that maybe ListView no longer can set the height of the ListTiles to be the same? Do the ListTiles have to be immediate children of ListView?
kylegoetz commentedon Mar 12, 2018
gspencergoog commentedon Mar 12, 2018
Yeah, the ListTile only knows that the title and subtitle are widgets. The parameter "isThreeLine" is a little misleading in that regard, and we should probably document that better. Three line tiles differ from two line tiles only in their min height. One line tiles have a smaller min height than two line, and also don't show the subtitle widget.
It does expand to fit the widgets put inside it, so you will need to set
maxLinesandoverflowon yourTextarguments to match what you want your limits to be.Or perhaps those should be added to a DefaultTextStyle inside of the ListTile...
HansMuller commentedon Jun 12, 2018
The documentation for ListTile.title, ListTile.subtitle, ListTile.isThreeLine should explain the need for setting maxLines in Text widgets.
[-]ListTile WAY longer than three lines![/-][+]Improve the ListTile documentation: explain the Text maxLines dependency[/+][-]Improve the ListTile documentation: explain the Text maxLines dependency[/-][+]Improve the ListTile docs: explain the Text maxLines dependency[/+]Hixie commentedon Jun 18, 2018
Could ListTile set the maxLines using DefaultTextStyle?
marchenko1985 commentedon Jan 13, 2019
Not sure if it is related or not, but there is no docs explaining how
ListTileworks withcontentPadding,marginand probably something like min height.I'am trying to build column with 2 divided list tiles, one of them has long text.
There is no extension point to make "paddings" between dividers to be the same for both single line and multi line list tiles.
github-actions commentedon Aug 19, 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.