Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit df90b30

Browse files
thatfiredevsamtstern
authored andcommitted
refactor: use Kotlin Map on the update_document_nested snippet (firebase#97)
1 parent db90a35 commit df90b30

File tree

1 file changed

+4
-4
lines changed
  • firestore/app/src/main/java/com/google/example/firestore/kotlin

1 file changed

+4
-4
lines changed

firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,10 @@ abstract class DocSnippets(val db: FirebaseFirestore) {
355355
//
356356
// To update age and favorite color:
357357
db.collection("users").document("frank")
358-
.update(
359-
"age", 13,
360-
"favorites.color", "Red"
361-
)
358+
.update(mapOf(
359+
"age" to 13,
360+
"favorites.color" to "Red"
361+
))
362362
// [END update_document_nested]
363363
}
364364

0 commit comments

Comments
 (0)