i have def not been consuming innerPadding like this. What is this even for? (im talking about consumeWindowInsets(insetPadding). I always just used it in contentPadding.
c
curioustechizen
08/27/2023, 1:59 PM
Is this snippet from M3 scaffold? I might be misremembering but there might have been a behaviour change related to consumption of insets between M2 and M3.
c
Colton Idle
08/27/2023, 3:20 PM
this is from the inset compose docs. i actually dont know if this is from m2/m3.
f
Francesc
08/27/2023, 4:03 PM
based on the documentation, the insets are consumed here so that if a child in the hierarchy adds a padding based on insets, it won't apply it a 2nd time
Francesc
08/27/2023, 4:03 PM
This method consumes all of paddingValues in addition to whatever has been consumed by other windowInsetsPadding modifiers by ancestors. consumeWindowInsets accepting a WindowInsets argument ensures that its insets are consumed and doesn't consume more if they have already been consumed by ancestors.
s
Stylianos Gakis
08/27/2023, 4:16 PM
This video somewhere
here▾
this functionality is talked about if you’re interested.