Uploaded August 2019 | Updated November 2026, 5 days ago
📗 Learn from the written tutorial 👇👇
resocoder.com/flutter-tdd-clean-architecture-ep2
👨💻 Do you write good code? Find out now!
resocoder.com/good-code-quiz
In the first part, you learned the core concepts of clean architecture as it pertains to Flutter. We also created a bunch of empty folders for the presentation, domain and data layers inside the Number Trivia App we're building. Now it's time to start filling those empty folders with code, using TDD, of course.
Whenever you are building an app with a UI, you should design the UI and UX first. I've done this homework for you and the app was showcased in the previous part.
The actual coding process will happen from the inner, most stable layers of the architecture outwards. This means we'll first implement the domain layer starting with the Entity.
Go to my website for more information, code examples, and articles:
● resocoder.com
Follow me on social media:
● instagram.com/resocoder
● facebook.com/resocoder
● twitter.com/resocoder
📗 Learn from the written tutorial 👇👇
resocoder.com/flutter-tdd-clean-architecture-ep2
👨💻 Do you write good code? Find out now!
resocoder.com/good-code-quiz
In the first part, you learned the core concepts of clean architecture as it pertains to Flutter. We also created a bunch of empty folders for the presentation, domain and data layers inside the Number Trivia App we're building. Now it's time to start filling those empty folders with code, using TDD, of course.
Whenever you are building an app with a UI, you should design the UI and UX first. I've done this homework for you and the app was showcased in the previous part.
The actual coding process will happen from the inner, most stable layers of the architecture outwards. This means we'll first implement the domain layer starting with the Entity.
Go to my website for more information, code examples, and articles:
● resocoder.com
Follow me on social media:
● instagram.com/resocoder
● facebook.com/resocoder
● twitter.com/resocoder


![Flutter TDD Clean Architecture Course [5] – Contracts of Data Sources
📗 Learn from the written tutorial 👇👇
https://resocoder.com/flutter-tdd-clean-architecture-ep5
👨💻 Do you write good code? Find out now!
https://resocoder.com/good-code-quiz
Repository is the brain of the data layer of an app. It handles data from remote and local Data Sources, decides which Data Source to prefer and also, this is where data caching policy is decided upon.
In the previous part, weve gone over the basic structure of the data layer and today, its time to start implementing the data layer right from its core - from the NumberTriviaRepository, all the while creating contracts for its dependencies.
In this part, we will only create contracts for all the Repository dependencies. This will allow us to mock them easily without needing to bother with implementing them just yet - thats coming in the next parts.
Go to my website for more information, code examples, and articles:
● https://resocoder.com
Follow me on social media:
● https://instagram.com/resocoder
● https://www.facebook.com/resocoder
● https://twitter.com/resocoder Flutter TDD Clean Architecture Course [5] – Contracts of Data Sources](https://i.ytimg.com/vi/m_lkZo6CYcs/mqdefault.jpg)
![Flutter TDD Clean Architecture Course [9] – Remote Data Source
📗 Learn from the written tutorial 👇👇
https://resocoder.com/flutter-tdd-clean-architecture-ep9
👨💻 Do you write good code? Find out now!
https://resocoder.com/good-code-quiz
The last remaining part of the data layer for which we currently have only a contract is the remote Data Source. This is where all the communication with the Numbers API will happen, for which were going to use the http package. All of this will be done doing test-driven development, of course.
Go to my website for more information, code examples, and articles:
● https://resocoder.com
Follow me on social media:
● https://instagram.com/resocoder
● https://www.facebook.com/resocoder
● https://twitter.com/resocoder Flutter TDD Clean Architecture Course [9] – Remote Data Source](https://i.ytimg.com/vi/msGsYPtZnhU/mqdefault.jpg)
![Flutter Firebase & DDD Course [13] - Note Entities
📗 Get the code 👇👇
https://github.com/ResoCoder/flutter-ddd-firebase-course
📧 Get Flutter news 📰 and resources:
👉 http://flutter.education
👨💻 Do you write good code? Find out now!
https://resocoder.com/good-code-quiz
What should we do with the value objects we created in the previous part? Lets group them together into entities representing a note and a todo item.
Go to my website for more information, code examples, and articles:
● https://resocoder.com
Follow me on social media:
● https://instagram.com/resocoder
● https://www.facebook.com/resocoder
● https://twitter.com/resocoder Flutter Firebase & DDD Course [13] - Note Entities](https://i.ytimg.com/vi/myFgLD4zI3o/mqdefault.jpg)





