Is the `androidx.compose.material.AlertDialog` not...
# compose-desktop
d
Is the
androidx.compose.material.AlertDialog
not longer supported with the new Composable Window API? Switched to the new API and the AlertDialog crashs with
java.lang.IllegalStateException: CompositionLocal LocalAppWindow not provided
. When it isn't longer support, I assume the
androidx.compose.ui.window.Dialog
is the way to go for all kinds of Dialog?
i
Use
0.5.0-build270
, it is implemented there (but under
ExperimentalMaterialApi
) The old dialog was moved to androidx.compose.material.v1.AlertDialog
🙏 1
but under 
ExperimentalMaterialApi
We marked it as experimental, because look and feel and API for material AlertDialog aren't final, and can be changed in the future. Currently we show it as a layer of the window, not as a separate window (but you can change it via
dialogProvider = UndecoratedWindowAlertDialogProvider
)
🔥 2
d
Ah cool, thanks. I was on build262, it works great with build270. And on Linux it doesn't do the flickering due the window animate (https://github.com/JetBrains/compose-jb/issues/513). 🙇
i
Thanks for the reminder 🙂 Yes, this issue doesn't reproduce anymore, because we use JDialog under the hood instead of disabled unresizable JFrame