I have code similar with solution and looking through I am getting this error at the bottom of code where we need to create a dummy it says something about - Extra arguments at position 1,2,3,4 in call
another error: Missing argument for parameter “from” in call insert from
Thank you
//
// PizzaView.swift
// Pizza
//
// Created by Ewa Boer on 29/05/2021.
//
import SwiftUI
struct PizzaView: View {
var pizza:Pizza
var body: some View {
HStack {
Image(pizza.image)
.resizable()
.scaledToFill()
.frame(width: 50, height: 50, alignment: .center
)
.clipped()
VStack {
Text(pizza.name)
HStack {
ForEach (pizza.toppings, id:\.self) {
top in
Text(top)
}
}
}
}
}
}
struct PizzaView_Previews: PreviewProvider {
static var previews: some View {
PizzaView(pizza: Pizza(id: UUID(), name: "Test", toppings: ["topping1", "toppping2"], image: "meatlovers"))
}
}