Skip to content

option to stagger insert and remove items #3

@rajd90

Description

@rajd90

This package is the best one I've found to animate a large list. In my app, I'm using it to help animate a list that gets filtered by the user....as the user applies or removes a filter I want the list to animate. But the problem is, if lots of items are added or removed at once, then animating them concurrently makes the animation look janky. e.g. if I'm added 100 new items at once into the middle of my list, then items underneath the new items have to really fast in the same animation duration.

I can make the animation take long if the list is longer, but to implement the same when lots of items are removed isn't as easy (as you can't access to old list without implementing didUpdateWidget).

It would be really great if there was an option to stagger the entry and removal of items. This would help the animation look smooth no matter how many items are added or removed. It would be great if we can define the animation in terms of delay and duration per item in this sort of scenario, rather than a total duration.

I've tried to do something similar on my own using the existing package but it isn't easy to implement without a lot of code. e.g. if items are added in lots of places (not all in the same part of the list), then it's quite hard to calculate the staggering, as the item builder only gives you the index of the item in the new version list, not the index of the item in the set of changed items.

I realise that this is basically a feature request, but I'm hoping it's far easier to implement in the package directly, than it is to hack to together using a combination of the index and didUpdateWidget (and basically calculate the diffs again).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions