Property

LocalContext

Provides a Context that can be used by Android applications.

Source set: Android
public val LocalContext: ProvidableCompositionLocal<Context> =
    computedDefaultOf<Context>("LocalContext") {
        LocalAndroidComposeView.currentValue?.context ?: noLocalProvidedFor("LocalContext")
    }

Provides a Context that can be used by Android applications.

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: