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

插件详情v0.0.2

animation_kit

一个 Flutter 包,提供一系列动画和实用工具,以增强应用程序的用户体验。

AndroidiOSLinuxmacOSWebWindows
近 30 天下载
3.7万
喜欢数
3
Pub 分数
150

安装插件

flutter pub add animation_kit

插件介绍

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

Animation Kit 是一个 Flutter 包,提供了一系列精心挑选的动画和实用工具,旨在提升移动和 Web 应用的用户体验。它提供了即用型的动画组件、缓动函数和过渡辅助工具,使开发者无需从头编写复杂的代码即可实现流畅且引人入胜的交互效果。该包支持 Android、iOS、Web 和桌面环境等多种平台,适用于跨平台项目。凭借直观的 API 和详尽的文档示例,它简化了将专业级动画集成到应用中的过程。

适合场景

  • 增强UI过渡效果
  • 添加微交互
  • 创建加载指示器
  • 改进入门体验
  • 动画列表项
  • 构建交互式按钮

主要特点

  • 预构建的动画组件
  • 可自定义的缓动曲线
  • 跨平台支持
  • 简单的 API 集成
  • 轻量级且模块化的设计
  • 响应式动画处理

适合对象

  • 寻求快速动画的UI/UX设计师
  • 开发交互式应用的开发者
  • 专注于打造精致用户体验的团队
  • Flutter 初学者探索动画
  • 需要一致视觉反馈的项目

使用建议

  • 可能需要额外的样式设置以支持自定义主题
  • 有限的高级动画控制
  • 最适合中等复杂度的动画
  • 不太适合高度定制化或独特的动画逻辑
  • 依赖于 Flutter 的渲染管道

原始 README

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

Animation Kit

A Flutter package providing a collection of utilities and widgets for creating advanced animations with ease.

Features

  • Customizable animation builders.
  • Repeated animations with various modes (e.g., repeat, reverse, ping-pong).
  • Implicit animations for smooth transitions.
  • Crossfade transitions between widgets.
  • Interval-based animation curves.
  • Utility functions for interpolating values like colors, offsets, and sizes.

Installation

Add the following to your pubspec.yaml:

dependencies:
  animation_kit: ^1.0.0

Then run:

flutter pub get

Usage

Repeated Animation
import 'package:animation_kit/animation_kit.dart';

RepeatedAnimationBuilder<double>(
  start: 0.0,
  end: 1.0,
  duration: Duration(seconds: 2),
  mode: RepeatMode.pingPong,
  builder: (context, value, child) {
    return Opacity(
      opacity: value,
      child: child,
    );
  },
  child: Text('Ping-Pong Animation'),
);
Crossfade Transition
import 'package:animation_kit/animation_kit.dart';

CrossFadedTransition(
  child: Text('New Widget'),
  duration: Duration(milliseconds: 500),
);
Custom Curve
import 'package:animation_kit/animation_kit.dart';

AnimationController controller = AnimationController(
  duration: const Duration(seconds: 2),
  vsync: this,
);

Animation<double> animation = CurvedAnimation(
  parent: controller,
  curve: IntervalDuration(
    start: Duration(milliseconds: 500),
    end: Duration(seconds: 1),
    duration: Duration(seconds: 2),
  ),
);
Implicit Animation
import 'package:animation_kit/animation_kit.dart';

AnimatedValueBuilder<double>(
  value: 1.0,
  duration: Duration(seconds: 1),
  builder: (context, value, child) {
    return Transform.scale(
      scale: value,
      child: child,
    );
  },
  child: Icon(Icons.star, size: 50),
);

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Commit your changes with clear messages.
  4. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。

所在榜单