Update an existing document in Firebase Cloud Firestore Database from a Jetpack Compose UI

preview_player
Показать описание
Start with an existing document in a Firebase Cloud Firestore Database, and update it from a Jetpack Compose UI. I show some of the tricks I've already implemented, such as listening to changes in Firebase, storing a document ID from Firebase into a Kotlin data class object, show the data from this object in a Jetpack compose screen, saving, determining when to insert new versus update existin, and more. I show this in the debugger, so we can watch it at our own pace and look at attribute values, and in real time, so we can see how quickly our application and Firebase synchronize.
Рекомендации по теме
Комментарии
Автор

Thanks, I appreciate that you're using a viewmodel because most resources concerning firebase I see on youtube have all the logic in the UI and it makes it hard to follow.

soulysouly
Автор

how to update selectedSpecimen variable if the save button is inside a component which is a separate class?

vikag