karvulf / flutter-reorderable-grid-view

BSD 3-Clause "New" or "Revised" License
158 stars 23 forks source link

One page has multiple ReorderableBuilders #55

Closed haoaiqing closed 2 years ago

haoaiqing commented 2 years ago

One page has multiple ReorderableBuilders When dragging, there will be an animation of flickering downward

karvulf commented 2 years ago

Hello @haoaiqing Thank you for opening the issue. Do you have an example code for me where I could reproduce your issue? A screen record would be also very helpful.

karvulf commented 2 years ago

I tried to use two GridView with ReorderableBuilder. I couldn't find your described issue. So I would be glad to have minimal example to reproduce your issue. @haoaiqing

haoaiqing commented 2 years ago

@karvulf Hello Thank you for your reply

I wrote two ReorderableBuilders in Column Then when I drag the items to reorder, the phenomenon in the video appears https://user-images.githubusercontent.com/24805299/201922679-cfdbd9b7-5396-4dc0-a652-0daa358506ce.mp4

karvulf commented 2 years ago

Ah I see, this looks really weird, could you give me the code snippet that you used for that? @haoaiqing

haoaiqing commented 2 years ago

demo.zip @karvulf Hello Thank you for your reply I wrote a case code in the zip file above Sorry for answering so late The first time you drag it, there is no problem. Please drag another one, and then the flicker problem occurs

karvulf commented 2 years ago

Thank you @haoaiqing I will check your issue this week-end :)

haoaiqing commented 2 years ago

Thank you @karvulf By the way, the lowest ReorderableBuilder flashes more seriously only when the Column scrolls enough

karvulf commented 2 years ago

I have some updates for you. The main issue is coming because of GridView.builder. If you just change this to GridView and add the children, the issue is gone. If you used GridView.builder for performance improvements when having a lot of children, then this just don't work at the current version of this package. In the next major version (4.0.0), I will fix that issue. So at the moment, the only solution for your issue is to use GridView instead of GridView.builder. I hope that helps @haoaiqing

karvulf commented 2 years ago

Closing this issue because of no activity, feel free to reopen if it still not work in release 4.0.0 @haoaiqing