eygraber
02/11/2021, 9:00 PMKirill Grouchnikov
02/11/2021, 9:01 PMeygraber
02/11/2021, 9:04 PMAdam Powell
02/11/2021, 9:07 PMModifier.onSizeChanged {}
will be considerably less overhead than BoxWithConstraints
if all you need is the measured size of the element. BoxWithConstraints
is good if you would change the actual structure of the content based on the incoming layout constraints.Ian Lake
02/11/2021, 9:07 PMeygraber
02/11/2021, 9:12 PMModifier.onSizeChanged
looks like it will provide what I need. Thanks!Ian Lake
02/11/2021, 9:20 PMrequestBuilder
(for Coil in this instance) - the ability to change the data
(i.e., the URI) based on the size you're passed: https://github.com/chrisbanes/accompanist/blob/main/coil/src/main/java/dev/chrisbanes/accompanist/coil/Coil.kt#L108onSizeChanged
under the hood so it is good to know about that as a tool in your toolbox, but image loading isn't something that every dev should have to write from scratch 😛eygraber
02/11/2021, 9:25 PMnickbutcher
02/11/2021, 10:14 PM