Implementing the Domain Layer
Last updated
Last updated
In this section, we're going to create the necessary Entities, Failures, Repositories and Use Cases as part of our application's Domain Layer.
The following topics will be covered:
Make sure you have followed the Creating the Flutter Project guide.
A. Core Dependencies
We'll import the core dependencies of the project to implement our clean architecture.
B. Creating an Entity
We'll design a class for our Note objects.
C. Creating a Failure
We'll create some Failure objects to represent the possible errors of the note feature.
D. Creating a Repository Interface
We'll make a Repository class for interfacing with the infrastructure layer to manage our notes.
E. Creating Use Cases
We'll create multiple use cases that can be called by the client application to create, fetch or delete notes.