This document provides context for the Gemini code assistant to understand the todo_app project.
This is a Flutter project for a todo application. It uses Firebase for backend services, specifically Firestore to store the todo tasks. The project is connected to the Firebase project with the ID genai-workshop-fe4e0. The todo tasks are stored in a Firestore collection named todos.
The application supports Android, iOS and Web.
- Add new tasks to the todo list.
- Swipe a task to the right to mark it as complete.
- Swipe a task to the left to delete it (with a confirmation dialog).
- Completed tasks are displayed with a strikethrough text style.
To add your Flutter project to Firebase, use the flutterfire CLI.
-
Install FlutterFire CLI: If you haven't already, install the FlutterFire CLI:
dart pub global activate flutterfire_cli
-
Configure Firebase Project: Run the following command in your project root to configure Firebase for your Flutter app:
flutterfire configure --project=genai-workshop-fe4e0
This command will guide you through selecting platforms (Android, iOS, Web, Windows, etc.) and automatically generate the necessary configuration files (e.g.,
lib/firebase_options.dart). -
Verify Configuration: Ensure that
lib/firebase_options.darthas been generated with your project-specific configurations.
To build the project, run the following command:
flutter buildTo run the project, use the following command:
flutter runYou can also specify a target platform:
flutter run -d <platform>Replace <platform> with android, ios, or web.
To run the tests, use the following command:
flutter testThis project follows the standard Flutter and Dart conventions.
- The main application entry point is
lib/main.dart. - The main UI for the todo list is in
lib/pages/todos.dart. - Tests are located in the
testdirectory. - Dependencies are managed in
pubspec.yaml. - The project uses
flutter_lintsfor code analysis, with rules configured inanalysis_options.yaml. - The project uses Firebase for backend services, with Firestore as the database.
- The Firebase project ID is
genai-workshop-fe4e0. - The Firestore collection for todos is
todos.