搜索插件、代码仓与 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.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。