It seems there is no default separator in List by using SwiftUI on macOS. So I am using Divider to add by manual. But when I enable multiple line selection, the app will render a white line automatically. And it seems strange that both divider line and white line exist.
Is there a best practice way to implement row separator on macOS by using SwiftUI ? Or can I remove the default white line rendering by selection?
struct WelcomeView: View {
let contents = ["aaa", "bbb", "ccc"]
@State var selection = Set<String>()
var body: some View {
List(selection: $selection) {
Section(header: Text("header")) {
ForEach(contents, id: \.self) { row in
VStack {
Text(row)
// Divider()
}
}
}
}
}
}



selection: Binding<Set<SelectionValue>>?