パッケージ、リポジトリ、アプリカテゴリを検索

swipeable_card_stack のカバー
パッケージ詳細v0.0.5

swipeable_card_stack

これはTinderのようなスワイプ可能なカードパッケージです。スタックに独自のウィジェットを追加でき、左右上下の4つのイベントを受け取ることができます。各方向に対して独自のビジネスロジックを定義できます。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
216
いいね数
106
Pub ポイント
115

パッケージをインストール

flutter pub add swipeable_card_stack

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Tinder風のスワイプ可能なカードスタックを可能にするFlutterパッケージで、開発者が独自のウィジェットでカードをカスタマイズできます。左、右、上、下の4方向のスワイプをサポートし、各方向に対してイベントコールバックを提供しており、それぞれの方向にカスタムビジネスロジックを実装できます。デートアプリやコンテンツ発見インターフェースなど、インタラクティブなカードベースのナビゲーションが必要なアプリに最適です。クロスプラットフォーム対応で、Android、iOS、Web、macOS、Windows、Linuxで動作します。

用途

  • デートアプリのインターフェース
  • コンテンツ発見機能
  • インタラクティブ製品ショーケース
  • ユーザーの好み収集
  • ゲーム化されたユーザーインタラクション
  • スワイプベースのナビゲーション

主な機能

  • カスタマイズ可能なカードウィジェット
  • 4方向スワイプイベント
  • スワイプごとの拡張可能なビジネスロジック
  • クロスプラットフォーム対応
  • スムーズなアニメーションの遷移
  • pub.dev を通じた簡単な統合

適している対象

  • Tinder風のアプリを開発する開発者
  • インタラクティブなカードUIを必要とするデザイナー
  • ジェスチャー駆動型のユーザー・フローを必要とするプロジェクト
  • スワイプ操作付きのモバイルおよびウェブアプリケーション
  • インタラクティブカード体験のプロトタイピング

注意事項

  • スワイプロジックの状態管理が必要です
  • 複雑なカードデザインには追加のスタイリングが必要になる場合があります
  • 大規模なカードスタックによるパフォーマンスへの影響
  • スワイプの方向以外の組み込みカスタマイズは限定的
  • 高度な効果には外部アニメーションライブラリに依存しています

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

swipeable_card_stack

This is Tinder like swipeable cards package. You can add your own widgets to the stack, receive all four events, left, right, up and down. You can define your own business logic for each direction.

Demo

Documentation

Installation

Add swipeable_card_stack to your pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter

  # added below
  swipeable_card_stack: <latest version>
Adding to app

Use the SwipeableCardsSection widget provided by the package

@override
  Widget build(BuildContext context) {
    //create a SwipeableCardSectionController
    SwipeableCardSectionController _cardController = SwipeableCardSectionController();

    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          SwipeableCardsSection(
            cardController: _cardController,
            context: context,
            //add the first 3 cards (widgets)
            items: [
              CardView(text: "First card"),
              CardView(text: "Second card"),
              CardView(text: "Third card"),
            ],
            //Get card swipe event callbacks
            onCardSwiped: (dir, index, widget) {
              //Add the next card using _cardController
              _cardController.addItem(CardView(text: "Next card"));
              
              //Take action on the swiped widget based on the direction of swipe
              //Return false to not animate cards
            },
            //
            enableSwipeUp: true,
            enableSwipeDown: false,
          ),
          //other children
        )
    }
          
Author

CodeToArt Technology

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト