radomir9720 / animated_scroll_view

Flutter package. Provides several scrollable widgets, that lets you easily animate its item list modifications(insert, remove, move, etc.)

Home Page:https://radomir9720.github.io/animated_scroll_view/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

style: very good analysis Powered by Mason License: MIT

Scrollable widgets, which lets you easily animate its items list modifications(insert, remove, move, etc.).

At the moment, this package provides ListView, GridView, and PageView implementations.

AnimatedListView / SliverAnimatedListView AnimatedGridView / SliverAnimatedGridView

Disclaimer

Be careful using this package in production because there are still many untested cases.

Examples(from live demo) can be found here. Real application examples can be found here and here

Mainly, developed as a replacement for out-of-the-box animated scrollables:

  • AnimatedList
  • SliverAnimatedList
  • AnimatedGrid (available from flutter version 3.7.0)
  • SliverAnimatedGrid (available from flutter version 3.7.0)

because of their numerous disadvantages:

  • Scroll offset jumps when an item is built atop(outside) of the current layout(Issue #74031):

  • Out-of-the-box animated scrollables have inconvinient API, developer is required to write a lot of code to make it work

  • There is a lot of cases when developer can forget/miss something to setup, and, as a result, lose a lot of time figuring out what's wrong(e.g. #63185)

  • AnimatedGrid and SliverAnimatedGrid are not available if you are using flutter version below 3.7.0

Also, AnimatedPageView widget can be useful for you, as it does not have an out of the box analogue:

There are already implementations-replacements for each of the out-of-the-box animated scrollables mentioned above:

  • AnimatedListView (replacement for AnimatedList)
  • SliverAnimatedListView (replacement for SliverAnimatedList)
  • AnimatedGridView (replacement for AnimatedGrid)
  • SliverAnimatedGridView (replacement for SliverAnimatedGrid)

Also, you can extend AnimatedScrollView, and create your own implementation, using the API of this package.

Installation πŸ’»

Add animated_scroll_view to your pubspec.yaml:

flutter pub add animated_scroll_view

or manually:

dependencies:
  animated_scroll_view: ^<latest version>

Install it:

flutter packages get

TODO:

Status Task Name
βœ… Simultaneously removing and inserting item when moving(#35618)
βœ… Write documentation
βœ… For GridView and PageView: animate items, rebuild of which is caused by another items modification event
βœ… Set default axis for SizeAndFadeTransition to axis of the scrollable(#100931)
⬜ Cover all code with tests
βœ… AnimatedPageView(#58959)?
βœ… Wrap ItemWidget in SizedAndFadeTransition and PointerIgnorer by default?
βœ… Widgetbook with live demo examples
⬜ Removing previous page of PageeView without index changing(#58959)?

About

Flutter package. Provides several scrollable widgets, that lets you easily animate its item list modifications(insert, remove, move, etc.)

https://radomir9720.github.io/animated_scroll_view/

License:MIT License


Languages

Language:Dart 83.0%Language:C++ 8.0%Language:CMake 7.1%Language:HTML 0.7%Language:C 0.5%Language:Swift 0.4%Language:Shell 0.1%Language:Kotlin 0.0%Language:Objective-C 0.0%