We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4a1ba94 + 8997766 commit 25357a0Copy full SHA for 25357a0
README.md
@@ -93,7 +93,13 @@ You can also omit the serializer but this is discouraged due to a [current limit
93
94
```kotlin
95
@Serializable
96
-data class Post(val timestamp: Double = ServerValue.TIMESTAMP)
+data class Post(
97
+ // In case using Realtime Database.
98
+ val timestamp: Double = ServerValue.TIMESTAMP,
99
+ // In case using Cloud Firestore.
100
+ val timestamp: Double = FieldValue.serverTimestamp,
101
+)
102
+
103
```
104
105
<h3><a href="https://kotlinlang.org/docs/reference/functions.html#default-arguments">Default arguments</a></h3>
0 commit comments