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

套件詳情v1.0.2

swipeable_card

為遊戲或互動式引導畫面添加可滑動的卡片式組件

近 30 天下載
41
喜歡數
57
Pub 分數
35

安裝套件

flutter pub add swipeable_card

套件介紹

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

swipeable_card 套件讓開發者能夠建立可左右滑動的互動式卡片組件,非常適合實作類似 Tinder 的介面。特別適用於遊戲、引導流程,或任何需要透過手勢在卡片間導航的 UI。此套件提供順暢的動畫與直覺的滑動手勢,設定簡單。支援自訂卡片內容與滑動動作,適用於各種情境。基於 Flutter 建構,能輕鬆整合至現有專案。

適用情境

  • 互動式入門畫面
  • Tinder風格的匹配介面
  • 遊戲卡牌機制
  • 基於滑動的導航
  • 使用者偏好收集
  • 動態內容探索

主要特色

  • 基於手勢的滑動互動
  • 流暢的動畫過渡
  • 可自定義的卡片內容
  • 與 Flutter 的簡單整合
  • 支援左右滑動操作
  • 輕量且高效

適合對象

  • 開發互動式 UI 的開發者
  • 入門畫面創建者
  • 遊戲開發者
  • 移動應用設計師
  • Flutter 初學者尋找簡單的手勢
  • 需要滑動操作的使用者輸入的應用程式

使用建議

  • 僅限水平滑動
  • 不支援垂直滑動的內建支援
  • 需要手動處理滑動結果
  • 未針對大型卡片清單進行優化
  • 可能需要額外的樣式來處理複雜的佈局
  • 依賴外部GitHub倉庫進行更新

原始 README

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

Swipeable Card (v1.x.x)

Add swipeable card-like widgets for games or interactive onboarding screens

Pub PRs Welcome lic BMAC

Contents

🎮 Examples

Demo
SwipeableWidget (meant for high performance devices, like iPhones)
Demo 1
SwipeableWidgetSlide (meant for lower performance devices, like older Android devices)
  • Demo of SwipeableWidgetSlide to be added

Check the repository if you're unable to see the demo.

App examples

Swipeable Widget is used in the following apps:

  • Shots
  • Create a PR to add your own!

📒 Documentation

Installation

Add swipeable_card to your pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter

  # added below
  swipeable_card: <latest version>
Adding to your app

The swipeable widget has to be placed in a Column (or Row), for example:

Column(
  children: <Widget>[
    SwipeableWidget(
      // parameters ...
      child: someChildWidget(),
    ),
  ],
)

In the above example, replace someChildWidget() with the widget that can be swiped (for example, a playing card-like widget).

Warning: while SwipeableWidget is fast on iPhones, it can be quite slow for older Android devices. I am currently working on SwipeableWidgetSlide, an alternative which can be used for older Android devices.

Check out https://swipeable-card.now.sh/ for the full documentation (still a work in progress).

😐 Issues and limitations

If you use the a swipeableWidgetController to automatically swipe the cards (without the user panning), you can only start swiping the next card away when the previous one is fully swiped away. To see a demo, run the example, and continuously tap the "Left" button at the bottom of the screen.

Apart from that, all the other problems from v0.0.x seem to be dealth with.

License

BSD 2-clause

📝 Other information

Project start date: 1 May, 2020.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。