Skip to content

gKaustubh13/todo_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To-Do Local Database

A Flutter application for managing tasks with local SQLite database storage. The app provides comprehensive task management with filtering, sorting, and search capabilities.

Features

  • CRUD Operations: Create, read, update, and delete tasks
  • Local Storage: SQLite database for offline data persistence
  • Search: Find tasks by title
  • Priority Management: Organize tasks with Low, Medium, High priority levels
  • Filtering: Filter tasks by priority
  • Sorting: Sort by creation date or last updated date (ascending/descending)
  • Recently Deleted: View and restore deleted tasks
  • Dark Theme: Modern UI with Google Fonts

Usage

Creating Tasks

  1. Tap the floating action button
  2. Enter task title (required, minimum 4 characters)
  3. Add optional description (up to 300 characters)
  4. Select priority level
  5. Save the task

Managing Tasks

  • View: Tap on any task to see details
  • Edit: Use the menu in task detail view
  • Delete: Tasks are moved to "Recently Deleted"
  • Search: Use the search bar to find tasks by title
  • Filter: Select priority chips to filter tasks
  • Sort: Use dropdown to change sorting options

Recently Deleted

Access through the main screen menu to:

  • View deleted tasks
  • Restore tasks back to active list
  • Permanently delete tasks

Architecture

The project follows a clean architecture pattern with feature-based organization:

lib/
├── application.dart                 # Main app configuration
├── main.dart                       # App entry point
├── core/
│   └── database/
│       └── local_database.dart     # SQLite database initialization
└── features/
    ├── todo/                       # Main todo functionality
    │   ├── model/                  # Data models and enums
    │   ├── service/                # Database operations
    │   ├── view/                   # UI screens and widgets
    │   ├── view_model/             # State management (Provider)
    │   └── utils/                  # Constants and utilities
    └── recently_deleted/           # Recently deleted functionality
        ├── service/                # Database operations for deleted items
        ├── view/                   # UI for recently deleted items
        └── view_model/             # State management

Database Schema

The application uses SQLite with the following table structure:

CREATE TABLE Todos (
  id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
  title TEXT NOT NULL,
  description TEXT,
  completed INTEGER NOT NULL,
  priority TEXT NOT NULL,
  createdAt INTEGER NOT NULL,
  updatedAt INTEGER,
  deletedAt INTEGER
);

Dependencies

Main Dependencies

  • flutter: UI framework
  • sqflite: SQLite database for Flutter
  • provider: State management
  • google_fonts: Custom typography
  • intl: Date formatting and internationalization
  • equatable: Value equality for Dart classes
  • dartz: Functional programming utilities
  • cupertino_icons: iOS-style icons

Dev Dependencies

  • flutter_test: Testing framework
  • flutter_lints: Dart linter rules

About

todo crud app using provider state management and sqlite database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors