How to reproduce pop-ups with custom actions?

I interact with a device printer with through API and would like to create a custom action which displays a bottom sheet widget pop-up with an error message should there be any issue.

I could do this by crafting elaborate branches with every possible error code through the UI builder but I feel like there's a way to do this through a custom action which will just print the error message in the popup through using bottom sheets.

How can I do display (and then dismiss) such a bottom sheet popup (with a pre-made component) through custom actions?

1
1 reply