Property

LocalUiMediaScope

A UiMediaScope provides information about the window environment and input devices, enabling adaptive layouts and behavior.

Source set: Common
public val LocalUiMediaScope: ProvidableCompositionLocal<UiMediaScope> =
    computedDefaultOf("LocalUiMediaScope") {
        LocalOwner.currentValue.uiMediaScope ?: noLocalProvidedFor("LocalUiMediaScope")
    }

A UiMediaScope provides information about the window environment and input devices, enabling adaptive layouts and behavior. This CompositionLocal is the primary mechanism to access the scope within the composable tree.

It is typically provided at the root of an application. Accessing it without a provider will result in a runtime error.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: