While I debug my flutter app, at certain points I see warnings like this:
Bottom overflow by 1234 pixel
BoxConstraints have a negative value
I suppose, my concept of Flutter viewport / layout isn't correct:
Currently, I image an infinite drawing area, where I declaratively define widgets.
Widgets, which are too large, get drawn outside the viewport [or clipped].
Could you please refine my probably wrong concept?
CodePudding user response:
Generally overflow means, that the widget you want to paint on the screen crosses the border of the screen and therefore isn't visible anymore... This can also happen if you implement non scrollable columns in containers of a certain height... Usually, you can wrap your widget in a SingleChildScrollView widget and as a child choose a column/row (depending on the direction you want it to be aligned...) or make a list view and set the scrolldirection property to Axis.vertical or Axis.horizontal...
CodePudding user response:
This happens when the size [height, width]
exceeds the the total size of the screen.
For example : the aspect ratio height
of mobile screen is 500 and the size.height
of button is 600, then the Bottom overflow by 100 pixel.