ScreenSize
Represents a screen size with width and height in density-independent pixels
Encapsulates screen dimensions for different device types, providing common presets for smartphones, tablets, and desktop displays. Used primarily in ScreenSizeField for responsive design testing and preview environments.
// Create custom screen size
val customSize = ScreenSize(width = 400.dp, height = 800.dp, label = "Custom Phone")
// Use predefined presets
val phone = ScreenSize.MediumSmartPhone
val tablet = ScreenSize.LargeTablet
val desktop = ScreenSize.MediumDesktop
// Create landscape version
val landscapePhone = ScreenSize.MediumSmartPhone.reversed()Content copied to clipboard
Parameters
width
Screen width in dp
height
Screen height in dp
label
Display name for UI selection (auto-generated if not provided)