Skip to content
On this page

SwipeCardDeck

A stack of cards with swipe interactions.

SwipeCardDeck in FluttyUISwipeCardDeck in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

SwipeCardDeck

const SwipeCardDeck({
  super.key,
  required List<Widget> this._children,
  this.initialIndex = 0,
  this.onSwiped,
  this.onIndexChanged,
  this.onEnd,
  this.emptyBuilder,
  this.enabled = true,
  this.borderRadius,
  this.motion = const SwipeCardMotion(),
});
ParameterTypeRequiredDefault
keyKey?Nonull
initialIndexintNo0
onSwipedvoid Function(int index, SwipeCardDirection direction)?Nonull
onIndexChangedValueChanged<int>?Nonull
onEndVoidCallback?Nonull
emptyBuilderWidgetBuilder?Nonull
enabledboolNotrue
borderRadiusBorderRadiusGeometry?Nonull
motionSwipeCardMotionNoconst SwipeCardMotion()

SwipeCardDeck.builder

const SwipeCardDeck.builder({
  super.key,
  required int itemCount,
  required IndexedWidgetBuilder this._itemBuilder,
  this.initialIndex = 0,
  this.onSwiped,
  this.onIndexChanged,
  this.onEnd,
  this.emptyBuilder,
  this.enabled = true,
  this.borderRadius,
  this.motion = const SwipeCardMotion(),
});

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/collections/swipe_card_deck/swipe_card_deck.dart

This reference is generated from the SwipeCardDeck declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI