'Firebase Realtime Database to Jetpack Compose's LazyColumn

I am creating an app using Jetpack Compose library in Android. I am using Firebase Realtime Database to retrieve and show data to the users. I have already created the database in firebase console. Now, I want to retrieve that data and show it as LazyColumn in my layout. The database only has names as string. I have watched many videos and seen many posts on how to achieve this, however they all show examples of retrieving data from Firestore. None of them show how to retrieve data from realtime database. So my question is, how to retrieve the names from realtime database and show them as LazyColumn in the app?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source