DataFlowActivity

User Story (Tasks)

  • As a user I want an app that displays different fruits and shows a detail view of each fruit. The fruit images are already provided inside the xCode file

Guiding Resources

Data Flow: https://www.youtube.com/watch?v=jD6c9y8CFGQ

Observable Macro: https://developer.apple.com/documentation/swiftui/migrating-from-the-observable-object-protocol-to-the-observable-macro#

Tip

  • You can use more resouces that are not listed to go through the activity.

Objective

Follow the instructions to make the Hi-Fi given below

Screenshot 2023-11-29 at 11 49 46 AM Screenshot 2023-11-29 at 11 49 46 AM Screenshot 2023-11-29 at 11 49 46 AM

To Do:

You can work on the steps either individually or with a team to try and solve the problems to make the app

Step 1

TODO: make a Fruit model that has a name, image, and descriptions BONUS: try to make a property for the fruit color

Step 2

TODO: Navigate to the FruitObject file and make an fruit array to holds a strawberry, blueberry, banana, peach, and an orange.

Step 3

Go to the ContentView file and reference the FruitObject array to visually show the fruit list

Step 4

Go to the FruitDetailView and reference the fruit model

Note

If done with steps, below are additional steps you can do.

SILVER

In addition to the Hi-Fi, include functionality to allow the user to delete and add additional strawberrys, bannanas, etc

GOLD

In addition to the Hi-Fi, include functionality that will allow the user to favorite a fruit card which can be seen in a favorites sheet view.