Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purple Task (Kotlin / Android)

This is a native Android port of the original Flutter "Purple Task" TO-DO app, written in Kotlin with Jetpack Compose. It replicates the Dart app's features (categories, tasks, completion progress, drag-to-reorder, light/dark theme, settings, about) using the standard Android Jetpack stack.

Tech stack mapping (Dart → Kotlin)

Dart (Flutter) Kotlin (Android) equivalent
drift (Room-like DB) Room (AppDatabase, DAOs, entities)
riverpod controllers ViewModel + StateFlow
shared_preferences DataStore (Preferences)
ReorderableListView sh.calvin.reorderable ReorderableLazyList
url_launcher Intent.ACTION_VIEW (UrlHelper)
Material widgets Jetpack Compose Material 3
flutter_staggered_... Compose animations / LazyColumn

Project structure

app/src/main/java/com/purpletask/
├── MainActivity.kt                 # NavHost + theme + redirect (welcome → main)
├── PurpleTaskApplication.kt        # Holds the Room database instance
├── data/
│   ├── local/                      # TaskEntity, CategoryEntity, DAOs, AppDatabase
│   ├── repository/                 # TaskRepository, CategoryRepository
│   └── settings/SettingsDataStore  # DataStore-backed user settings
├── domain/
│   ├── model/SettingsState.kt
│   └── util/                       # Constants, TimeConverter, UrlHelper
├── viewmodel/                      # Category, Task, Settings, NewCategory ViewModels
└── ui/
    ├── theme/                      # PurpleTaskTheme + category icon set
    ├── main/MainScreen.kt          # Category list + drag reorder + FAB
    ├── category/                   # Category detail (tabs) + TaskItem + AddTaskField
    ├── newcategory/                # 4-step new-category flow
    ├── settings/SettingsScreen.kt
    ├── about/AboutScreen.kt
    └── welcome/WelcomeScreen.kt

Data model

  • Category: id, name, color (ARGB int), icon (index into icon set), position
  • Task: id, name, description?, isDone, categoryId, createdAt, dueDate?, doneAt?, position

Tasks with categoryId == 0 are "uncategorized".

Build & run

  1. Open the PurpleTaskKotlin folder in Android Studio (Arctic Fox or newer).
  2. Let Gradle sync (it downloads the wrapper + dependencies on first run).
  3. Select a device/emulator and press Run.

The project targets compileSdk 34, minSdk 24, and uses Kotlin 1.9.24 with the Compose compiler 1.5.14.

Notes

  • The original Drift schema migrations (added created_at, position, done_at, due_date) start at database version 4 here, so a fresh install needs no runtime migration.
  • Existing Drift/Hive data is not migrated automatically; the legacy migrator/hive logic from the Flutter app was intentionally omitted for the native rewrite (only the persisted app version flag is kept).

About

Kotiln version of https://github.com/mivoligo/purple_task

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages