Build: Clean Architecture Demo
This screen demonstrates a simple app structured with Clean Architecture layers: Presentation, Domain, and Data. It shows a list of tasks fetched from a repository and allows adding a new task.
Target UI
------------------------- | Clean Architecture Demo | ------------------------- | Tasks: | | 1. Buy groceries | | 2. Walk the dog | | | | [Add Task] | -------------------------
Use three layers: Presentation (UI), Domain (business logic), Data (repository).
Presentation layer shows a list of tasks and an Add Task button.
Domain layer defines a UseCase to get tasks and add a task.
Data layer implements a repository with in-memory storage.
Add Task button adds a new task with a fixed name 'New Task'.
UI updates to show the new task after adding.