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 PMGrigorii Yurkov
10/25/2020, 10:41 PMwisdom
10/26/2020, 11:13 AM