karvulf / flutter-reorderable-grid-view

BSD 3-Clause "New" or "Revised" License
143 stars 20 forks source link

Abnormal behavior when resizing #91

Open khjde1207 opened 1 year ago

khjde1207 commented 1 year ago

https://github.com/karvulf/flutter-reorderable-grid-view/assets/18232924/1d107c6f-9e6a-4c90-a73f-5f114227a018

These days, phones with changing screen sizes are being released, such as the Google Pixel Fold.

When the screen size changes, it behaves abnormally.

karvulf commented 1 year ago

Hello @khjde1207 I see why this happens, I will try to find a fix for that

khjde1207 commented 1 year ago

thank you !

 LayoutBuilder(
            builder: (context, constraints) {
                return     ReorderableBuilder.builder(
                    key: Key(
                        "${gridViewKey.toString()} ${constraints.maxWidth}"),
....
..

I handled this temporarily by changing the key value based on the width.