Skip to content

Instantly share code, notes, and snippets.

@Marshall210
Marshall210 / DeviceType.kt
Created October 15, 2025 12:45 — forked from stevdza-san/DeviceType.kt
Adaptive layout in Compose Multiplatform.
import androidx.compose.material3.adaptive.HingeInfo
import androidx.compose.material3.adaptive.WindowAdaptiveInfo
import androidx.window.core.layout.WindowSizeClass
sealed class DeviceType : Comparable<DeviceType> {
abstract val minWidth: Int
abstract val minHeight: Int
abstract val rank: Int
override fun compareTo(other: DeviceType): Int = this.rank - other.rank