payam-zahedi / toastification

Toastification is a Flutter package for displaying customizable toast messages. It provides predefined widgets for success, error, warning, and info messages, as well as a custom widget for flexibility. With Toastification, you can add and manage multiple toast messages at the same time with ease.
https://payamzahedi.com/toastification/
BSD 3-Clause "New" or "Revised" License
564 stars 39 forks source link

Support vertical drag to close #141

Closed optdxf closed 1 day ago

optdxf commented 2 days ago

Currently, dragToClose only allows you to drag left or right to close a toast. For toasts that have topCenter or bottomCenter alignment, vertical drag to close is intuitive/natural: there should be an option to allow you to allow for vertical drag to close in addition to horizontal drag to close.

A lot of mobile apps that allow for in-app notifications (via toasts) often allow you to vertically drag the notification to dismiss it.

More broadly speaking: maybe it'd be nice to allow the developer to customize and decide whether they want vertical drag to close, horizontal, or both?

payam-zahedi commented 1 day ago

Hello @optdxf,

Just to let you know, you already have control over how the toast is dismissed by using the DismissDirection? dismissDirection parameter. This allows you to customize the dismissal direction, including vertical and horizontal, to achieve the behavior you're looking for.

optdxf commented 1 day ago

re: @payam-zahedi

Oops, didn't know that existed! Thank you!