
Explore clean architecture and bloc pattern to build robust, scalable Flutter apps. Discover how data, domain, and presentation layers enforce separation of concerns and enable easier collaboration.
Explore how the domain layer defines entities, repository contracts, and use cases to implement clean architecture with loose coupling, enabling flexible data and presentation layer interaction.
Explore how domain use cases depend on repository contracts, enforce the single responsibility principle, then extend entities into data layer models with serialization and copyWith, and test the models.
Learn how repositories in the data layer implement domain contracts to enable CRUD operations, manage data consistency, depend on data sources, and maintain separation of concerns for reusable code.
Transfer control from the data layer to the presentation layer, where the bloc manages UI state and business logic via use cases, repository, and data source, then emits UI updates.
Explore test driven development within a clean architecture, using dependency injection to wire data sources, repositories, and use cases for a loosely coupled Flutter app.
Explore solid principles—single responsibility, open-closed, Liskov substitution, interface segregation, and dependency inversion—applied in clean architecture to separate data source, domain, and presentation via contracts and dependency injection.
Demonstrate a basic login flow within a clean architecture using Flutter BLoC, showing UI events flow through a bloc to use cases, data layer, repository, and data source.
Create a dummy flutter project using a fake http server and mock api to practice test driven development with firebase, implementing a simple users endpoint to create and fetch users.
Create a user entity in a flutter app, define the domain layer with a user model (id, created at, name, avatar), and explore referential equality in a TDD context.
Explore how Dart handles object equality, contrasting referential and value equality, and learn to override == and hashCode, using Equatable for consistent comparisons across ID-based objects.
Install and explore the Dartz either concept to handle server results, using equatable for value equality, define an authentication repository interface, and apply clean architecture with data and domain layers.
Explore Dart's either type with left and right, distinguishing exceptions from success, mapping server and cache errors to a unified failure, and using typedefs for clean architecture.
Explore how clean architecture structures use cases around repositories, implementing a create user use case that calls the authentication repository, using a Dart callable function.
Demonstrates a domain layer use case for creating a user with multiple params, using a custom create user params type, Equatable, and clean architecture patterns with linting compliance.
Define a user data blueprint and domain use cases for creating and retrieving users, with repositories, error handling, and test-driven development in a clean architecture Flutter BLoC project.
Conduct unit tests for use cases by creating dedicated test files that mirror the source structure; instantiate classes with mocks for dependencies, and verify expected behavior without real network calls.
Explore test-driven development in Flutter clean architecture by mocking dependencies with mocktail, wiring a mock authentication repository, and implementing arrange-act-assert for the create user use case in part 1.
Learn to stub repository methods in flutter tests by hijacking responses with then, then answer, and then return, using right for success. Prepare empty params for consistent tests.
Teach to write a Flutter BLoC test: await a future, use expect to assert right data, and verify the auth repository creates a user with right or left outcomes.
Apply verify() in flutter BLoC TDD to confirm the repository creates a user with exact params and the use case calls the president exactly once, with no extra interactions.
Run the test to verify the create user flow passes, fix incorrect creator usage, and start get user tests using mocktail with a fake authentication repository.
Showcase testing the get users domain use case with mocktail, wiring a mock authentication repository, and verifying a get users call that returns a list of users in domain layer.
Develop the user model in the data layer by extending the user entity and implementing from map and to map, plus from json and to json for server data.
Implement a copy width method that creates a new user model with only the changed fields, making each property nullable to preserve values like id, avatar, and created at.
Test the user model with unit tests, covering dependencies, mock tail fakes, and grouped tests, to ensure correct behavior and that the model is a subclass of the user entity.
Write tests that load user data from a json fixture, read the json file synchronously, convert it to a map, and build a user model with the correct data.
Learn to test JSON serialization in a Flutter clean architecture project by using fromJson and fromMap to build models, and toJson and toMap to generate outputs with a fixture reader.
Design a repository in the data layer with a remote data source and authentication flow, returning user models (with copyWith) and handling errors with custom exceptions.
Inject the remote data source via the constructor to enable dependency inversion and keep the data layer testable, applying test-driven development to ensure create user calls and returns proper data.
Learn how to unit test authentication repository implementation by mocking the remote data source, verifying create user calls, and handling success and failure scenarios with dependency injection.
Validate that the repository implementation calls the remote data source to create user with the same creator data, returns a right value on success, and maps server failures to left.
define a server exception with status code and equatable semantics. catch remote errors and map them to api failures with the same message and status code in tdd tests.
Master test-driven development for a flutter bloc authentication repository by implementing API exception handling, remote data source interactions, and get users tests to verify success and failure paths.
Test the authentication remote data source implementation through remote data source tests, validating async http calls and handling success and error via status codes like 200 and 201.
Learn to test a remote data source with a mock HTTP client, post requests, and status codes 200/201 within a Flutter, BLoC, TDD, and clean architecture project.
Explore http post requests to a mock api, using a base url and /users endpoint to create a user with a json body and test 200/201 and 400 outcomes.
Write robust http get request tests for fetching users, using try/catch to throw api exceptions on errors, rethrowing exceptions, and validating uri construction and json-to-user mapping.
Fix error handling for http responses by throwing an API exception when status isn’t 200, align the remote data source get users call, and ensure tests pass.
Explore using Flutter bloc and cubit in a presentation layer, wiring authentication events to use cases like create user and get users, emitting loading and loaded states and wiring dependencies.
Learn how to model success and failure with folding on the either type in a Flutter cubit, emitting authentication errors or a loaded user list from use cases.
Write a test for the authentication qubit using mocks for get users and create user, initialize the qubit, and verify the authentication initial state.
Learn how to test a BLoC/Cubit user creation flow with the block_test package, covering setup, arrange-act-assert, emitted states (creating user, user created), and dependency verification.
Demonstrate Cubit-based testing in Flutter BLoC by writing a failing create user test, simulating API failure and server errors, and asserting emissions of creating user and authentication error.
Develop flutter cubit tests for get users, asserting getting users and finally users loaded, handling authentication error, and verifying interactions and async behavior.
Test a cubit that fetches users, emitting getting users then users loaded on success, and authentication error or server API failure on error, with verification of API calls.
Register and wire dependencies with Get It to connect domain use cases to data, repositories, and data sources, while the presentation layer relies on the app logic.
Demonstrate dependency injection and bloc wiring in a Flutter app, loading the home screen via a qubit, service locator, and bloc provider for adding and fetching users.
Build the first user in a Flutter BLoC TDD and clean architecture project by creating a username field, a name controller, and an avatar, then save and display the user.
Set up a Flutter project for clean architecture with BLoC and TDD, integrate provider for simple state, configure dependencies, assets, fonts, linting, and apply automatic code fixes.
Learn extended project setup for a Flutter BLoC TDD & Clean Architecture project, including theming with Material 3, custom color schemes, fonts, and a generate route with a fade transition.
This is course where we will cover what is clean architecture in detail with step by step example. We will also talk about why it important and how it plays an important role for big projects and how a team can collaborate with their projects if the project is done using clean architecture and how each of the project is dependent.
This course comes in two parts. Students need to buy both parts separately.
Buy the source code from our website to get free access to course using free coupon.
Twitter/Facebook/Instagram/LinkedIn @dbestech
This app cover 100 TDD and detail explanation of Clean Architecture with BLoC, Provider and Cubit
This app uses firebase as backend and chatting. All data is saved in the firebase and the login also happens through firebase. You get notifications in different cases.
You may get notification for joining a group and notification is a new course or exam is uploaded.
There's an admin side of this app, where you may upload courses to firebase and the app reads that immediately. You may upload many exams or courses.
The exam result comes out automatically and immediately. Students can review their result and recheck the test.
You will have a screen video player section which could be fullscreen or half screen. You get to play video from a link or local storage.
Profile center provides name, password and avatar change.
This course also covers dedicated TDD section clear examples. So the first 6 hours of this course we take a look at a dummy app to know about TDD and clean architecture.
Main features
Social login
View course
Join group chat
Auto create group chat
Leave group chat
Upload video from backend
Play video from local storage
Profile center (create, delete, update with image)
Receive notification
Clear notification
Onboarding screen
Firebase integration
Admin panel
Upload exam