Skip to content

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

License

Notifications You must be signed in to change notification settings

jopmiddelkamp/flutter_swipe_detector

 
 

Repository files navigation

Flutter Swipe Detector

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

Usage

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 64.9%
  • HTML 30.2%
  • Swift 3.2%
  • Other 1.7%