搜尋套件、儲存庫與 APP 分類

animation_list 封面
套件詳情v3.1.0

animation_list

一個 Flutter 套件專案,包含一個簡單的動畫 ListView 小工具。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1220
喜歡數
76
Pub 分數
150

安裝套件

flutter pub add animation_list

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 套件,提供簡單的動畫 ListView 小工具,讓清單項目出現於螢幕上時能實現順暢的進入動畫。專為尋求在清單渲染過程中透過細微視覺反饋來提升使用者體驗的開發者設計。此套件支援 Android、iOS、Web、macOS、Windows 與 Linux 多個平台,適用於跨平台應用。可透過 pub add 命令輕鬆整合,並以效能與簡潔性為設計核心。

適用情境

  • 為動態列表添加入口動畫
  • 增強可捲動內容中的使用者介面參與度
  • 建立視覺上吸引人的引導畫面
  • 改進數據密集型介面中的使用者反饋

主要特色

  • 平滑的項目進入動畫
  • 跨平台相容性
  • 與 pub 的簡單整合
  • 輕量且高效
  • 可自訂的動畫時序
  • 支援標準 ListView 功能

適合對象

  • 尋求視覺精緻的UI設計師
  • 開發互動式清單的開發者
  • 需要吸引人的滾動效果的應用程式
  • 針對多個平台的專案

使用建議

  • 在非常大的清單上可能會影響效能
  • 超出基本動畫之外的自定義功能有限
  • 依賴 Flutter 的動畫框架
  • 不適合複雜的轉換邏輯

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Animation List

A simple animation listview widget.
When it is built, list item is shown by sliding and bouncing.

⚙ Preview


⚡ Installation

Add animation_list: ^3.1.0 to your pubspec.yaml dependecies. And import it:

import 'package:animation_list/animation_list.dart';

ℹ️ How to use

Simply add a Animation List widget with required params.

final List<Map<String, dynamic>> data = [
    {
      'title': '1111',
      'backgroundColor': Colors.grey,
    },
    {
      'title': '2222',
      'backgroundColor': Colors.red,
    },
    {
      'title': '3333',
      'backgroundColor': Colors.yellow,
    },
    {
      'title': '4444',
      'backgroundColor': Colors.blue,
    },
    {
      'title': '5555',
      'backgroundColor': Colors.green,
    },
    {
      'title': '6666',
      'backgroundColor': Colors.orange,
    },
    {
      'title': '7777',
      'backgroundColor': Colors.brown,
    },
    {
      'title': '8888',
      'backgroundColor': Colors.purple,
    },
  ];

  Widget _buildTile(String title, Color backgroundColor) {
    return Container(
        height: 100,
        margin: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
        decoration: BoxDecoration(
          borderRadius: BorderRadius.all(Radius.circular(25)),
          color: backgroundColor,
        ));
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: AnimationList(
            animationDirection: AnimationDirection.horizontal,
            duration: 1000,
            reBounceDepth: 10.0,
            children: data.map((item) {
              return _buildTile(item['title'], item['backgroundColor']);
            }).toList()),
      ),
    );
  }

🔧 Properties

Attribute Data type Description Default
key Key Controls how one widget replaces another widget in the tree -
controller ScrollController An object that can be used to control the position to which this scroll view is scrolled -
primary bool Whether this is the primary scroll view associated with the parent PrimaryScrollController -
physics ScrollPhysics How the scroll view should respond to user input -
shrinkWrap bool Whether the extent of the scroll view in the scrollDirection should be determined by the contents being viewed false
padding EdgeInsetsGeometry The amount of space by which to inset the children -
cacheExtent double The viewport has an area before and after the visible area to cache items that are about to become visible when the user scrolls -
children List The children are required to fill the ListView []
semanticChildCount int The number of children that will contribute semantic information -
dragStartBehavior DragStartBehavior Determines the way that drag start behavior is handled DragStartBehavior.start
keyboardDismissBehavior Key ScrollViewKeyboardDismissBehavior the defines how this ScrollView will dismiss the keyboard automatically ScrollViewKeyboardDismissBehavior.manual
restorationId String Restoration ID to save and restore the scroll offset of the scrollable -
clipBehavior Clip The content will be clipped (or not) according to this option Clip.hardEdge
duration int The milliseconds the animation runs 1300
reBounceDepth double A value of bounce depth 10.0
opacityRange Tween A Tween value of opacity animation range Tween(begin: 0.3, end: 1.0)
animationDirection AnimationDirection A animation direction(vertical / horizontal / both) AnimationDirection.vertical

🤗 Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request if you have a way to improve this project.

Make sure your request is meaningful and you have tested the app locally before submitting a pull request.

🙋‍♂️ Support

💙 If you like this project, give it a ⭐ and share it with friends!

buymeacoffee-violet-badge

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。