koukibadr / Elegant-Notification

https://pub.dev/packages/elegant_notification
MIT License
46 stars 30 forks source link

Add onTap to Notification Widget #106

Closed marioki closed 5 months ago

marioki commented 7 months ago

This PR adds functionality to set an onTap Function to be called when the user taps anywhere on the notification Material Widget. New Parameters Added to ElegantNotification widget:

  1. onTap Optional Parameter to set a Function to call when the notification is tapped.
  2. dismissOnTap a boolean Flag to define wheater the notification should be dismissed when tapped (set to true by default).

Other Considerations:

koukibadr commented 6 months ago

@marioki same updates as This PR the new updates will be available in the next published version

marioki commented 6 months ago

@koukibadr Have you considered allowing users to use actions + onTap? There's a use case where tapping the notification, for example, navigates to a particular route, while using an action performs a quick response. This PR allows for both to be used.

koukibadr commented 6 months ago

The latest published version contains onTap and closeOnTap attributes where: