swiping_card_deck
1.3.0, released 4 years ago by an unverified publisher
A Flutter widget that lets you swipe through a deck of cards with gestures or buttons.
What it does
SwipingCardDeck renders a stack of cards and allows the user to swipe left or right, triggering callbacks. It supports custom card widgets, swipe thresholds, animation duration, and optional drag disabling.
AI-written summary of version 1.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a Tinder‑style card stack for decision making or matching apps
- You want a lightweight, customizable swipe widget without external dependencies
Skip it when
- You need vertical swiping or complex gesture handling beyond left/right
- You require integration with state‑management libraries that expect a different API
Strengths
- Easy to integrate, no extra dependencies
- Optimized to render only the top two cards for performance
- Fully customizable callbacks and swipe parameters
- Supports both gesture and button‑based swiping
Weaknesses
- No vertical swiping support
- Limited to left/right only
- No built‑in state management or persistence
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
SwipingCardDeck(
cardDeck: [
Card(color: Colors.red, child: SizedBox(height: 300, width: 200)),
Card(color: Colors.green, child: SizedBox(height: 300, width: 200)),
],
onDeckEmpty: () => debugPrint("Card deck empty"),
onLeftSwipe: (card) => debugPrint("Swiped left!"),
onRightSwipe: (card) => debugPrint("Swiped right!"),
swipeThreshold: MediaQuery.of(context).size.width / 4,
minimumVelocity: 1000,
cardWidth: 200,
rotationFactor: 0.8 / 3.14,
swipeAnimationDuration: const Duration(milliseconds: 500),
disableDragging: false,
);Alternatives
Packages that do the same job and could replace swiping_card_deck.
- easy_container
A customizable container with built‑in gesture handling
62Compare - card_stack_swiper
A customizable card stack swiper widget with swipe gestures and programmatic control.
61Compare - appinio_swiper
A customizable Tinder‑style card swiper for Flutter
50Compare - rounded_loading_button_plus
Animated button with loading, success and error states for Flutter.
50Compare