搜索插件、代码仓与 APP 分类

shaky_animated_listview 封面
插件详情v0.0.5

shaky_animated_listview

列出动画以跟踪屏幕上的滚动变化,或在列表首次出现时对列表项进行动画处理,使用不同的过渡规则。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
98
喜欢数
73
Pub 分数
140

安装插件

flutter pub add shaky_animated_listview

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

ShakyAnimatedListView 是一个 Flutter 包,可为动态列表项提供动画效果,以视觉方式跟踪滚动变化或列表项的初始出现。通过在项目进入视口或滚动过程中应用可自定义的过渡效果,它提升了用户体验。适用于创建具有流畅入场和移动动画的引人入胜、响应迅速的列表,支持 Android、iOS、Web、macOS、Windows 和 Linux 等多个平台。该包轻量且可无缝集成到现有的 Flutter 项目中。

适合场景

  • 增强列表项进入动画
  • 滚动时的视觉反馈
  • 使用动态过渡创建交互式 UI
  • 改进可滚动列表中的用户参与度
  • 在多平台应用中动画列表

主要特点

  • 可自定义的过渡规则
  • 列表项的平滑进入动画
  • 滚动感知动画跟踪
  • 支持所有主要的 Flutter 平台
  • 轻量且易于集成

适合对象

  • 开发交互式列表的开发者
  • 寻求视觉精致的UI设计师
  • 需要动画列表项的应用程序
  • 跨平台 Flutter 应用
  • 专注于用户体验提升的项目

使用建议

  • 在非常大的列表上可能会影响性能
  • 需要仔细调整动画参数
  • 可用文档有限
  • 最适合中等大小的列表
  • 不适合静态或简单的列表

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Shaky_animated_list

pub

Shaky_animated_list can be used for three main things:

  1. Animate List view scroll.
  2. Animate grid view first view.
  3. Animate grid view scroll.

1. Library over view

All these animations track your scroll changes on screen or your list first attachment to animated your list items with different transition rules.

Shaking Grid Scroll list Scroll Grid
shaking_grid scroll_list scroll_grid

You can define these animation directions Axis by channing your list ScrollDirection.

Shaking Grid

Shaking grid can be simply implemented by wrapping your grid child by GridAnimatorWidget and that's it we will take it from here ^^

for example you can simply do this to show shaking grey color cards

    GridView.count(
    crossAxisCount: 3,
    // shrinkWrap: true,
    children: List.generate(9, (i) => GridAnimatorWidget(
        child: Padding(
        padding: const EdgeInsets.all(4),
            child: ClipRRect(
            borderRadius: const BorderRadius.all(Radius.circular(10)),
                child: Container(
                color: Colors.grey,
                ),
        ),
    ),
    ),).toList()
    )

shaking_grid

ListView Scroll animations

ListView Scroll animations will enable your to implement the scroll animations with full control on animations space and duration please don't add vertical margins to your elements, you can use the spaceBetween to give a space between elements and extendedSpaceBetween to control the scroll animations space. Also you can use duration to control the reverse animations duration based on your needs

for example you can simply do this to show ListView vertical Scroll animations

    AnimatedListView(
    duration: 100,
    extendedSpaceBetween: 30,
    spaceBetween:10,
    children: List.generate(
    21,
    (index) => Card(
    elevation: 50,
    margin: const EdgeInsets.symmetric(horizontal: 20),
    shadowColor: Colors.black,
    color: Colors.grey,
        child: SizedBox(
        height: 300,
            child: Padding(
            padding: const EdgeInsets.all(20.0),
            child: Column(
                children: [
                    CircleAvatar(
                    backgroundColor: Colors.blue[500],
                    radius: 60,
                    child: const CircleAvatar(
                        backgroundImage: NetworkImage(
                        "https://avatars.githubusercontent.com/u/30810111?v=4"),
                        //NetworkImage
                        radius: 50,
                        ),
                    ),
                    const SizedBox(
                    height: 10,
                    ),
                    Text(
                    'Scroll to start',
                        style: TextStyle(
                        fontSize: 30,
                        color: Colors.blue[900],
                        fontWeight: FontWeight.w500,
                        ),
                    ),
                    const SizedBox(
                    height: 10,
                    ),
                    const Text(
                    'Animated list demo',
                        style: TextStyle(
                        fontSize: 15,
                        color: Colors.white,
                        ),
                    ),
                    const SizedBox(
                    height: 10,
                    ),
                ],
            ),
            ),
        ),
    )
))

scroll_list

Grid Scroll animations

Grid Scroll animations will enable your to implement the scroll animations on a grid view, one little change here is that we will implement the delegate, this is a design issue that we run into so you will have to to specify your crossAxisCount, crossAxisSpacing, mainAxisSpacing, and duration and we will take it from here,you can use any other default supported parameters in GridView.

for example you can simply do this to show Grid vertical Scroll animations

    AnimatedGridView(
          duration: 100,
          crossAxisCount: 2,
          mainAxisExtent: 256,
          crossAxisSpacing: 8,
          mainAxisSpacing: 8,
          children: List.generate(
              21,
              (index) => Card(
                    elevation: 50,
                    shadowColor: Colors.black,
                    color: Colors.grey[700],
                    child: SizedBox(
                      width: double.infinity,
                      child: Padding(
                        padding: const EdgeInsets.all(20.0),
                        child: Column(
                          children: const [
                            CircleAvatar(
                              backgroundColor: Colors.black,
                              radius: 60,
                              child: CircleAvatar(
                                backgroundImage: NetworkImage(
                                    "https://avatars.githubusercontent.com/u/30810111?v=4"),
                                //NetworkImage
                                radius: 50,
                              ),
                            ),
                          ],
                        ),
                      ),
                    ),
                  )
             )
       ),

scroll_grid

ListView horizontal Scroll animations

if you want to add a horizontal animations, all what you have to do is to add a scroll direction to the widget and that's it for example you can simply do this to show ListView horizontal Scroll animations

  AnimatedListView(
        duration: 100,
        scrollDirection: Axis.horizontal,
        children: List.generate(
        21,
            (index) => const Card(
            elevation: 50,
            margin: EdgeInsets.symmetric(horizontal: 10),
            shadowColor: Colors.black,
            color: Colors.grey,
                child: SizedBox(
                height: 300,
                width: 200,
                ),
            ),
        ),
  ),

horz_list

Sample source code

Example for all cases

Contribute

Let's develop with collaborations. We would love to have contributions by raising issues and opening PRs. Filing an issue before PR is must.

License

Project is published under the Apache 2.0 license. Feel free to clone and modify repo as you want, but don't forget to add reference to authors :)

所属分类

源码仓库

使用此插件的项目

暂无相关数据。