Halil Ozercan
10/31/2020, 5:08 PMcomposed
) and that state depends on the size of the composable that it is attached to. For example, initial state is going to have 50 random objects if size is smaller than a threshold, 100 objects if it is larger.composed
and then initializing that state after first call to drawBehind
modifier.
= composed {
var state by remeber { ... }
drawBehind {
if(state.value == null) {
state.value = init(size)
}
}
}
layout
modifier to initialize the state according to the size instead of drawBehind
makes more sense.Adam Powell
10/31/2020, 7:21 PMonSizeChanged
modifier for cases like this tooHalil Ozercan
10/31/2020, 8:25 PM