Show a notification with an action
Show a temporary notification with an action button for user interaction.
When to use
Use this pattern when:
- Users need to take action in response to a notification
- Providing a quick way to navigate to related content
- Showing activity notifications that users may want to respond to
- The action should dismiss the notification when clicked
Considerations
- Use
actionTextto set the button label in the notification - The
actioncallback receives the notification UUID for dismissal - Use
TemporaryNotification.dismiss(uuid)to close the notification programmatically - Keep action text short and clear (e.g., “View”, “Undo”, “Open”)
- Consider what happens if the user doesn’t click the action before auto-dismiss