FLUTTER ECOSYSTEM

Baseflow/flutter_swipe_detector

スワイプの方向を検出し、それらを処理するためのコールバックを提供するFlutterパッケージです。

flutter_swipe_detector のプロジェクト画像
Stars
7
Forks
9
最終プッシュ(UTC)
2023/05/10
プロジェクト状態
公開中
Baseflow GitHub avatar
GITHUB Organization

Baseflow ↗

Engineering the Future of Software development. Together with exceptional people, strategy, and design, we create software for every challenge.

言語DartHTMLSwiftKotlinShellObjective-C

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 3 件
  • flutter{"sdk":"flutter"}
  • flutter_test開発用{"sdk":"flutter"}
  • flutter_lints開発用^1.0.0

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

Flutter Swipe Detector

Author: Jop Middelkamp

A package to detect your swipe directions and provides you with callbacks to handle them.

Usage

SwipeDetector(
  onSwipe: (direction, offset) {
    _addSwipe(direction);
  },
  onSwipeUp: (offset) {
    _addSwipe(SwipeDirection.up);
  },
  onSwipeDown: (offset) {
    _addSwipe(SwipeDirection.down);
  },
  onSwipeLeft: (offset) {
    _addSwipe(SwipeDirection.left);
  },
  onSwipeRight: (offset) {
    _addSwipe(SwipeDirection.right);
  },
  child: const Container(
    padding: EdgeInsets.all(16),
    child: Text(
      'Swipe me!',
      style: TextStyle(
        fontWeight: FontWeight.bold,
      ),
    ),
  ),
),