Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Cloudy in Dialog compose #18

Open
PepaZapletal opened this issue Jan 13, 2024 · 1 comment
Open

Using Cloudy in Dialog compose #18

PepaZapletal opened this issue Jan 13, 2024 · 1 comment

Comments

@PepaZapletal
Copy link

Is it possible to use Cloudy in Dialog to have a blurred background? I have this code:

@Composable
public fun CustomInformationDialog(
    onDismissRequest: () -> Unit, onConfirm: () -> Unit
) {
    Dialog(
        onDismissRequest = onDismissRequest, properties = DialogProperties(
            usePlatformDefaultWidth = false
        )
    ) {
        Box(
            modifier = Modifier.fillMaxSize(),
            contentAlignment = Alignment.BottomCenter

        ) {
            Card(
                modifier = Modifier.fillMaxWidth()
            ) {

            }
        }
    }
}

I am trying to add a blur effect with Cloudy() but I get this exception:

ClassCastException: androidx.compose.ui.platform.ComposeView cannot be cast to androidx.compose.ui.window.DialogWindowProvider

What should I change? Where should I put Cloudy() to blur the dialog background (only background)?

Thank you for your help.

@DenysBohurskyi
Copy link

I don't have this error, but I got no composables to be displayed inside dialog's content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants