Replies: 1 comment
-
You can use the .collection('persons')
.where('age', isGreaterThan: 0)
.withConverter<Person>(
fromFirestore: (snapshot, _) => Person.fromJson(snapshot.data()!),
toFirestore: (person, _) => person.toJson(),
); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I have reference type in firestore document and a model class.
I am accessing this data in Flutter application.
DocumentSnapshot<Object?>?
I get this type of return. What should I do to convert it to a class I wrote instead of an Object? -> like this -->DocumentSnapshot<UserModel?>?
I tried to add cast but it didn't work.
Beta Was this translation helpful? Give feedback.
All reactions