Why can I only decorate one parameter with `@Previ...
# compose
j
Why can I only decorate one parameter with
@PreviewParameter
? Is this going to change in the future?
a
@nosuid
y
The main reason I think behind this is because they don't know how you want the parameters to interact with each other. Say you have 2 parameters - a Boolean for dark/light theme and a text provider with 2 values. Now should that result in 4 different previews (2 light theme with 1st text and 2 dark with the 2nd) or just 2 previews (light theme with 1st text, dark theme with other)
j
Yeah, that makes sense. Still, I think the current approach of combining providers is too cumbersome.
y
It's basically combining sequences so yeah. I think you can write a generic class for combining 2 preview providers into one and then use it. But if you have more than 3 parameters that can be difficult