Stylish Dialog Surface
A modal dialog container that enters with a combined scale-and-fade animation. Wraps content in a full-width Card inside a platform Dialog whose properties default to DialogProperties(usePlatformDefaultWidth = false), so the surface stretches to the available width minus horizontalPadding.
The entrance animation scales from 92 % to 100 % over StylishTheme.animation.durationShort with a quadratic ease-in, while alpha fades from 0 to 1 over the same duration. Set animate to false to skip the animation entirely (e.g. during UI tests or when the caller manages its own transition).
Dismiss behaviour (back press, tap outside) is controlled through properties: pass DialogProperties(dismissOnBackPress = false) or DialogProperties(dismissOnClickOutside = false) to opt out of either dismissal path. onDismiss is invoked for whichever dismissals remain enabled.
The card is padded by windowInsets (defaults to WindowInsets.safeDrawing) so its content never collides with the system bars; pass WindowInsets(0) to disable this behaviour.
Parameters
Called when the user taps outside the dialog or presses the system back button (per properties).
Modifier applied to the root Card, before the built-in full-width, horizontal-padding, and entrance-animation modifiers.
When true (default), the dialog plays the scale-and-fade entrance animation. When false, the dialog appears immediately with no transition.
Shape of the card surface. Defaults to RoundedCornerShape with StylishTheme.dimensions.connectedCornerRadius (12 dp).
Background color of the card. Defaults to MaterialTheme.colorScheme.surfaceContainerHigh.
Horizontal margin between the dialog edges and the screen edges. Defaults to 16 dp.
Default content color inside the card. When null (default), the color scheme's default content color is used.
The platform DialogProperties. Defaults to DialogProperties(usePlatformDefaultWidth = false) so the dialog spans the full available width. Use dismissOnBackPress and dismissOnClickOutside (constructor parameters of DialogProperties) to control dismissal.
Insets padded around the card so its content stays clear of system bars. Defaults to WindowInsets.safeDrawing. Pass WindowInsets(0) to disable.
Content rendered inside the card's ColumnScope. Callers are responsible for their own internal padding.