The code itself is correct, so please try something other than black.It may be hard to understand.
https://www.motokis-brain.com/article/28
import SwiftUI
struct ContentView:View {
varbody:someView {
List{
Text ("Test 1")
.listRowBackground (Color.red)
Text ("Test 2" )
.listRowBackground (Color.blue)
Text ("Test 3")
.listRowBackground (Color.green)
Text ("Test 4")
.listRowBackground (Color.gray)
Text ("Test 5")
.listRowBackground (Color.yellow)
}
}
}
© 2024 OneMinuteCode. All rights reserved.