Closed linuxdrake closed 8 months ago
when i open the page, it always operate the animation. I just hope it does when dragging
Hallo @linuxdrake Can you give me more details? So you wish to disable the whole animations or specific ones? And does the animation not work for dragging or how is your last sentence meant?
the animation for dragging is ok for me. if I adjust the order of widgets of gridview, click other bottombar and return to the current page, there is always the animation from original order to the last new order, i don't want this animation.
This sounds a bit like the whole widget is rebuilt. Can you show me this behavior in a video and provide the code you have? @linuxdrake
Which version do you use?
This animation only happens every time because the widget is rebuilt.
If you use the version 5.0.0-dev.10
, you could set fadeInDuration
to Duration.zero
to have no animation. @linuxdrake
this part has changed with the version, so if you use the onReorder
, you should use it like this: @linuxdrake
...
onReorder: (reorderedListFunction) {
setState(() {
myBooks = reorderedListFunction(myBooks) as List<YOUR_BOOK_TYPE>;
});
}
...
sorry, the code can run ,but the animation stll appers. child: ReorderableBuilder( fadeInDuration: Duration.zero, scrollController: _scrollController, onReorder: (orderUpdateEntity) { setState(() { myBooks = orderUpdateEntity(myBooks) as List<Map<String, dynamic>>; // final mybook = myBooks.removeAt(orderUpdateEntity.oldIndex); // myBooks.insert(orderUpdateEntity.newIndex, mybook); }); @karvulf
I set fadeInDuration
to zero and it worked for me, I didn't see the fade in animation.
Can you provide a bit more of your code or even an example app where I can reproduce this issue? It's hard to say why this happens without seeing the code. @linuxdrake
@karvulf thank you very much. it worked after i removed the initiation in the inistate function. it worked well in vesion 4.0.0
can it close the animation? it shark my eyes,thks