Может кто-нибудь сказать мне, как добавить градиентный фон в список SwiftUI?
Текущий код:
struct TestView: View {
var body: some View {
LinearGradient(gradient: Gradient(colors: [Color.red, Color.purple]), startPoint: .top, endPoint: .bottom)
.edgesIgnoringSafeArea(.vertical)
.overlay(
List {
Group {
Text("Hallo")
Text("World")
}
.background(Color.blue)
}
.background(Color.green)
.padding(50)
)
}
}
Текущий макет, где градиент виден за ячейками. Я хочу сделать ячейки прозрачными, чтобы увидеть градиент внизу.

Спасибо!