swipe_callback 1.0.0+1 copy "swipe_callback: ^1.0.0+1" to clipboard
swipe_callback: ^1.0.0+1 copied to clipboard

A simple flutter package to add swipe to reply functionality similar to that of Whatsapp.

swipe_callback #

A simple flutter package to add swipe to reply functionality similar to that of Whatsapp.

Swipe Callback plugin animated image

Features #

Use this plugin in your Flutter app to:

  • Allow performing action based on user swipe action.

Example #

SwipeCallback(
  swipeDirection: swipeDirection,
  onSwipeSuccess: () {
    showSnackBar("Swipe success triggered");
  },
  threshold: 150,
  child: SizedBox(
    width: double.infinity,
    child: FractionallySizedBox(
      widthFactor: 0.8,
      alignment: Alignment.centerLeft,
      child: DecoratedBox(
        decoration: BoxDecoration(
          color: Colors.blue,
          borderRadius: BorderRadius.circular(12),
        ),
        child: Padding(
          padding: const EdgeInsets.all(8.0),
          child: Text(sampleText.first),
        ),
      ),
    ),
  ),
)

Parameter Info #

  • swipDirection: to allow swipe in particular direction. Possible values are right(default) and left.
  • onSwipeSuccess: callback to run when swipe action is completed and valid.
  • threshold: determines how much the widget should be swiped to consider swipe to be valid.
2
likes
160
points
4
downloads

Publisher

verified publisherdoki.co.in

Weekly Downloads

A simple flutter package to add swipe to reply functionality similar to that of Whatsapp.

Repository (GitHub)
View/report issues

Topics

#swipe-action #chat-reply

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on swipe_callback