Evgeny Taskaev
02/11/2022, 7:05 PMAlbert Chang
02/12/2022, 3:46 AMModifier.requiredSize()
is only needed if you want to override the size specified by Modifier.size()
before in a modifier chain.
Modifier.size(10.dp).size(5.dp)
makes the size 10dp and Modifier.size(10.dp).requiredSize (5.dp)
makes the size 5dp.Chris Sinco [G]
02/12/2022, 4:11 PMAlbert Chang
02/12/2022, 4:21 PMModifier.size(24.dp)
will also work. Btw this is the bug.Chris Sinco [G]
02/12/2022, 4:39 PMAfzal Najam
02/15/2022, 4:42 AMScaffold
(its parent), maybe for a transition animation. No matter how high of a value you put in size
, it will still stay a weird rounded rectangle and not exceed a certain size.
But if you use requiredSize
, it will go bigger.Albert Chang
02/15/2022, 4:55 AM