VisuewProvider EnvironmentObject
struct ItemDetail_Previews: PreviewProvider {
static let order = Order()
static var previews: some View {
NavigationView {
ItemDetail(item: MenuItem.example).environmentObject(order)
}
}
}
Repulsive Raccoon