Skip to content

Flutter_markdown: add scroll view to markdown table #129052

@shuotwang

Description

@shuotwang

Is there an existing issue for this?

Use case

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.

截屏2023-06-16 下午6 07 14

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: flutter_markdownflutter/packages flutter_markdownpackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions