// this query gets a stream of user records and deserialize it
// to a stream of UserRecord object
FirebaseFirestore.instance.collection('users')
.where('uid', isEqualTo: FirebaseAuth.instance.currentUser!.uid)
.snapshots()
.map((e) =>
UserRecord.fromJson(e.docs.first.data() as Map<String, dynamic>))