I try to read data from Firestore directly on MyClass format. It works fine when I read variable by variable but I wish to read directly the whole class. When doing this:
docRef.get().addOnSuccessListener { documentSnapshot ->
(this.application as MyApp).value = documentSnapshot.toObject<MyClass>()
}
I have this error
Type mismatch: inferred type is MyClass? but MyClass was expected
Any idea?