Search packages, repositories and app categories

Package detailsv2.0.0

flutter_swipe_detector

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

AndroidiOSWebmacOSWindowsLinux
30-day downloads
3.7K
Likes
61
Pub points
140

Install package

flutter pub add flutter_swipe_detector

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

flutter_swipe_detector is a Flutter package that detects swipe gestures in multiple directions—up, down, left, and right—providing customizable callbacks for each direction. It simplifies the implementation of swipe interactions in apps, making it ideal for features like image sliders, navigation panels, or interactive tutorials. The package supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux, ensuring consistent behavior across devices. With minimal setup, developers can integrate responsive swipe logic into their UIs.

Use cases

  • Image sliders
  • Navigation panels
  • Interactive onboarding
  • Gesture-based controls
  • Swipe-to-dismiss interfaces

Key features

  • Directional swipe detection
  • Customizable callbacks
  • Cross-platform support
  • Simple integration
  • Configurable sensitivity

Suitable for

  • Developers building gesture-driven UIs
  • Apps requiring swipe navigation
  • Interactive tutorial screens
  • Mobile and web applications with touch interactions

Considerations

  • May require tuning for sensitivity on different devices
  • Limited to basic swipe directions
  • Not suitable for complex multi-touch gestures

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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,
      ),
    ),
  ),
),

Categories

Source repository

Projects using this package