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
Flutter_markdown: add scroll view to markdown table #129052
As the screen shot shows, if I have a very wide table, the contents are too narrow to read. It would be good if I can pan this table around with a much more human-readable column width.
The reason why I do not wrap the whole Markdown widget into a scrollable widget is that it will cause bad experience for other contents, for example, if text content is also scrollable, I need to pan around for each lone text line. It would be good if only large contents like tables and code blocks have the scroll behavior.
Proposal
the Table widget inside markdown builder function could be wrapped with a scrollable widget just like how it's done with code blocks, and provide the block constraints settings. Or, the constraints could be just the constraints of its parent widget. If the size of table (probably together with a minimum tableColumnWidth setting) exceeds the constrains, scroll gesture is enabled.
Wrap Table with SingleChildScrollView, scrollDirection: Axis.horizontal, and make sure to set tableColumnWidth: FixedColumnWidth(value) as my code above.
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
tylerjvollick commentedon Apr 23, 2024
Any updates on this? I'm facing the same issue with markdown tables we're trying to render with too many columns for the given horizontal space.
phong010198 commentedon Jun 21, 2024
I'm facing the same issue. Need horizontal scroll when using FixedColumnWidth
Edit: Temporary solution
Download the
flutter_markdownpackage and import to project locally.Open
builder.dart, find the part bellowWrap Table with
SingleChildScrollView,scrollDirection: Axis.horizontal, and make sure to settableColumnWidth: FixedColumnWidth(value)as my code above.Bazni commentedon Jun 21, 2024
Hey 👋,
Do you have any update or workaround on this?
Bazni commentedon Jun 25, 2024
The fix works well. Is a PR on going or should I try opening one?
[flutter_markdown] Add horizontal scroll for markdown table (#6983)
github-actions commentedon Jul 13, 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.