Skip to content

WelcomeFred/flutter_todo_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todo App

A comprehensive Flutter TODO application built with modern architecture and state management.

Features

Core Functionality

  • 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 Management

  • 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

Filtering & Organization

  • 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

User Experience

  • 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

Architecture

State Management

  • 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

Project Structure

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

Data Persistence

  • SharedPreferences: Local storage for task persistence
  • JSON Serialization: Tasks are serialized to JSON for storage
  • Automatic Loading: Tasks are loaded on app startup

Dependencies

  • flutter: Flutter SDK
  • provider: ^6.1.2: State management
  • uuid: ^4.5.1: Unique ID generation
  • shared_preferences: ^2.3.2: Local data persistence
  • cupertino_icons: ^1.0.8: iOS-style icons

Getting Started

Prerequisites

  • Flutter SDK (3.8.1 or higher)
  • Dart SDK
  • Android Studio / VS Code with Flutter extensions

Installation

  1. Clone the repository
  2. Navigate to the project directory
  3. Install dependencies:
    flutter pub get
  4. Run the application:
    flutter run

Usage

Creating Tasks

  1. Tap the floating action button (+) on the home screen
  2. Enter a task title (required)
  3. Optionally add a description
  4. Tap "Save Task"

Managing Tasks

  • 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

Filtering Tasks

  • Use the filter chips at the top to view:
    • All: All tasks
    • Active: Incomplete tasks only
    • Completed: Completed tasks only

Technical Highlights

Clean Code Practices

  • 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

Performance Optimizations

  • Efficient Rebuilds: Provider pattern minimizes unnecessary widget rebuilds
  • Lazy Loading: Tasks are loaded only when needed
  • Memory Management: Proper disposal of controllers and resources

Extensibility

  • 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

Future Enhancements

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

License

This project is created as part of a Flutter challenge and is available for educational purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published