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

entry 封面
插件详情v1.0.3

entry

让您的小部件生动起来——Entry 让您轻松地将小部件动画化为可见状态。一个组件即可实现不透明度、缩放、位置和角度的动画。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
2490
喜欢数
315
Pub 分数
160

安装插件

flutter pub add entry

插件介绍

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

Entry 是一个 Flutter 包,通过启用不透明度、缩放、位置和旋转的平滑过渡,简化了小部件动画。仅使用一个组件,开发者即可用最少的代码将元素动画显示出来,非常适合创建引人入胜的用户界面。它支持所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux,确保在各种设备上行为一致。该包轻量且易于集成,专注于常见动画需求的直观语法。

适合场景

  • 引导屏幕
  • 加载指示器
  • 动态列表项揭示
  • 模态弹窗
  • 页面过渡
  • 交互元素高亮

主要特点

  • 单个控件动画控制
  • 支持不透明度、缩放、位置和旋转
  • 跨平台兼容性
  • 最小设置
  • 平滑默认缓动
  • 可自定义的持续时间和延迟

适合对象

  • 初学者 Flutter 开发者
  • 寻求快速动画的UI/UX设计师
  • 包含交互式或动态内容的应用程序
  • 快速原型设计用户界面更改
  • 需要微妙进入效果的项目

使用建议

  • 仅限基本变换和不透明度动画
  • 不适合复杂的编排序列
  • 可能需要额外的状态管理来应对高级用例
  • 大量同时动画带来的性能影响

原始 README

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

entry

Entry

Pub Package Platform

CodeFactor CodeFactor


This Flutter package introduces a new widget : Entry.

It lets you simply animate a widget into a visible state.

  • Don't just display widgets : make them appear (and disappear).
  • Lightweight and flexible : one widget is all you need.
  • Wrap a widget with an Entry.all and watch it come to life.

Entry animates opacity, scale, position and angle concurrently.

You can visualize the Curves constants on its documentation page.

🏭 Constructors

Default

Entry({key, delay, duration, curve, visible, opacity, scale, xOffset, yOffset, angle, child})

This constructor is motionless by default.

It includes every parameter available in named constructors.

Named

Entry has four named constructors :

  1. Entry.all({visible, opacity, scale, xOffset, yOffset, angle})

.all makes use of every animation by default, except for angle and xOffset.

The three others are each dedicated to a single animation :

  1. Entry.opacity({opacity})
  2. Entry.scale({scale})
  3. Entry.offset({xOffset, yOffset})

The key, delay, duration, curve, visible and child parameters are omitted here.

💕 Combining entries

Wrapping an Entry with another one works just as you expect it.

By playing with all the parameters, possibilities are endless.

You can copy one of the examples and start from there.

See in action

entry

👷 Grid builders

Fixed crossed-axis count

Using Entry with grid builders can create a staggered effect :

  • Wrap the generated child with an Entry widget
  • Multiply the delay value by the index % crossAxisCount

In result, the widgets of a same row will appear after each other.

See in action

entry

Randomization

You can set your delay and/or duration to a random number :

delay: Duration(milliseconds: random.nextInt(300))

This makes the entries look more independent from each other.

See in action

entry

✊ Motivation

  • Animations are key to elevate and refine the user experience.
  • By default, all widgets appear instantly. It feels basic, almost webpage-like.
  • Flutter doesn't provide a simple way to delay and animate a widget's entry into view.
  • Animations overall implies a lot of complexity and boilerplate code.
  • I got tired of copying the same file over multiple projects.

🙏 Credit

A special thank you to Felix Blaschke for his simple_animations package. This package literally depends on it.

所属分类

依赖

依赖清单 2 项

源码仓库

使用此插件的项目

暂无相关数据。