Home > Enterprise >  Let widget silently overflow outside screen
Let widget silently overflow outside screen

Time:06-02

How can I make a widget (MarkdownBody) in a ListView silently overflow horizontally outside the screen if the content is too long to fit on the screen?

I've tried using ClipPath, OverflowBox and a few other solutions, but I couldn't get any of them to do what I want to do. No matter what I try, either the MarkdownBody wraps its content to two lines or I get an overflow error.

Is there a way to simply make the widget silently overflow and paint itself outside the screen without generating overflow errors?

CodePudding user response:

If the widget is only horizontally overflowing then you may put the MarkdownBody inside a SingleChildScrollView with scrollDirection set to Axis.horizontal

  • Related