FLUTTER ECOSYSTEM

Baseflow/flutter_swipe_detector

一个用于检测滑动手势方向并提供回调以处理它们的 Flutter 包。

flutter_swipe_detector 项目封面
Stars
7
Forks
9
最近推送(UTC)
2023年5月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.

Netherlands官方网站 ↗
语言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,
      ),
    ),
  ),
),