easy_swipe_widget 0.0.1 copy "easy_swipe_widget: ^0.0.1" to clipboard
easy_swipe_widget: ^0.0.1 copied to clipboard

A customizable Flutter widget that allows users to swipe left or right with optional removal and smooth animations.

📦 EasySwipeWidget #

pub package GitHub stars License

A customizable Flutter widget that allows users to swipe left or right with optional removal and smooth animations.


🎬 Demo #

swipe_widget_demo

✨ Features #

✔️ Swipe left or right
✔️ Remove widget on swipe (optional)
✔️ Smooth scale animation (optional)
✔️ Customizable swipe threshold
✔️ Highly flexible & lightweight


🚀 Installation #

1️⃣ Add dependency

dependencies:
  easy_swipe_widget: ^0.0.1

2️⃣ Import package

import 'package:easy_swipe_widget/easy_swipe_widget.dart';

🎯 Usage Basic Example

EasySwipeWidget(
  removeAfterSwipe: false,
  enableScaleAnimation: true,
  onSwipe: (direction) {
    print("Swiped ${direction == SwipeDirection.left ? 'Left' : 'Right'}");
  },
  child: Container(
    padding: EdgeInsets.all(20),
    color: Colors.blue,
    child: Text(
      "Swipe me left or right!",
      style: TextStyle(color: Colors.white),
    ),
  ),
);

⚙️ Customization

Property Type Default Description
child Widget - The content inside the swipeable area.
onSwipe Function(SwipeDirection) null Callback when the widget is swiped.
removeAfterSwipe bool false Whether the widget should be removed after a successful swipe.
swipeThreshold double 0.3 Swipe threshold as a fraction of screen width.
enableScaleAnimation bool true Enables scale animation when dragging.
💡 Example App
A full working example is available in the example/ folder.

🛠️ Contributing If you find any issues or want to add new features, feel free to open an issue or submit a PR!

📜 License This project is licensed under the MIT License. See the LICENSE file for details.

1
likes
160
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable Flutter widget that allows users to swipe left or right with optional removal and smooth animations.

Repository (GitHub)
View/report issues

Topics

#swipe #gesture #animation #flutter

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on easy_swipe_widget