flutter_todos is a simple and intuitive to-do list application built using Flutter. This project demonstrates the use of Flutter to create a cross-platform application that runs on Android, iOS and desktop platforms. The project utilizes the BLoC pattern for state management, Drift for persistence built on top of SQLite and the Freezed library for immutable data classes.
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of Flutter
- You have a running emulator or a physical device connected
- For Android development:
- Install Android Studio
- Set up the Android emulator or connect an Android device
- For iOS development:
- Install Xcode
- Set up the iOS simulator or connect an iOS device
- For Windows development:
- Install the Visual Studio with the "Desktop development with C++" workload
- For macOS development:
- Install the latest version of Xcode
- For Linux development:
- Ensure you have the necessary dependencies installed (e.g., GTK, Glib)
- Clone the repository:
git clone https://github.com/andmalt/flutter_todos.git
- Navigate to the project directory:
cd flutter_todos - Install the dependencies:
flutter pub get
To run the application on your desired platform, use the following commands:
- For Android:
flutter run
- For iOS:
flutter run
- For Windows:
flutter run -d windows
- For macOS:
flutter run -d macos
- For Linux:
flutter run -d linux
lib/: Main directory containing the source code of the application.main.dart: The main entry point of the application where the app is initialized.core/: Manages the configuration and initialization of application services.blocs/: It contains the BLoC (Business Logic Component) classes responsible for managing state and presentation logic, facilitating the separation of business logic and user interface.data/: Manages data access and management. Includes:models/: Contains the data models used in the application.repositories/: Concrete implementations of repositories that provide methods for accessing data from different sources.datasources/: External or local data sources, such as REST APIs or SQLite databases.
domain/: Contains the business logic of the application. Includes:entities/: Classes representing the fundamental entities of the domain.repositories/: Interfaces that define contracts for data access, implemented in thedatalayer.usecases/: Use cases that encapsulate specific business operations or application functionality.
presentation/: Manages user interface and data presentation. Includes:pages/: Pages of the application that representing different views.widgets/: Reusable UI components within pages.