Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add onTap to Notification Widget #106

Closed

Conversation

marioki
Copy link

@marioki marioki commented Feb 9, 2024

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:

  • A notification can have an onTap, an action and a closeButton each with their corresponding Function call.
  • added two new entries to the example app.

Adds the capability to set an onTap Function to be called when the user taps anywhere on the notification material widget. I can be used un combination with CloseButton and Action.
@koukibadr
Copy link
Owner

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

@koukibadr koukibadr added the duplicate This issue or pull request already exists label Feb 21, 2024
@marioki
Copy link
Author

marioki commented Feb 21, 2024

@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
Copy link
Owner

The latest published version contains onTap and closeOnTap attributes where:

  • onTap a callback invoked when the user press the widget
  • closeOnTap boolean indicate whether the notification get closed on pressing it or not

@koukibadr koukibadr deleted the branch koukibadr:main March 25, 2024 23:06
@koukibadr koukibadr closed this Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants