A comprehensive Flutter TODO application built with modern architecture and state management.
- ✅ Create Tasks: Add new tasks with title and description
- ✅ Read Tasks: View all tasks in a clean, organized list
- ✅ Update Tasks: Edit existing tasks and toggle completion status
- ✅ Delete Tasks: Remove individual tasks or bulk delete completed tasks
- Task Properties: Each task has a unique ID, title, description, and completion status
- Task States: Tasks can be either "active" (incomplete) or "completed"
- Timestamps: Automatic creation and update timestamps for each task
- Quick Filtering: Filter tasks by All, Active, or Completed status
- Task Statistics: View counts of total, active, and completed tasks
- Visual Indicators: Clear visual distinction between completed and active tasks
- Modern UI: Clean, Material Design 3 interface
- Responsive Design: Optimized for mobile devices
- Local Storage: Tasks persist between app sessions using SharedPreferences
- Confirmation Dialogs: Safe deletion with confirmation prompts
- Snackbar Feedback: User-friendly success and error messages
- Provider Pattern: Uses the Provider package for efficient state management
- ChangeNotifier: TaskProvider extends ChangeNotifier for reactive updates
- Separation of Concerns: Clear separation between UI and business logic
lib/
├── main.dart # App entry point and theme configuration
├── models/
│ ├── task.dart # Task data model with JSON serialization
│ └── task_filter.dart # Filter enum and extensions
├── providers/
│ └── task_provider.dart # State management for tasks
├── screens/
│ ├── home_screen.dart # Main screen with task list
│ ├── add_task_screen.dart # Screen for creating new tasks
│ └── edit_task_screen.dart # Screen for editing existing tasks
└── widgets/
├── task_list.dart # List widget for displaying tasks
├── task_tile.dart # Individual task display widget
├── filter_chips.dart # Filter selection chips
└── task_stats.dart # Statistics display widget
- SharedPreferences: Local storage for task persistence
- JSON Serialization: Tasks are serialized to JSON for storage
- Automatic Loading: Tasks are loaded on app startup
flutter: Flutter SDKprovider: ^6.1.2: State managementuuid: ^4.5.1: Unique ID generationshared_preferences: ^2.3.2: Local data persistencecupertino_icons: ^1.0.8: iOS-style icons
- Flutter SDK (3.8.1 or higher)
- Dart SDK
- Android Studio / VS Code with Flutter extensions
- Clone the repository
- Navigate to the project directory
- Install dependencies:
flutter pub get
- Run the application:
flutter run
- Tap the floating action button (+) on the home screen
- Enter a task title (required)
- Optionally add a description
- Tap "Save Task"
- Toggle Completion: Tap the checkbox next to any task
- Edit Task: Tap on a task or use the menu to edit
- Delete Task: Use the menu (⋮) to delete individual tasks
- Bulk Delete: Use the delete icon in the app bar to remove all completed tasks
- Use the filter chips at the top to view:
- All: All tasks
- Active: Incomplete tasks only
- Completed: Completed tasks only
- Comprehensive Comments: Well-documented code with clear explanations
- Type Safety: Strong typing throughout the application
- Error Handling: Proper error handling with user feedback
- Validation: Input validation for task creation and editing
- Efficient Rebuilds: Provider pattern minimizes unnecessary widget rebuilds
- Lazy Loading: Tasks are loaded only when needed
- Memory Management: Proper disposal of controllers and resources
- Modular Design: Easy to add new features or modify existing ones
- Separation of Concerns: Clear boundaries between different layers
- Reusable Components: Widgets are designed for reusability
Potential features that could be added:
- Task categories/tags
- Due dates and reminders
- Task priorities
- Search functionality
- Dark mode theme
- Task sharing/export
- Cloud synchronization
This project is created as part of a Flutter challenge and is available for educational purposes.