Home > OS >  Is it safe to ignore overflow errors in flutter
Is it safe to ignore overflow errors in flutter

Time:05-25

I have a container where the bottom gets covered up when the keyboard is active. This is the behavior that I want but I get an overflow error.

Can I safely ignore the error? I really want the content to be covered by the keyboard.

CodePudding user response:

It sometimes is okay to ignore the warning. The warning and "black yellow stripes" only show up in debug mode, so when your app is released there won't be any overflow warning.

If you want to remove the debug warning, consider using an OverflowBox. For example:

OverflowBox(
  maxHeight: double.infinity, // intended to overflow vertically
  child: YourChildWidget(),
)
  • Related