FLUTTER ECOSYSTEM

Baseflow/flutter_swipe_detector

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

flutter_swipe_detector project cover
Stars
7
Forks
9
Last push (UTC)
May 10, 2023
Project status
Active
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.

LanguagesDartHTMLSwiftKotlinShellObjective-C

Packages published by this repository

Dependencies used

Dependency list 3 items
  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}
  • flutter_lintsDevelopment^1.0.0

Original README

English project snapshot. Visit GitHub for the latest content.

Expand / collapse project 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,
      ),
    ),
  ),
),