I just want to set a Color as background color to my list. Can't find anything that work,
It looks like is not possible, I don't want to change every single color of my row.
Any tips how to do it? Looks like SwiftUI
and List
don't allow the background color, it allow only color per single raw.
struct ContentView: View {
var body: some View {
ZStack {
RadialGradient(gradient: Gradient(colors: [.orange, .red]), center: .center, startRadius: 100, endRadius: 470).edgesIgnoringSafeArea(.all)
.overlay(
List(0 ..< 5) { item in
Text("Test")
}
)
}
}
}