I'm creating a simple iOS app with SwiftUI, and I'd like to change my view's background color when switch toggle change.

My code
struct ContentView: View {
@State private var isOnLight: Bool = false
var body: some View {
VStack {
Toggle(isOn: $isOnLight) {
Text("Switch")
.font(.title)
.foregroundColor(.gray)
}
if isOnLight {
}
}.padding()
}
}