letsar / flutter_staggered_grid_view

A Flutter staggered grid view

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

There is a bug in SliverQuiltedGridDelegate

Reza-Babakhani opened this issue · comments

this is my code:

GridView.custom(
                shrinkWrap: true,
                physics: const NeverScrollableScrollPhysics(),
                gridDelegate: SliverQuiltedGridDelegate(
                  crossAxisCount: 4,
                  mainAxisSpacing: 15,
                  crossAxisSpacing: 15,
                  repeatPattern: QuiltedGridRepeatPattern.same,
                  pattern: const [
                    QuiltedGridTile(1, 2),
                    QuiltedGridTile(1, 1),
                    QuiltedGridTile(1, 2),
                    QuiltedGridTile(1, 1),
                  ],
                ),
                childrenDelegate: SliverChildBuilderDelegate(
                  (context, index) => RegionListItem(),
                  childCount: 12,
                ),
              ),

I get this error:
RangeError (RangeError (index): Invalid value: Not in inclusive range 0..3: 4)