I'm sorry for the messy format above but if I modify the code in my original question to Button(favorites.contains(item) ? systemImage: "heart" : systemImage: "heart.fill") it doesn't work anymore
If I replace Button(favorites.contains(item) ? "-" : "+") in my original code with Button(favorites.contains(item) ? systemImage: "heart.fill": systemImage: "heart") it doesn't work anymore.
I'm sorry for the messy format above but if I modify the code in my original question to Button(favorites.contains(item) ? systemImage: "heart" : systemImage: "heart.fill") it doesn't work anymore
If I replace Button(favorites.contains(item) ? "-" : "+") in my original code with Button(favorites.contains(item) ? systemImage: "heart.fill": systemImage: "heart") it doesn't work anymore.