title: How to add background Color to List in swiftUI
body: <p>I want to change the background white to an another color to the List in SwiftUI</p>
  <p><img src="https://i.stack.imgur.com/xePbm.png" alt="Click Here" /></p>
  <pre><code>List(listOfItems) { item in
      Group {
          HStack {
              item.iconImage.padding()
              Text(item.text).fontWeight(.regular).foregroundColor(Color(&quot;smalltext&quot;)).font(.system(size: 25))
              Spacer()
              Button(action: {
                  
              }) {
                  Image(&quot;back&quot;)
              }
          }.padding().background(Color(&quot;bg&quot;))
      }.listRowBackground(Color(&quot;bg&quot;))
  }.background(Color(&quot;bg&quot;))
  </code></pre>