So edging my way into AlertDialogs. I'm frankly a little surprised how easy this seems to be. I'm ju...
t
So edging my way into AlertDialogs. I'm frankly a little surprised how easy this seems to be. I'm just doing the following:
Copy code
var showDialog by remember { mutableStateOf(false) }
ButtonOrWhateverComposeable(clickAction = { showDialog = true }
if (showDialog) {
  AlertDialog(...some horizontal padding + showDialog = false...)
}
Is that really the idiom/pattern. Just put a conditional AlertDialog near the widget that opens it?
👍🏻 1
👍 2
👌 4