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

套件詳情v0.1.1

ripple_effect

在您的 Flutter 應用中,輕鬆從任何組件開始,向整個螢幕產生漣漪效果。

近 30 天下載
10
喜歡數
34
Pub 分數
40

安裝套件

flutter pub add ripple_effect

套件介紹

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

ripple_effect 套件為 Flutter 應用程式中的任何元件提供了一種簡單的方式,可在整個螢幕上觸發漣漪動畫。它透過擴展的同心圓視覺回應點擊或手勢來增強使用者互動,模擬水面上自然的漣漪效果。適用於按鈕、圖示或觸控目標,無需複雜的自訂動畫即可添加細微反饋。該套件輕量且可順暢整合至現有 UI 中。支援 Android 與 iOS 平台,確保跨裝置行為一致。

適用情境

  • 向按鈕添加視覺反饋
  • 增強觸控互動
  • 建立吸引人的應用程式引導畫面
  • 提高手勢回應速度
  • 設計互動式UI元素
  • 遊戲中動畫點擊點

主要特色

  • 與任何 widget 的簡單整合
  • 全螢幕漣漪傳播
  • 可自定的漣漪顏色和大小
  • 具備效能優化的平滑動畫
  • 跨平台相容性
  • 最小化樣板程式碼

適合對象

  • 尋求快速視覺反饋的開發人員
  • UI設計師提升使用者體驗
  • 高觸控互動的應用
  • 遊戲或互動原型
  • 專案優先考慮流暢的動畫

使用建議

  • 可能影響低階裝置的效能
  • 波紋效果可能不適合注重可訪問性的應用程式
  • 除了顏色和大小之外,自訂選項有限
  • 不適合複雜的分層動畫
  • 需要仔細放置以避免視覺雜亂
  • 建議謹慎使用,以維持使用者體驗的清晰度

原始 README

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

Pub Package GitHub Actions

ripple_effect

A easy way to achieve a ripple effect on you flutter app.

Usage

First you need to wrap your page/Scaffold with the RipplePage widget, the ripple efect will growth until this widget. Then wrap with the RippleEffect where the animation should begin. When the animation should begin, call the RippleEffect.start method passing you callback method(often navigate to other page).

The RipplePage and RippleEffect widgets need their GlobalKeys respectively to work.

Example

class Stateless extends StatelessWidget {
  final pageKey = RipplePage.createGlobalKey();
  final effectKey = RippleEffect.createGlobalKey();
  
  @override
  Widget build(BuildContext context) {
    return RipplePage(
      child: Scaffold(
        body: Center(),
        floatingActionButton: RippleEffect(
          pageKey: pageKey,
          effectKey: effectKey,
          color: Colors.blue,
          child: FloatingActionButton(
            backgroundColor: Colors.blue,
            onPressed: () =>
                 RippleEffect.start(effectKey, () => toNextPage(context)),
            child: Icon(Icons.arrow_back),
          ),
        )
      ),
    );
  }
}

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。