Overview
While the codebase includes aTeamService class, task-related functionality is typically integrated within the team management system. This document covers task management patterns and data structures used in the application.
Note: Based on the source code analysis, explicit task service methods were not found in the task_service.dart file. This documentation describes the expected task management patterns based on the team service structure.
Task Data Structure
Firestore Collection
Tasks are stored in atasks subcollection under each team document:
Task Document Schema
The task title or summary
Detailed description of the task
Current task status. Common values:
"pending", "in_progress", "completed", "cancelled"Firebase Auth UID of the user assigned to this task
Firebase Auth UID of the user who created the task
Server-generated timestamp when the task was created
Timestamp of the last update to the task
Optional due date for task completion
Task priority level:
"low", "medium", "high", "urgent"Reference to the parent team document ID
Task Creation Workflow
Creating a Task
Based on the TeamService pattern, task creation would follow this structure:Example Usage
Task Retrieval
Getting Team Tasks
Retrieve all tasks for a specific team in real-time:Example Usage with StreamBuilder
Getting User’s Assigned Tasks
Retrieve tasks assigned to the current user across all teams:Task Status Management
Updating Task Status
Status Values
Task has been created but not started
Task is currently being worked on
Task has been completed successfully
Task has been cancelled and will not be completed