Build: Shared Counter Screen
This screen shows a counter shared between two views using @EnvironmentObject. Both views can increment the same counter and see updates instantly.
Target UI
------------------------- | Shared Counter Screen | |-----------------------| | Count: 0 | | [Increment in View 1] | | | | Count: 0 | | [Increment in View 2] | -------------------------
Create a shared counter class using ObservableObject with a published integer property.
Use @EnvironmentObject to share the counter between two child views.
Each child view shows the current count and has a button to increment it.
The main screen shows both child views stacked vertically.
Incrementing in one view updates the count in both views immediately.