Custom class in layouts on JetpackCompose

Viewed 62

I've read the documentation on how to compose basic Layouts . I wonder if a class can be implemented in order to create these views. EG from Android

@Composable
fun ArtistCard(artist: Artist) {
    Row(
        verticalAlignment = Alignment.CenterVertically,
        horizontalArrangement = Arrangement.End
    ) {
        Image(/*...*/)
        Column { /*...*/ }
    }
}

That produces some kind of CardView, but can that be converted in a class that I can just provide the image and title? In order to create a mutable list or I'm missing something else that exists?

I have no code about the class mentioned since I don't know how to start in this case with Jetpack components.

0 Answers
Related