@MR3Y Yeah, that basically the same way I implemented size {} in my project, but I got suspicious why there is no so obvious built in function
e
eygraber
06/27/2025, 5:39 PM
I imagine it's because size isn't supposed to change so frequently
plus1 1
a
Alex Vanyo
06/27/2025, 6:23 PM
https://issuetracker.google.com/345299387 is a tracking feature request for adding modifiers like these.
Size can definitely change frequently, it’s more of an question of whether there should be lambda and non-lambda versions of every single modifier API that exists.
Modifier.layout
is the general way to customize layout behavior, it should be a go-to in cases like this where you want to fine-tune what happens in different phases
e
eygraber
06/27/2025, 6:29 PM
I thought there was guidance to use things like scale for these types of interactions?
a
Alex Vanyo
06/27/2025, 6:41 PM
Depends on what you’re doing - if you have a expanding/collapsing section, it definitely makes sense to have the size directly change for everything else to nicely move around it
👍 1
e
efemoney
06/28/2025, 4:50 AM
Imo, layout should be easier to use (or there should be a simpler version). That's why its not the goto modifier for these cases today