提交 01a0ec90 编写于 作者: A Adam Barth

Don't divide by zero

If there aren't any items, there's no point in computing which items to show.
上级 1af274b8
......@@ -439,7 +439,7 @@ abstract class ScrollableWidgetList extends Scrollable {
int itemShowCount = 0;
Offset viewportOffset = Offset.zero;
if (_containerExtent != null && _containerExtent > 0.0) {
if (_containerExtent != null && _containerExtent > 0.0 && itemCount > 0) {
if (paddedScrollOffset < scrollBehavior.minScrollOffset) {
// Underscroll
double visibleExtent = _containerExtent + paddedScrollOffset;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册