Why not make
@Preview
workable with Composable functions with arguments? As I understand almost all arguments are data classes. Compiler can instantiate them using primary constructor. For example:
data class Post(
val title: String,
val description: String
)
Default instance for this class can be
Post("Title", "Description")
. Same with Lists of data classes, but compiler can add index for each instance
Post("Title №0", "Description №0")
,
Post("Title №1", "Description №1")
, etc. So in most cases you don't need to create special preview composable functions or mess around with
@PreviewParameter
. What do you think?