flutter_swipe_detector 2.0.0 copy "flutter_swipe_detector: ^2.0.0" to clipboard
flutter_swipe_detector: ^2.0.0 copied to clipboard

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

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,
      ),
    ),
  ),
),
copied to clipboard
57
likes
140
points
4.4k
downloads

Publisher

verified publisherbaseflow.com

Weekly Downloads

2024.09.23 - 2025.04.07

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

Repository (GitHub)

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_swipe_detector