Cloud firestore 2.x
Closed this issue · 3 comments
damda58 commented
zeusbaba commented
hello @damda58 ,
here is a code snippet you can adapt for your need. let me know if that helps or if you have any further questions.
// this is the snap data you get from firestore
...utilisateur...
Map<String, dynamic> snapData = utilisateur.exists ? utilisateur.data() : Map();
// now you can read any value from snapData for it is a Map
// for example
snapData.containsKey('id') ? snapData['id'] as String : '';
damda58 commented
Thanks a lot for your help ! it works wonderfully
zeusbaba commented
sounds good, you welcome