A simple note-taking application built with Flutter. This project makes use of best practices for Flutter architecture, state management, and API integration.
The Flutter Notes App allows users to create, view, and delete notes. Each note consists of a title and a description. The application is designed with a focus on a maintainable and scalable architecture.
In order to demonstrate error handling, the app includes a simulated API that has latency and can return errors a percentage of the time.
The application implements the following core functionalities across a minimal set of screens:
-
View a list of notes:
NotesListPage: Displays all existing notes.- Handles and displays loading, error, and empty states.
-
Create a new note:
- Users can navigate from the
NotesListPageto anAddEditNotePage. AddEditNotePage: Provides input fields for a note's title and description.
- Users can navigate from the
-
Delete a note:
- Functionality to delete notes is available directly from the
NotesListPage.
- Functionality to delete notes is available directly from the
This project implements Clean Architecture principles to ensure a separation of concerns, making the application more testable, maintainable, and scalable. The architecture is divided into three main layers:
-
Presentation Layer:
- Responsible for the UI and user interaction.
- Uses BLoC (Business Logic Component) for state management, handling events from the UI and emitting states to be rendered.
- Contains Widgets, Pages (Screens), and BLoCs.
-
Domain Layer:
- Contains the core business logic and rules of the application.
- Includes Entities (business objects, e.g.,
Noteentity), Use Cases (application-specific business rules, e.g.,GetAllNotes,CreateNote), and Repository Contracts (abstract interfaces for data operations). - This layer is independent of any framework or infrastructure details.
-
Data Layer:
- Responsible for data retrieval and storage.
- Includes Repository Implementations (concrete implementations of the domain layer's repository contracts), Data Sources (which can be remote like an API or local like a database/mocked data), and Models (data transfer objects that might include serialisation logic, e.g.,
NoteModel). - API calls (Fetch all notes, Create/update a note, Delete a note) are mocked in this layer using
Future.delayed.
Dependency Injection: get_it is used to manage dependencies between layers and components.
To run this project, you need to have the following installed:
- Flutter SDK
To run the Flutter Notes App, follow these steps:
-
Clone the repository:
git clone
-
Navigate to the project directory:
cd flutter_notes -
Install dependencies:
flutter pub get
-
Generate the necessary files:
dart run build_runner build --delete-conflicting-outputs OR flutter pub run build_runner build --delete-conflicting-outputs -
Run the application:
flutter run
To run tests, use the following command:
flutter test- Implement persistent storage for notes (e.g., using SQLite or shared preferences).
- This can be achieved by updating the remote data source. The layered architecture allows for easy integration of a local database without affecting the existing code structure.
- Add unit tests for the
notes_list_page,note_cardandinjection_container. - Add internationalisation support and move all strings to an
.arbfile. - Add GitHub Actions to run tests and dart analyse on every push.
- Add swipe to refresh functionality on the
NotesListPage.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Thanks to Reso Coder for the architecture diagram and the Clean Architecture principles used in this project.
Sticky Note free icon designed by Freepik from Flaticon. Generated for all platforms using flutter_launcher_icons









