# currentWindowSize

Common/AllAndroid/JVM

## Functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable [currentWindowSize](https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/currentWindowSize.composable#currentWindowSize())()` **This function is deprecated.** Prefer LocalWindowInfo instead | Cmn |

## Functions

### currentWindowSize

Cmn Artifact: [androidx.compose.material3.adaptive:adaptive](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/adaptive/WindowAdaptiveInfo.kt+function:currentWindowSize) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.2.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.3.0)

```
@Composable
fun [currentWindowSize](https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/currentWindowSize.composable#currentWindowSize())(): IntSize
```

> [!CAUTION]
> **This function is deprecated.**   
> Prefer LocalWindowInfo instead, use this instead:
>
> ```kotlin
> LocalWindowInfo.current.containerSize
> ```

Returns and automatically update the current window size. It's a convenient function of getting `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/WindowInfo#containerSize()` from `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/package-summary#LocalWindowInfo()`.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` | an `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` that represents the current window size. |