This repository provides the answer key for Challenge 2 in the Beginner Challenge Course by the App Department at Developer Club.
The challenge is structured in the following steps:
- Build a basic todo list using
ListView.builderand a simple list. - Upgrade the todo list to use a
StreamwithListView.builder, aStreamController, and a list. - Implement a todo list backed by a mock database using the JSON file at
../assets/mock_db.json(outside thelibdirectory). - Develop a todo list with a mock database using Riverpod and a complete MVVM architecture, following the Flutter documentation.
Use this answer key to review your solutions and learn the recommended approaches for each step.
To keep things straightforward, the UI is intentionally minimal. While using Riverpod and MVVM for a simple todo CRUD app may seem excessive, this project serves as a useful local reference for future projects. You can also use this lightweight codebase to experiment with Flutter features such as testing and dependency injection.
After cloning this repository, follow these steps to set up and run the project:
-
Install dependencies:
flutter pub get
-
Configure Firebase:
- Sign in to the Firebase Console using your Google account.
- Contact the head lead developer (Fall 2025: Khang) to be added to the challenge's Firestore project.
- Follow the FlutterFire documentation to complete the Firebase setup for your platform (Android/iOS/Web). This typically involves running the following command to configure your Flutter app:
sh firebase login dart pub global activate flutterfire_cli flutterfire configure (the project name only appear when you've been added by head lead dev, project currently only configure for ios and android, add more if needed) flutter pub add firebase_core flutterfire configure- For more details, refer to the FlutterFire CLI documentation.
-
(Optional) Check for outdated packages:
flutter pub outdated
-
Run the app:
flutter run
-
Run tests (if available):
flutter test
Note:
This project uses packages such asriverpod,flutter_riverpod, andcloud_firestore. All dependencies are managed inpubspec.yamland will be installed withflutter pub get.
If you encounter issues, ensure you have the latest stable version of Flutter installed and that your Firebase configuration is complete. For more details, see the Flutter installation guide and FlutterFire documentation.sh flutter pub get
-
(Optional) Check for outdated packages:
flutter pub outdated
-
Run the app:
flutter run
-
Run tests (if available):
flutter test
Note:
This project uses packages such asriverpod,flutter_riverpod, and others. All dependencies are managed inpubspec.yamland will be installed withflutter pub get. (when you start with riverpod, you don't have to run the 5 flutter pub gets in their documents because I already did it)
If you encounter issues, ensure you have the latest stable version of Flutter installed. For more details, see the Flutter installation guide.