letsar/flutter_staggered_grid_view

'estimatedMaxScrollOffset >= endScrollOffset - leadingScrollOffset': is not true.

zhoujinliang opened this issue · 5 comments

The following assertion was thrown during performLayout():
'package:flutter_staggered_grid_view/src/rendering/sliver_masonry_grid.dart': Failed assertion: line
624 pos 9: 'estimatedMaxScrollOffset >= endScrollOffset - leadingScrollOffset': is not true.

The relevant error-causing widget was:
MasonryGridView
MasonryGridView:file:///Users/..../discover_screen.dart:72:34

When the exception was thrown, this was the stack:
#2 RenderSliverMasonryGrid.performLayout (package:flutter_staggered_grid_view/src/rendering/sliver_masonry_grid.dart:624:9)
sliver_masonry_grid.dart:624
#3 RenderObject.layout (package:flutter/src/rendering/object.dart:2395:7)
object.dart:2395
#4 RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:139:12)
sliver_padding.dart:139
#5 RenderSliverPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:361:11)
sliver_padding.dart:361
#6 RenderObject.layout (package:flutter/src/rendering/object.dart:2395:7)
object.dart:2395
#7 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:534:13)
viewport.dart:534
#8 RenderShrinkWrappingViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1882:12)
viewport.dart:1882
#9 RenderShrinkWrappingViewport.performLayout (package:flutter/src/rendering/viewport.dart:1833:20)
viewport.dart:1833
#10 RenderObject.layout (package:flutter/src/rendering/object.dart:2395:7)
object.dart:2395
#11 RenderBox.layout (package:flutter/src/rendering/box.dart:2386:11)
box.dart:2386
#12 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:122:14)
proxy_box.dart:122
#13 RenderObject.layout (package:flutter/src/rendering/object.dart:2395:7)
object.dart:2395
#14 RenderBox.layout (package:flutter/src/rendering/box.dart:2386:11)

letsar commented

Can you give me a way to reproduce it? Which flutter version do you use?

I have also encountered this issue. When using MasonryGridView.builder in SmartRefresher, after performing a pull-down refresh and scrolling the list multiple times, the issue should be reproducible.