小编Zer*_*ows的帖子

如何使用kotlin数据类获取Firestore文档的文档ID

我有kotlin数据类

data class Client(

    val name: String = "",
    val email: String = "",
    val phone: String ="") {
constructor():this("","","")}
Run Code Online (Sandbox Code Playgroud)

我让firestore将数据填充到类中很好,但是我不知道如何将文档id放入数据类而不必在文档本身中设置它.这可能吗?

android kotlin firebase google-cloud-firestore

11
推荐指数
5
解决办法
1万
查看次数