Post

Replies

Boosts

Views

Activity

What would be the easiest way to have a example MusicItem for SwiftUI previews
Hey all, I was just wondering what would be the best/easiest way to have a sample for any MusicItem to use in SwiftUI previews. I know I could convert one into a string and then decode (as it conforms to Codable) but maybe there is a way that would make it easier to setup? if not I might file a feedback for this as I think it would be great if all MusicItem structures would have a .example or something like that so for a view you'd have #Preview { SongTitlesView(song: Song.example) }
0
0
817
Jun ’23