溢出是什么意思?
What does an overflow mean?
当我调试我的 flutter 应用程序时,在某些时候我会看到这样的警告:
Bottom overflow by 1234 pixel
BoxConstraints have a negative value
我想,我对 Flutter 视口/布局的概念不正确:
Currently, I image an infinite drawing area, where I declaratively
define widgets.
Widgets, which are too large, get drawn outside the
viewport [or clipped].
能否请您改进我可能错误的概念?
一般来说,溢出意味着您要在屏幕上绘制的小部件超出了屏幕的边界,因此不再可见...如果您在某个特定的容器中实现不可滚动的列,也会发生这种情况高度... 通常,您可以将小部件包装在 SingleChildScrollView 小部件中,并作为 child 选择 column/row (取决于您希望它对齐的方向...)或制作列表视图并将滚动方向 属性 设置为 Axis.vertical 或 Axis.horizontal...
当尺寸 [height, width]
超过屏幕的总尺寸时会发生这种情况。
例如:手机屏幕的纵横比height
为500,按钮的纵横比size.height
为600,则Bottom溢出100像素。
当我调试我的 flutter 应用程序时,在某些时候我会看到这样的警告:
Bottom overflow by 1234 pixel
BoxConstraints have a negative value
我想,我对 Flutter 视口/布局的概念不正确:
Currently, I image an infinite drawing area, where I declaratively define widgets.
Widgets, which are too large, get drawn outside the viewport [or clipped].
能否请您改进我可能错误的概念?
一般来说,溢出意味着您要在屏幕上绘制的小部件超出了屏幕的边界,因此不再可见...如果您在某个特定的容器中实现不可滚动的列,也会发生这种情况高度... 通常,您可以将小部件包装在 SingleChildScrollView 小部件中,并作为 child 选择 column/row (取决于您希望它对齐的方向...)或制作列表视图并将滚动方向 属性 设置为 Axis.vertical 或 Axis.horizontal...
当尺寸 [height, width]
超过屏幕的总尺寸时会发生这种情况。
例如:手机屏幕的纵横比height
为500,按钮的纵横比size.height
为600,则Bottom溢出100像素。