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

show_up_animation 封面
插件详情v2.1.2

show_up_animation

一个用于简化“显示”动画实现的 Flutter 包

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1660
喜欢数
175
Pub 分数
160

安装插件

flutter pub add show_up_animation

插件介绍

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

一个Flutter包,旨在简化‘出现’动画的创建,使小部件能够以可自定义的时间和效果平滑地显示在屏幕上。它提供了简洁直观的API,用于将元素动画显示到视图中,非常适合增强具有动态内容的应用程序的用户体验。该包支持所有主要平台,包括移动、Web和桌面,确保在各种设备上行为一致。开发者可以轻松地为任何小部件应用进入动画,而无需编写复杂的动画逻辑。

适合场景

  • 引导屏幕
  • 加载内容过渡
  • 列表项揭示动画
  • 模态弹出入口
  • 动态 UI 更新

主要特点

  • 入门动画的简单 API
  • 可自定义的持续时间和延迟
  • 跨平台兼容性
  • 支持多种动画类型
  • 与现有控件的轻松集成

适合对象

  • 初学者 Flutter 开发者
  • 实施微交互的UI/UX设计师
  • 需要流畅视觉过渡的应用程序
  • 具有动态内容加载的项目
  • 通过动画提升用户参与度

使用建议

  • 如果过度使用,可能会影响性能
  • 除了基本动画外,自定义功能有限
  • 需要仔细把握时机,以避免突兀的效果
  • 不适合复杂的动画序列
  • 建议谨慎使用,以保持用户体验的清晰性

原始 README

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

show_up_animation Build Status

A flutter package to simplify the implementation of "show up" animation

Getting Started

Install dependencies

dependencies:
  show_up_animation: ^2.1.2

Then import wherever you want to implement the animation

import 'package:show_up_animation/show_up_animation.dart';
ShowUpAnimation

Wrap any widget you want to animate inside ShowUpAnimation widget and provide a Duration() to delayStart field to control after how much delay the animation fires.

ShowUpAnimation(
  delayStart: Duration(seconds: 1),
  animationDuration: Duration(seconds: 1),
  curve: Curves.bounceIn,
  direction: Direction.vertical,
  offset: 0.5,
  child: YourWidget(),
),
ShowUpList

To create a list of "show up" animations, use ShowUpList and provide your list of widgets to children parameter.

ShowUpList(
  direction: Direction.horizontal,
  animationDuration: Duration(milliseconds: 1500),
  delayBetween: Duration(milliseconds: 800),
  offset: -0.2,
  children: <Widget>[
    Widget1(),
    Widget2(),
    Widget3(),
    Widget4(),
  ],
),

Properties

ShowUpAnimation Properties

You can customize how to do you want to animate your child using the parameters described below.

Property Function
child The widget on which to apply the given ShowUpAnimation
offset The offset by which to slide and [child] into view from [Direction]. Use negative value to reverse animation [direction]. Defaults to 0.2
curve The curve used to animate the [child] into view. Defaults to [Curves.easeIn]
direction horizontal or vertical
delayStart The delay with which to animate the [child]. Takes in a [Duration] and defaults to 0 seconds
animationDuration The total duration in which the animation completes. Defaults to 800 milliseconds
ShowUpList Properties
Property Function
children The list of widgets on which to apply the given ShowUpAnimation
offset The offset by which to slide and [child] into view from [Direction]. Use negative value to reverse animation [direction]. Defaults to 0.2
curve The curve used to animate each [child] into view. Defaults to [Curves.easeIn]
direction horizontal or vertical
delayBetween he delay between animating each [children] into view. Takes in a [Duration] and defaults to 300 milliseconds
animationDuration The total duration in which the animation of each child completes. Defaults to 500 milliseconds

Demo

Text demo Show up list demo

所属分类

源码仓库

使用此插件的项目

暂无相关数据。