https://kotlinlang.org logo
#compose
Title
# compose
x

xxfast

03/22/2023, 12:02 AM
Are we able provide
WindowInsets
via a
CompositionLocal
?
c

Chris Sinco [G]

03/22/2023, 12:31 AM
Technically yes since you can create your own CompositionLocals
x

xxfast

03/22/2023, 12:45 AM
we wouldn't be able to provide and override these for
TopAppBar
or
BottomAppBar
, right?
c

Chris Sinco [G]

03/22/2023, 1:05 AM
Well given windowInsets is a parameter, yes you can override the defaults
What are you trying to achieve?
x

xxfast

03/22/2023, 2:13 AM
trying to add custom insets for the ios client, and have not affect how the insets are calculated for other platforms. But looks like window insets are consumed once and propagated down to children which seem to work out well for my usecase
c

Chris Sinco [G]

03/22/2023, 3:10 AM
Gotcha. Unfortunately I’m not as familiar with how WindowInsets are calculated and passed to a Compose hierarchy in iOS, but conceptually how to apply them should be consistent with how it works in Android.
6 Views