To-Do and time tracking app with day planning and suggestions of what to do next when there is overwhelming choices
- Kotlin 100%
| app | ||
| gradle | ||
| .gitignore | ||
| build.gradle.kts | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| settings.gradle.kts | ||
JustWantSomethingToDo
To-Do and time tracking app with day planning and suggestions of what to do next when there is overwhelming choices
Development
Style and Best Practices
Composables
- Name something that is a navigation route that controls the whole screen with the suffix
Screen.- Example:
RoutinesScreen - The screen composable should only contain a scaffold that adds top/bottom bars, and contains
a child defined in the same file without the
Screensuffix that defines the main content. - The arguments should be ordered with the main content first, then top bar, bottom bar, and floating action button, with modifier last as the only optional argument.
- Example:
- Composable components should have most arguments be optional with suitable defaults for previews.
- Order arguments in the order they are used in the UI layout.
- Order file with
Screencomposable first, then the related main content, followed by any related components, with top bar, bottom bar, and floating action button last. - Generally pass all composable arguments like
name = valueinstead of positional arguments.- Exception is Text that should be just called like
Text("text")if there are no additional arguments.
- Exception is Text that should be just called like
- Preview should have the background turned on in most cases and be 600 dp wide by 400 dp tall.
Naming
- Name lambdas passed to children for navigating as
navRoutewhereRouteis the name of the route in the navigation graph without theRoutesuffix, or a suitable descriptive alternative if the destination is not just a simple destination route.- Example:
navAddToDoto navigate to form to add a to-do.
- Example:
- Name lambdas that will take an action without a prefix.
- Example:
addToDoto submit the data for a new to-do.
- Example:
- Use the
onprefix for other lambdas that are passed down to children composeables that respond to an action being taken.- Example:
onAddedToDoto take action after a to-do is added.
- Example: