Skip to main content

animated_scroll_view 0.5.2 copy "animated_scroll_view: ^0.5.2" to clipboard
animated_scroll_view: ^0.5.2 copied to clipboard

Scrollable widgets, that helps you easily animate items removing, inserting, moving etc.

example/example.md

Take one of the widgets, provided by this package:

  • AnimatedListView
  • SliverAnimatedListView
  • AnimatedGridView
  • SliverAnimatedGridView
  • AnimatedPageView

Example:

AnimatedListView(
    eventController: eventController,
    // [itemsNotifier] is optional
    itemsNotifier: itemsNotifier,
    idMapper: (object) => object.id.toString(),
    items: items,
    itemBuilder: (item) {
        return ListTile(
            leading: SizedBox.square(
                dimension: 20,
                child: ColoredBox(color: item.color),
            ),
            title: Text('ItemId: ${item.id}'),
        );
    },
);

And then, using event controller, add some event:

eventController.add(
    MoveItemEvent.byId(
        itemId: itemId,
        newIndex: newIndex,
    ),
);

// Also, you can use the "short-cut" version:
eventController.moveById(
    itemId: itemId,
    newIndex: newIndex,
);

And the item will be moved with animation!

Also, there are InsertItemEvent and RemoveItemEvent provided by default.

In addition, you can implement your own event, with your logic.

9
likes
140
points
103
downloads

Documentation

API reference

Publisher

verified publisherrepur.dev

Weekly Downloads

Scrollable widgets, that helps you easily animate items removing, inserting, moving etc.

Repository (GitHub)

License

MIT (license)

Dependencies

collection, flutter, meta

More

Packages that depend on animated_scroll_view