29.10 Designing the Add Car View
The final view to be added to the project represents the screen to be displayed when the user is adding a new car to the list. Add a new SwiftUI View file to the project named AddNewCar.swift including some state properties and a declaration for storing a reference to the carStore binding (this reference will be passed to the view from the ContentView when the user taps an Add button). Also modify the preview provider to pass the carData array into the view for testing purposes:
import SwiftUI
struct AddNewCar: View {
@StateObject var carStore : CarStore
@State private var isHybrid = false
@State private var name: String = ""
@State private var description: String = ""
.
.
struct AddNewCar_Previews: PreviewProvider {
static var previews: some...