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.Halil Ozercan
10/31/2020, 5:12 PMcomposed
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)
}
}
}
Halil Ozercan
10/31/2020, 5:23 PMlayout
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