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

circular_clip_route 封面
套件詳情v0.2.0+3

circular_clip_route

一個頁面路由,透過從錨點組件展開圓形裁剪來顯示其頁面。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
20
喜歡數
131
Pub 分數
160

安裝套件

flutter pub add circular_clip_route

套件介紹

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

CircularClipRoute 是一個 Flutter 套件,透過從指定的錨點元件開始擴展圓形裁剪來揭示新螢幕,進而實現流暢、動畫化的頁面轉換。這會產生類似於波紋或縮放動畫的視覺效果,提升導航中的使用者體驗。它非常適合那些希望透過微妙且動態的轉換來改善介面流程與視覺吸引力的應用程式。此路由可在所有主要平台(包括 Android、iOS、Web、macOS、Windows 和 Linux)上運作,確保行為一致。它使用 Dart 編寫,可輕鬆整合至現有的 Flutter 專案中。

適用情境

  • 動畫引導螢幕
  • 頁面間的互動式導航
  • 狀態更改期間的視覺反饋
  • 提升應用啟動體驗
  • 建立吸引人的啟動畫面

主要特色

  • 圓形展開動畫
  • 可自訂的錨點組件
  • 跨平台相容性
  • 平滑的過渡效果
  • 與 Navigator 的輕鬆整合

適合對象

  • 尋求引人入勝的過渡效果的應用開發者
  • 專注於微互動的設計師
  • 具有互動式 UI 元素的專案
  • 行動與Web應用程式
  • 強調視覺敘事的應用

使用建議

  • 可能影響低階裝置的效能
  • 需要仔細放置錨點組件
  • 不適合簡單、快速的導航
  • 超出基本參數的自定義功能有限
  • 建議節制使用,以免造成分心

原始 README

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

pub.dev package page GitHub Stars

A page route, which reveals its page by expanding a circular clip from an anchor widget.


If you're looking for a database solution, check out cbl, another project of mine. It brings Couchbase Lite to standalone Dart and Flutter, with support for:

  • Full-Text Search,
  • Expressive Queries,
  • Data Sync,
  • Change Notifications

and more.


Getting started

To use the CircularClipRoute, provide it the context from which the animation should expand and push it onto the navigation stack. One way to get the right context is to use a Builder, which wraps the widget from which the route should expand:

final navigationTrigger = Builder(
    builder: (context) {
      return IconButton(
          icon: Icon(Icons.favorite),
          onPressed: () {
            Navigator.push(context, CircularClipRoute<void>(
              // This context will be used to determine the location and size of
              // the expanding clip. Here this will resolve to the `IconButton`.
              expandFrom: context,
              builder: (_) => MyRoute(),
            ));
          }
      );
    }
);

Also, take a look at the API docs for customizing the animation.

Example

The example implements the demo at the top.

References

Inspired by this shot.

This drawing visualizes the geometry involved in creating the route transition:

Illustration of the geometry of the transition

The Anchored Custom Routes article explains how to implement routes, that are anchored to a widget, generally.


Gabriel Terwesten • GitHub @blaugold • Twitter @GTerwesten • Medium @gabriel.terwesten

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。