Reputation: 86
I am building a Jetpack Compose 3 application. I have local database which holds information about "sensors". There could be no sensors defined in the database or n number of sensors. The user is able to create new sensors.
The SensorPage.kt displays details of each sensor. I would like the UI to display each sensor as a menu item (NavigationDrawerItem) in a ModalNavigationDrawer.
The problem is each NavigationDrawerItem has to be hard coded and passed to ModalNavigationDrawer at the time of coding. Since these are dynamically loaded from database I have not been able to find a way how to accomplish this.
Any ideas and pointers into the right direction are appreciated.
Upvotes: 1
Views: 182