Don't divide by zero
If there aren't any items, there's no point in computing which items to show.
This commit is contained in:
parent
1867b58c40
commit
b2de3a705b
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user