Back to Blog
Package2026.07.31· 4 min

swipe_reveal_card: Mail-style Actions Without Gesture Pain

A tiny Flutter package for horizontal swipe-to-reveal actions — typed API, group behavior, zero extra dependencies.

Flutterpub.devUI

Swipe-to-reveal actions show up in every mail and task UI. Building them from scratch means gesture arenas, programmatic open/close, and making sure only one row is open in a list. I packaged the pattern as swipe_reveal_card.

What it gives you

Swipe left to reveal Edit / Archive / Delete-style actions. There’s a SwipeRevealController for open/close/toggle, SwipeRevealGroup so only one card is open among peers, auto-close after action taps, and optional custom action widgets — with no third-party dependencies beyond Flutter.

Minimal usage

Install from pub.dev, then wrap a list tile:

SwipeRevealCard(
  group: group,
  closeOnAction: true,
  actions: [
    SwipeAction(label: 'Edit', icon: Icons.edit_outlined, onPressed: () {}),
    SwipeAction(label: 'Delete', icon: Icons.delete_outline, color: Colors.red, onPressed: () {}),
  ],
  child: const ListTile(
    title: Text('Ship checklist'),
    subtitle: Text('Docs, tests, and pub.dev dry-run'),
  ),
)

Why publish it

I kept hitting the same gesture edge cases across apps. Small packages with a typed API beat copying a half-working StatefulWidget between repos. The package is on pub.dev and GitHub if you want the same shortcut.