Swipe a container (message box like telegram) left in flutter

1,268

You can use swipeable package, it allows you to wrap a widget with some threshold and a few callbacks that you can react, onSwipeLeft or onSwipeRight for this case. Then you save the selected message and render the message box on top of the message bar.

Share:
1,268
devmuaz
Author by

devmuaz

Updated on December 22, 2022

Comments

  • devmuaz
    devmuaz 11 months

    I'm trying to implement left dragging to a specific container or actually a message box like the one in Telegram where you can swipe the message left to reply to it.

    Telegram message dragging when reply

    I tried the Flutter Dismissible Widget but firstly it destroys the widget or remove it and secondly couldn't find a way to drag it to the center only.

    What I want is the same technique in Telegram to implement it on Flutter

    Any ideas?