letsar/flutter_staggered_grid_view

There is a bug in SliverQuiltedGridDelegate

Reza-Babakhani opened this issue · 0 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)