I'm using .onMove on a list for reordering. SwiftUI automatically applies shadow around the selected row which is great. My question is: Is there a way to make the shadow around the content in that row, in my case, a rounded rectangle, instead of around the whole list row container?
import SwiftUI
struct ContentView: View {
var body: some View {
List {
ForEach(0...5, id: \.self) { index in
ZStack {
RoundedRectangle(cornerRadius: 20).fill(.yellow)
Text("Row: \(index)").padding()
}.padding()
}
.onMove {_,_ in }
}
.listStyle(.plain)
}
}
#Preview {
ContentView()
}