EXCEPTION CAUGHT BY RENDERING LIBRARY
The following assertion was thrown during performLayout():
SliverGeometry is not valid: The "scrollExtent" is negative.
The RenderSliver that returned the offending geometry was: RenderSliverGrid#f9778 relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-PAINT:
creator: SliverGrid ← MediaQuery ← SliverPadding ← Viewport ← IgnorePointer-[GlobalKey#15db4] ←
Semantics ← _PointerListener ← Listener ← _GestureSemantics ←
RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#30301] ← _PointerListener ← Listener
← ⋯
parentData: paintOffset=Offset(0.0, 0.0) (can use size)
constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle,
There is a related issue here. Still unresolved.
ScrollExtent is negative in flutter
Btw, you can check on Github.
https://github.com/flutter/flutter/issues/39963
And for the reproduce of the error: https://dartpad.dev/2630a061cf2632a1ffd6fb6c13c94e4c