Closed bahung1221 closed 3 years ago
It seems there is the same issue in #3 .
I just found some interested things, the above example will work if i wrapping the dispatchNewList
call into a addPostFrameCallback
:
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
taskController.dispatchNewList(newList);
});
I found that this issue is relative to my modal context, because I call dispatchNewList
immediately after a modal closed by Navigator.of(context).pop()
. Now I just wait for a little time before calling dispatchNewList
and then everything worked like a charm!
Its weird but I think I should close this issue now 🍻
Thanks for your awesome work!
The plugin worked well and really easy to use. But the first time I was stuck when I get the new list data from API and then passed the whole list to
dispatchNewList
, in this case there is no animation occurred. The workaround is manually comparing the old list and the new list to find the diff, and thenpush/remove
the different items to the old list.Not working:
Working:
I think this issue will be a big improvement when it has resolved because this is frequently behaviour in my opinion.
Thanks a lot 🍻