Grigorii Yurkov
10/25/2020, 7:35 PM@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?caelum19
10/25/2020, 10:16 PMcaelum19
10/25/2020, 10:18 PMGrigorii Yurkov
10/25/2020, 10:41 PMwisdom
10/26/2020, 11:13 AM