This Todo App helps users keep track of all the tasks they need to complete. It provides a simple interface for creating, viewing, updating, and deleting tasks, with both offline and online capabilities depending on the branch.
- Task Management: Users can add, delete, and mark tasks as completed.
- Lazy Loading & Pagination: Handles large sets of data efficiently by loading tasks incrementally.
- Firebase Integration: Supports individual user accounts with personalized task lists.
- Cross-Platform: Runs on both iOS and Android devices.
The project follows a provider-based architecture for state management, ensuring clean and scalable code. Here's a quick overview:
├── lib
│ ├── Model
│ │ ├── Classes # Defines the Todo model
│ │ └── Providers # TodoProvider handles app state
│ ├── Screens # UI screens such as MainTasksPage and NewTaskPage
│ └── CustomWidgets # Reusable UI widgets
└── README.md
This is the primary branch containing a simple version of the app for managing a list of todos.
In this branch, the app demonstrates handling of paginated data from an API source with lazy loading as the user scrolls, providing an efficient way to manage large sets of tasks.
In this branch, Firebase is integrated to provide user-specific task lists. Each user can:
- Create and view their own tasks.
- Mark tasks as done or delete them.
Firebase handles authentication and data storage, ensuring that each user has access only to their personal data.
To run the app locally:
- Clone the repository:
git clone https://github.com/your-username/todo-app.git cd todo-app
- Install dependencies:
flutter pub get
- Run the app:
flutter run
- Set up a Firebase project in the Firebase Console.
- Enable Firestore Database and Authentication (using Email/Password or Google Sign-In).
- Update the Firestore Security Rules:
service cloud.firestore { match /databases/{database}/documents { match /Todos/{todoId} { allow create, read, update, delete: if request.auth != null && request.auth.uid == resource.data.userId; } match /Users/{userId} { allow create, read, update: if request.auth != null && request.auth.uid == userId; } } }
- Download
google-services.json
(for Android) andGoogleService-Info.plist
(for iOS) from your Firebase project and place them in the appropriate directories in your Flutter project.
Once the app is running:
- Create a new account or log in (if using Firebase).
- Add, complete, or delete tasks from your list.
- Switch branches to explore API-based pagination or Firebase integration.
Here's a demonstration of the main features of each branch:
In this branch, you can see how the app fetches tasks incrementally from an API source as you scroll, supporting lazy loading and pagination.
[API Handling Demo]
apiBranch_todoApp.mp4
This walkthrough showcases the Firebase integration, where each user has a personal task list, and all data is securely stored and retrieved from Firebase.
[Firebase Integration Demo]