huhuang03 / reorderable_grid_view

MIT License
46 stars 33 forks source link

Dynamic crossAxisCount #48

Closed yegor-pelykh closed 2 years ago

yegor-pelykh commented 2 years ago

Is it possible to make a version of the constructor for ReorderableGridView where it would not be necessary to set the crossAxisCount, but this count was dynamic and dependent on the amount of free space allocated to this ReorderableGridView?

I think it should be possible.

huhuang03 commented 2 years ago

It's not in plan. Because:

  1. seems the official GridView not support this.
  2. If craclAxisCont calc by child width, but child width is calc by crossAxisCount, so it's a cycle calc.
yegor-pelykh commented 2 years ago

Yes, I agree with you. I was able to calculate the crossAxisCount dynamically outside of your widget based on the maximum available width. I think the issue is closed then. Thanks for the great widget! 👍