flutter_staggered_grid_view icon indicating copy to clipboard operation
flutter_staggered_grid_view copied to clipboard

Why does my image list reversed?

Open winneze1 opened this issue 3 years ago • 3 comments

Hello I'm using StaggeredGridTile.count And here is my code.

StaggeredGrid.count(
          crossAxisCount: 2,
          children: [
            ...images.mapIndexed((index, tile) {
              return StaggeredGridTile.count(
                   crossAxisCellCount: 1,
                   mainAxisCellCount: 1,
                   child: Container(
                  height: 50,
                  width: 50,
                  child: Text(index.toString()),
                )
......
)

The problem is my index go wrong position. Please help me. Is this a bug? Screen Shot 2022-08-10 at 19 04 27

winneze1 avatar Aug 10 '22 12:08 winneze1

hi add

mainAxisSpacing : 1 to StaggeredGrid.count

On Wed, Aug 10, 2022 at 4:36 PM Minh Nguyễn @.***> wrote:

Hello I'm using StaggeredGridTile.count And here is my code.

StaggeredGrid.count( crossAxisCount: 2, children: [ ...images.mapIndexed((index, tile) { return StaggeredGridTile.count( crossAxisCellCount: 1, mainAxisCellCount: 1, child: Container( height: 50, width: 50, child: Text(index.toString()), ) ...... )

The problem is my index go wrong position. Please help me. Is this a bug? [image: Screen Shot 2022-08-10 at 19 04 27] https://user-images.githubusercontent.com/54367091/183896599-edb5ce23-777f-47b6-8df5-6a65afa9c05f.png

— Reply to this email directly, view it on GitHub https://github.com/letsar/flutter_staggered_grid_view/issues/262, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIDIQDGYKGDYTUAQBFWPE2DVYOLMJANCNFSM56EITAHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

pooria89 avatar Aug 10 '22 14:08 pooria89

hi add mainAxisSpacing : 1 to StaggeredGrid.count On Wed, Aug 10, 2022 at 4:36 PM Minh Nguyễn @.> wrote: Hello I'm using StaggeredGridTile.count And here is my code. StaggeredGrid.count( crossAxisCount: 2, children: [ ...images.mapIndexed((index, tile) { return StaggeredGridTile.count( crossAxisCellCount: 1, mainAxisCellCount: 1, child: Container( height: 50, width: 50, child: Text(index.toString()), ) ...... ) The problem is my index go wrong position. Please help me. Is this a bug? [image: Screen Shot 2022-08-10 at 19 04 27] https://user-images.githubusercontent.com/54367091/183896599-edb5ce23-777f-47b6-8df5-6a65afa9c05f.png — Reply to this email directly, view it on GitHub <#262>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIDIQDGYKGDYTUAQBFWPE2DVYOLMJANCNFSM56EITAHA . You are receiving this because you are subscribed to this thread.Message ID: @.>

Thanks. But that not helping

winneze1 avatar Aug 11 '22 04:08 winneze1

Apparently, when using this in a listview and use reverse = true, the whole StaggeredGrid is reversed also. 😩

winneze1 avatar Aug 22 '22 06:08 winneze1