Codenic Clean Architecture
  • Introduction
  • The Clean Architecture
    • Presentation Layer
    • Domain Layer
    • Infrastructure Layer
  • Tutorial
    • Overview
    • Creating a Flutter Modular Project
      • Tips for Managing a Modular Project
    • Implementing the Domain Layer
      • Core Dependencies
      • Creating an Entity
      • Creating a Failure
      • Creating a Repository Interface
      • Creating Use Cases
        • CRUD Operations (Runner)
        • Data Streams (Watcher)
    • Implementing the Infrastructure Layer
      • External Dependencies
      • Creating a Data Model
      • Creating a Data Source
      • Implementing a Repository
    • Implementing the Presentation Layer
      • External Dependencies
      • Dependency Injection and Service Locator
      • Widgets
        • Snackbar Handler
        • Global Blocs Widget
        • Note Widgets
  • Packages
    • Codenic Bloc Use Case
      • Runner
      • Watcher
    • Codenic Logger
      • Usage
      • Example
      • Modifying the Logger
      • Integrating Firebase Crashlytics to the logger
    • Codenic Exception Converter
      • Failure Object
      • Exception Converter
      • Exception Converter Suite
      • Example
Powered by GitBook
On this page
  1. Tutorial

Implementing the Domain Layer

PreviousTips for Managing a Modular ProjectNextCore Dependencies

Last updated 2 years ago

In this section, we're going to create the necessary , , and as part of our application's .

The following topics will be covered:

Before you begin

  • Make sure you have followed the guide.

Domain Layer

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.

Creating the Flutter Project
Entities
Failures
Repositories
Use Cases