swipe_effect 1.0.2 copy "swipe_effect: ^1.0.2" to clipboard
swipe_effect: ^1.0.2 copied to clipboard

A simple widget helps with adding an effect to your swipe actions. You can use it by wrapping your widget with SwipeEffect and listen to the swipes.

🪄 Swipe effect #

A simple widget helps with adding an effect to your swipe actions.
You can use it by wrapping your widget with SwipeEffect and listen to the swipes.

✨ Usage #

SwipeEffect(
      direction: TextDirection.rtl, 
      color: Colors.green.withAlpha(70),
      verticalTolerance: 1.0,
      startDeltaPx: 30,
      callbackDeltaRatio: 0.25,
      callback: () {
        // Navigator.pop(context);
      },
      child: ...,
    );

🔮 Showcase #

image

⚙️ Parameters #

Parameter Description
child* Your child widget.
callback* A call back will be triggered after the swipe action.
color Color of the effect curve.
direction direction of the swipe TextDirection.ltr orTextDirection.rtl
verticalTolerance Double value determines a ratio from the screen height that after swiping in vertical axis the effect will be dismissed.
callbackDeltaRatio Double value determines a ratio from the screen width to trigger the callback after reaching it.
startDeltaPx Determines where to start the effect from the beginning of the widget (in pixel)

💻 Authors #

15
likes
160
points
45
downloads

Publisher

unverified uploader

Weekly Downloads

A simple widget helps with adding an effect to your swipe actions. You can use it by wrapping your widget with SwipeEffect and listen to the swipes.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on swipe_effect