Passing a custom SliverChildBuilderDelegate that uses a findChildIndexCallback to the MasonryGridView.custom constructor and changing the items order causes the package to fail.
Clicking on the floating button to shuffle the backing items list produces an error.
Commenting out: findChildIndexCallback: _findChildIndex, and repeating the same steps, however, produces the right results.
It seems the masonry grid implementation is not accounting for the potential Widget-RenderObject reparenting.
Passing a custom
SliverChildBuilderDelegate
that uses afindChildIndexCallback
to theMasonryGridView.custom
constructor and changing the items order causes the package to fail.Consider the following example:
Clicking on the floating button to shuffle the backing items list produces an error. Commenting out:
findChildIndexCallback: _findChildIndex,
and repeating the same steps, however, produces the right results.It seems the masonry grid implementation is not accounting for the potential Widget-RenderObject reparenting.