Uploaded November 2019 | Updated November 2026, 2 days ago
π Learn from written tutorials for individual parts ππ
resocoder.com/flutter-clean-arch-tdd
π§ Get Flutter news π° and resources:
π http://flutter.education
π― The biggest Flutter conference in Europe:
https://fluttereurope.dev
π¨βπ» Do you write good code? Find out now!
resocoder.com/good-code-quiz
Keeping your code clean and tested are the two most important development practices. In Flutter, this is even more true than with other frameworks. On one hand, it's nice to hack a quick app together, on the other hand, larger projects start falling apart when you mix the business logic everywhere. Even state management patterns like BLoC are not sufficient in themselves to allow for easily extendable codebase.
This is where we can employ clean architecture and test driven development. As proposed by our friendly Uncle Bob, we should all strive to separate code into independent layers and depend on abstractions instead of concrete implementations.
***
In the first part, you will have learned the core concepts of clean architecture as it pertains to Flutter and also created a bunch of empty folders for the presentation, domain and data layers inside the Number Trivia App we're building. In the second part, 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 you can see the Flutter app showcased on video.
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 written tutorials for individual parts ππ
resocoder.com/flutter-clean-arch-tdd
π§ Get Flutter news π° and resources:
π http://flutter.education
π― The biggest Flutter conference in Europe:
https://fluttereurope.dev
π¨βπ» Do you write good code? Find out now!
resocoder.com/good-code-quiz
Keeping your code clean and tested are the two most important development practices. In Flutter, this is even more true than with other frameworks. On one hand, it's nice to hack a quick app together, on the other hand, larger projects start falling apart when you mix the business logic everywhere. Even state management patterns like BLoC are not sufficient in themselves to allow for easily extendable codebase.
This is where we can employ clean architecture and test driven development. As proposed by our friendly Uncle Bob, we should all strive to separate code into independent layers and depend on abstractions instead of concrete implementations.
***
In the first part, you will have learned the core concepts of clean architecture as it pertains to Flutter and also created a bunch of empty folders for the presentation, domain and data layers inside the Number Trivia App we're building. In the second part, 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 you can see the Flutter app showcased on video.
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 [8] β Local Data Source
π Learn from the written tutorial ππ
https://resocoder.com/flutter-tdd-clean-architecture-ep8
π¨βπ» Do you write good code? Find out now!
https://resocoder.com/good-code-quiz
The next dependency of the Repository is the local Data Source used for caching data gotten from the remote API. Were going to implement it using shared_preferences. There are plenty of options to choose from when it comes to local data persistence. Were βusing shared_preferences because we dont store a lot of data - just a single NumberTrivia which will be converted to JSON.
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 [8] β Local Data Source](https://i.ytimg.com/vi/fCguzcvLka8/mqdefault.jpg)
![Flutter Firebase & DDD Course [2] β Authentication Value Objects
π Written tutorial & full project ππ
https://resocoder.com/firebase-ddd-flutter-2
π§ Get Flutter news π° and resources:
π http://flutter.education
π¨βπ» Do you write good code? Find out now!
https://resocoder.com/good-code-quiz
We have the big picture of Domain-Driven Design already in our minds so now its time to get coding. You might think that since we are building a Firebase app, we will need to worry about using the Firestore and FirebaseAuth classes right from the start. Thats not true at all with DDD. Lets start in the most important layer of them all - the domain layer. Namely, we are going to tackle authentication.
How can we sign in using email and password? The usual way would be to have a sign in form that would validate the inputted Strings. You know, email addresses must have the @ sign and passwords must be at least six characters long. We would then pass these Strings to the authentication service, in our case, Firebase Auth. Sure, this is perfectly doable but we have to realize one important fact...
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 Flutter Firebase & DDD Course [2] β Authentication Value Objects](https://i.ytimg.com/vi/fdUwW0GgcS8/mqdefault.jpg)



![Flutter TDD Clean Architecture Course [13] β Dependency Injection
π Learn from the written tutorial ππ
https://resocoder.com/flutter-tdd-clean-architecture-ep13
π¨βπ» Do you write good code? Find out now!
https://resocoder.com/good-code-quiz
We have all of the individual pieces of the app architecture in place. Before we can utilize them by building a UI though, we have to connect them together. Since every class is decoupled from its dependencies by accepting them through the constructor, we somehow have to pass them in.
Weve been doing this all along in tests with the βmockedβ classes. Now, however, comes the time to pass in real production classes using a service locator.
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 [13] β Dependency Injection](https://i.ytimg.com/vi/gfLb4rqzio4/mqdefault.jpg)


![Flutter Firebase & DDD Course [28] - Adding Todos UI
π 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
Todos. Finally! Weve implemented everything there was to implement and now we can start working on the reorderable todo list. Lets start with creating new and empty todos.
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 [28] - Adding Todos UI](https://i.ytimg.com/vi/hWo9Eo3VrUc/mqdefault.jpg)