Build: Clean Architecture Layers Demo
This screen shows a simple Flutter app demonstrating the three main layers of Clean Architecture: Presentation, Domain, and Data. It displays a list of tasks fetched from a data source through the domain layer.
Target UI
------------------------- | Clean Architecture | |-----------------------| | Tasks: | | 1. Buy groceries | | 2. Walk the dog | | 3. Read a book | | | | [Refresh] | -------------------------
Display a list of tasks on the screen.
Use three layers: Presentation (UI), Domain (business logic), Data (data source).
Presentation layer calls Domain layer to get tasks.
Domain layer defines a UseCase to fetch tasks.
Data layer provides a repository implementation returning a fixed list of tasks.
Add a Refresh button to reload tasks.