Search packages, repositories and app categories

swipeable_card_stack cover
Package detailsv0.0.5

swipeable_card_stack

This is Tinder like swipeable cards package. You can add your own widgets to the stack, receive all four events, left, right, up and down. You can define your own business logic for each direction.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
216
Likes
106
Pub points
115

Install package

flutter pub add swipeable_card_stack

Package Overview

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

A Flutter package that enables Tinder-like swipeable card stacks, allowing developers to customize cards with their own widgets. It supports four swipe directions—left, right, up, and down—and provides event callbacks for each, enabling custom business logic per direction. Ideal for apps requiring interactive card-based navigation, such as dating apps or content discovery interfaces. The package is cross-platform, working on Android, iOS, Web, macOS, Windows, and Linux.

Use cases

  • Dating app interfaces
  • Content discovery features
  • Interactive product showcases
  • User preference collection
  • Gamified user interactions
  • Swipe-based navigation

Key features

  • Customizable card widgets
  • Four-direction swipe events
  • Extensible business logic per swipe
  • Cross-platform support
  • Smooth animation transitions
  • Easy integration via pub.dev

Suitable for

  • Developers building Tinder-style apps
  • Designers needing interactive card UIs
  • Projects requiring gesture-driven user flows
  • Mobile and web applications with swipe interactions
  • Prototyping interactive card experiences

Considerations

  • Requires handling of state management for swipe logic
  • May need additional styling for complex card designs
  • Performance impact with large card stacks
  • Limited built-in customization beyond swipe directions
  • Depends on external animation libraries for advanced effects

Original README

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

swipeable_card_stack

This is Tinder like swipeable cards package. You can add your own widgets to the stack, receive all four events, left, right, up and down. You can define your own business logic for each direction.

Demo

Documentation

Installation

Add swipeable_card_stack to your pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter

  # added below
  swipeable_card_stack: <latest version>
Adding to app

Use the SwipeableCardsSection widget provided by the package

@override
  Widget build(BuildContext context) {
    //create a SwipeableCardSectionController
    SwipeableCardSectionController _cardController = SwipeableCardSectionController();

    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          SwipeableCardsSection(
            cardController: _cardController,
            context: context,
            //add the first 3 cards (widgets)
            items: [
              CardView(text: "First card"),
              CardView(text: "Second card"),
              CardView(text: "Third card"),
            ],
            //Get card swipe event callbacks
            onCardSwiped: (dir, index, widget) {
              //Add the next card using _cardController
              _cardController.addItem(CardView(text: "Next card"));
              
              //Take action on the swiped widget based on the direction of swipe
              //Return false to not animate cards
            },
            //
            enableSwipeUp: true,
            enableSwipeDown: false,
          ),
          //other children
        )
    }
          
Author

CodeToArt Technology

Categories

Source repository

Projects using this package