A CRUD app displays a user's medication and alerts them when a prescription needs to be refilled.
This app allows you to create, read, update, and display data about a medication. This includes the name, dose, pill count, and refill date. Currently has three main screens: Landing, Add/Edit, and Settings. There are two other planned screens: Calendar and Medication.
Includes:
- A Centre Aligned Top App Bar, with Calendar and Setting icons on either side
- A "textbox" with plant images on either side and text in the middle that reads, "Welcome
Username
!"- Username is set in settings saved to a repository using DataStore
- Two separate tables that display medication & dosage, and dates to order refills of each medication
- Both have vertical scroll to ensure the data can fit on the screen.
Includes:
Textfields
, with appropriate labels,imeAction
s, keyboard actions, and options- Use of state management to save user-entered data
- Also uses Dao functions to add and update data in the app's Room Database
- Logic that calculates when the last of the entered medication will be used
- Using
LocalDate
functions
- Using
- Uses a nullable parameter to change the screen from Add to Edit Medication, which has the
Textfields
prefilled with the data to be edited
- Allows users to set and store their username, to be displayed on the Landing Screen
- Data persists throughout the entire lifecycle of the app
- Allows users to change the theme of the app between light and dark mode
- Uses the
Switch
composable, with thethumbContent
set to an icon of a pill - Theme changes are handled through the ThemeViewModel, the state of which is collected in the
setContent
function of theMainActivity
- Uses the
- Will allow users to toggle notifications on / off
- MVVM Design Pattern: The application follows the Model-View-ViewModel (MVVM) design pattern, ensuring a clean and maintainable code structure.
- Compose Navigation and ViewModels: Utilizing Jetpack Compose for UI and navigation, along with ViewModels for managing UI-related data, the application offers a modern and efficient development approach.
- Room was used to make and use the Medication Database