Insets for Jetpack Compose takes a lot of the ideas which drove [Insetter][insetter-view] for views, and applies them for use in composables.
To setup Insets in your composables, you need to call the ProvideWindowInsets
function and
wrap your content. This would typically be done near the top level of your composable hierarchy:
setContent {
MaterialTheme {
ProvideWindowInsets {
// your content
}
}
}
For more information, visit the documentation: https://google.github.io/accompanist/insets
repositories {
mavenCentral()
}
dependencies {
implementation "com.google.accompanist:accompanist-insets:<version>"
}
Snapshots of the development version are available in Sonatype's snapshots
repository. These are updated on every commit.