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

套件詳情v0.0.2

animated_path

一個用於建立裁剪路徑動畫的 Flutter 套件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
358
喜歡數
108
Pub 分數
160

安裝套件

flutter pub add animated_path

套件介紹

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

AnimatedPath 是一個專為 Flutter 設計的套件,旨在創造流暢的裁剪路徑動畫,讓開發者能夠逐步動畫化路徑的繪製。它非常適合用於線條繪製、載入指示器或自訂形狀揭露等視覺效果。該套件支援所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。透過單一指令即可輕鬆整合,僅需少量程式碼即可為 UI 增添動態且吸引人的動畫。它利用 Flutter 的渲染引擎實現高效率與流暢的運動。

適用情境

  • 創建動畫線條圖
  • 設計加載指示器
  • 構建互動式形狀揭示
  • 增強UI轉換效果
  • 可視化資料流
  • 動畫自定義SVG路徑

主要特色

  • 平滑裁剪路徑動畫
  • 跨平台支援
  • 簡單的 API 結合
  • 高效能渲染
  • 支援複雜的路徑幾何形狀
  • 可自訂的動畫持續時間和曲線

適合對象

  • 尋求動態視覺效果的UI/UX設計師
  • 開發互動式儀表板的開發者
  • 需要動畫插圖的應用
  • 帶有逐步圖解的教育類應用
  • 具有動畫路徑元素的遊戲

使用建議

  • 僅限基於路徑的動畫
  • 需要理解 Path 類
  • 可能影響非常複雜路徑的效能
  • 不適用於非路徑視覺效果
  • 動畫控制需要仔細的定時設定

原始 README

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

Animated Path

A Flutter package that is used to create trim path animation on given path.

Features

  • start point tween
  • end point tween
  • offset tween
  • Support non-continuous path

Showcase

Usage

  • AnimatedPath widget is used to animated path for given animation.
AnimatedPath(
    animation: animationController.view,
    path: Path()
    ..moveTo(100, 100)
    ..relativeLineTo(400, 0)
    ..relativeLineTo(0, 400)
    ..relativeLineTo(-400, 0)
    ..relativeLineTo(0, -400),
    paint: paint,
    start: Tween(begin: 0.0, end: 0.7),
    end: Tween(begin: 0.0, end: 1.0),
    offset: Tween(begin: 0.0, end: 0.3),
)
  • Provide initial and final value of start, end or offset for the path.

For e.g.

Tween(begin: 0.0, end: 1.0)

This will put the start of the path at (0.0 * pathLength) (initially) and at (1.0 * pathLength) when animation finishes path for values between 0 and 1 (inclusive) will be visible only However, one can provide values < 0 or > 1 for different animation sync effects.

Similarly, for end and offset.

  • Values for end is calculated based on tween provided should always be greater than start at any point of time, or path will not be visible.

  • offset value for given animation is added in both start and end valued for path.

  • For a constant value use ConstantTween.

  • Works for continuous and non-continuous path both.

Contributing

1. Fork it (<https://github.com/himanshugarg08/animated_path/fork>)
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。