rememberWindowSize

Remembers the WindowSize class for the window corresponding to the current window metrics.

References

Example:

val window: WindowSize = rememberWindowSize()
when(window.width) {
is WindowType.Compact -> "Compact"
is WindowType.Medium -> "Medium"
is WindowType.Expanded -> "Expanded"
}

Since

1.0.0

Return

WindowSize corresponding to the given width and height