Skip to content
pubscout

swipe_to

1.0.6, released 3 years ago by an unverified publisher

A Flutter wrapper widget to add horizontal swipe callbacks for chat views.

WASM-ready
$ flutter pub add swipe_to
Source repository

What it does

SwipeTo is a widget wrapper that detects horizontal left and right swipes on its child component. It animates the child widget and triggers callbacks upon completing the swipe, displaying icons or custom widgets beneath the child during the gesture.

AI-written summary of version 1.0.6, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a chat application and need message reply actions on swipe.
  • You want to add horizontal swipe-to-action behaviors to list items.

Skip it when

  • You need complex multi-stage swipe actions like native email list tile dismissals with multiple revealed buttons.

Strengths

  • Supports both left and right directional swipes simultaneously.
  • Customizable icons, custom background widgets, sensitivity, and animation duration.

Weaknesses

  • Requires manual UniqueKey configuration when used inside a ListView to avoid state bugs.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
SwipeTo(
  child: Container(
    padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 8.0),
    child: Text('Swipe me right 👉🏿'),
  ),
  onRightSwipe: (details) {
    print('Callback from Swipe To Right');
  },
)

Alternatives

Packages that do the same job and could replace swipe_to.