ScreenSize 
    Immutable class representing screen dimensions in density-independent pixels.
This class provides a convenient way to access screen size information within Compose UI components, allowing for responsive design implementations.
@Composable
fun ResponsiveLayout() {
    val screenSize = rememberScreenSize()
    if (screenSize.widthDp 600.dp) {
        // Tablet layout
        TabletLayout()
    } else {
        // Phone layout
        PhoneLayout()
    }
}Content copied to clipboard