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

paperfold 封面
套件詳情v1.0.4

paperfold

此套件提供了一個小部件,可將紙張折疊效果應用於其子項。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
21
喜歡數
34
Pub 分數
150

安裝套件

flutter pub add paperfold

套件介紹

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

Paperfold 是一個 Flutter 套件,讓開發者能為任何 widget 子項應用真實的紙張摺疊效果。它透過平滑的動畫模擬摺紙的視覺外觀,藉由動態、觸覺互動提升使用者介面。非常適合用來創造互動式卡片、文件預覽或吸引人的 UI 轉場,可在 Android、iOS、Web、macOS、Windows 及 Linux 等所有主要平台運作。此套件輕量且可透過簡單的新增指令順暢整合至現有的 Flutter 項目。

適用情境

  • 互動式卡片動畫
  • 文件預覽介面
  • 動態 UI 過渡
  • 應用入門螢幕
  • 創意儀表板元件
  • 由手勢驅動的摺疊效果

主要特色

  • 真實的紙張摺疊動畫
  • 跨平台相容性
  • 透過 pub 的簡單整合
  • 可自訂摺疊角度
  • 所有裝置上的順暢效能
  • 支援巢狀組件

適合對象

  • 尋求視覺魅力的UI設計師
  • 開發互動式應用的開發者
  • 需要觸覺反饋的專案
  • 教育類或展示類應用
  • 具有文件或卡片版面的應用程式

使用建議

  • 可能影響低階裝置的效能
  • 僅限摺疊式轉換
  • 不適合複雜的3D場景
  • 需要仔細的佈局規劃
  • 動畫可能需要針對不同的螢幕尺寸進行調整
  • 建議謹慎使用,以避免視覺雜亂

原始 README

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

Paperfold

Pub Style Style Style


This package provides a widget which applies a paper fold effect on it's child. You can choose between horizontal and vertical fold direction. The number of strips has to be at least two.

preview

Getting started

Installation

Add paperfold as a dependency in your pubspec.yaml file. Or run pub add paperfold in your terminal.

Usage

Just add the widget to your tree and you're done :). Take a look at example to see more.

PaperFold(
  mainAxis: PaperFoldMainAxis.vertical,
  strips: 4,
  foldValue: .5,
  pixelRatio: 1,//works best if you query the device pixel ration with MediaQuery.of
  child: ClipRRect(
    borderRadius: BorderRadius.all(Radius.circular(20)),
    child: Container(
      color: Colors.green,
      height: 150,
      child: ListView.builder(
        itemCount: 30,
        itemBuilder: (context, index) {
          return Column(
            children: [
              Row(
                children: const [
                  Icon(
                    Icons.translate,
                    size: 50,
                  ),
                  Text("hello world, hello world")
                ],
              ),
            ],
          );
        },
      ),
    ),
  ),
);

Limitation

  • User interactions (gestures etc.) with child only possible in unfold state. (0 <= fold value < 1)
  • Child widgets can't be animated. This is also valid for videos. You can wrap it by the paperfold, but the content will not update in folded state.

Issues

Feel free to file any issues, bugs, or feature requests. All contributions are welcome :)

License

BSD-3-Clause

Special thx

Special thanks to GwaedGlas for reviewing and sparring this package

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。