This project is a CRUD (Create, Read, Update, Delete) application built with Flutter and SQFLite. It demonstrates how to integrate a local database solution into a Flutter application while adhering to the MVVM (Model-View-ViewModel) architecture for clean and maintainable code.
The application is configured to run on both mobile devices and desktop platforms, and has been tested on Windows 10.
- Flutter: A UI toolkit from Google for building natively compiled apps for mobile, web, and desktop from a single codebase.
- SQFLite: A lightweight relational database for local data storage in Flutter apps.
- Dart: The programming language used for Flutter development.
- SQL: Used to manage and manipulate data in SQFLite.
- MVVM Architecture: A structured design pattern separating application logic:
- Model: Manages data and database operations using SQFLite.
- ViewModel: Acts as a bridge between the Model and View, handling business logic and preparing data for the UI.
- View: The UI layer responsible for displaying data and interacting with the user.
- Add Data: Create new entries with fields such as name, age, and phone number.
- View Data: Display saved entries in a list format.
- Edit Data: Update existing entries with new information.
- Delete Data: Remove entries from the SQFLite database.
- Persistent Storage: Data remains stored locally even when the app is closed or restarted.
- Reusable Widgets: Modular components for better scalability and code reusability.
The app is designed using the MVVM architecture pattern for better separation of concerns:
- Model: Represents and manages data. Interacts with SQFLite for CRUD operations.
- ViewModel: Processes and prepares data for the View. Bridges user actions with database logic.
- View: Displays the UI and listens for changes in the ViewModel.
Here are some screenshots of the application in action:
To run this project locally:
- Clone the repository:
git clone https://github.com/LukeDevNation/flutter_sqflite_crud_app_tutorial.git