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.
| 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 |
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
- 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".
- Open the
PurpleTaskKotlinfolder in Android Studio (Arctic Fox or newer). - Let Gradle sync (it downloads the wrapper + dependencies on first run).
- 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.
- 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/hivelogic from the Flutter app was intentionally omitted for the native rewrite (only the persisted app version flag is kept).