Showing a toast
A toast is a brief, non-blocking message that slides in, lingers, and slides out: the right tool for “Copied!” or “Settings saved” feedback. showToast displays one and returns a handle for controlling it. If you don’t pass an id, one is generated for you.
Toast handles
The returned handle is your reference to the toast after it’s shown. Use it to dismiss the toast early instead of waiting for it to time out.
Pass a stable id when a toast should replace a previous one rather than stack, handy for progress updates that shouldn’t pile up on screen.