šŸ“ Project: To-Do List Manager

šŸ“š Lesson 2: User Input & Interactivity ā± 30-35 min šŸ“Š Intermediate
šŸŽÆ Objective

Create a menu-driven to-do list application that demonstrates loops, lists, user input handling, and CRUD operations (Create, Read, Update, Delete).

Requirements

  1. Display a menu with 5 options: Add, View, Complete, Remove, Exit
  2. Store tasks using a Task class with description and completion status
  3. Add tasks with descriptions (prevent empty tasks)
  4. View all tasks with their status (ā³ Pending or āœ… Completed)
  5. Mark tasks as completed by their list number
  6. Remove tasks from the list
  7. Show task statistics (completed vs pending count)
  8. Loop until user chooses to exit

Expected Output

Terminal
╔══════════════════════════╗
ā•‘   To-Do List Manager     ā•‘
ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•

1. āž• Add Task
2. šŸ‘€ View Tasks
3. āœ… Complete Task
4. šŸ—‘ļø  Remove Task
5. 🚪 Exit

Choose an option (1-5): 1
Enter task description: Learn Dart programming
āœ… Task added! Total tasks: 1

Choose an option (1-5): 1
Enter task description: Build a CLI app
āœ… Task added! Total tasks: 2

Choose an option (1-5): 2

--- Your Tasks ---
1. ā³ Pending | Learn Dart programming
2. ā³ Pending | Build a CLI app

šŸ“Š Completed: 0 | Pending: 2

Step-by-Step Hints

šŸ’” Hint 1: Task Class

Create a Task class with description (String) and isCompleted (bool) properties. Override toString() for clean display.

šŸ’” Hint 2: Input Validation

Always check if the task list is empty before viewing, completing, or removing. Check for valid numbers when user selects a task to modify.