搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。