
Explore clean architecture in a Flutter app and why it matters for medium to large projects. Discover how presentation, domain, and data layers enable modular, testable code and scalable structure.
Build a Flutter app UI using clean architecture, featuring a searchable news list from the News Corp API, interactive cards, and a detailed news view with navigation.
Define the News Info entity in the domain layer of a clean architecture Flutter app, modeling nullable fields for title, author, image, and content, with a required published date.
Explore the Get It package for dependency injection and service locator patterns in a Flutter app, helping manage object creation across a clean architecture.
Set up domain layer with use cases and repositories, including a fetch news use case, a fetch repo contract, define Failure and fetch failure, and use Dart's either for errors.
Create a new info model in the data layer extending NewsInfo. Implement fromMap to convert JSON data to the model and a getDateTime helper to parse the API date string.
Learn to implement data sources and repositories in a lean Flutter architecture, creating remote data sources and API service contracts, with fetch error handling and mapping to news info models.
Develop a Flutter clean architecture api service using http to fetch and decode json, handle errors, and register services with a service locator for remote data sources.
Learn bloc and cubit state management in a clean architecture flutter app by building a text feature with loading and done states using bloc builder and cubit.
Learn to implement bloc and cubit state management in a Flutter app by wiring news data use cases to a responsive UI with loading and error states and search.
Showcases testing the modularity of clean architecture in a Flutter app by swapping the HTTP package with Dial, registering Dial before the API service, enabling minimal changes.
Clean Architecture is the blueprint for a modular system, which strictly follows the design principle called separation of concerns. More specifically, this style of architecture focuses on dividing software into layers, to simplify the development and maintenance of the system itself. When layers are well-separated, individual pieces can be reused, as well as developed and updated independently.
In this course you will make an entire application from scratch using Clean Architecture and Bloc and Cubit state management. You will also incorporate REST API using two different packages Http and Dio. And you will learn about Dependency Injection and how to make it simple using get_it package. You will learn about file structure of a real world application and how to make your code scalable and modular.
The clean architecture will divide the Flutter project into 3 main layers, namely:
Presentation Layer
The presentation layer consists of the code to access the data of the app from a repository. Also, there is the code for state management such as providers, BLoC, and so on.
Domain Layer
The domain layer is the deepest in the clean architecture. This layer contains the code for business logic applications such as entities and use cases.
Data layer
The data layer is located at the outermost layer. This layer consists of data source code such as consume Rest API, access to the local database, Firebase, or other sources. Also, on this layer, there is usually the platform code that builds up the UI (widgets).