Advertisement
Guest User

Untitled

a guest
Oct 31st, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.39 KB | None | 0 0
  1.  
  2.   Map<String, dynamic> userDetails = {};
  3.  
  4.   Future<Null> getUser() async {
  5.     await Firestore.instance
  6.         .collection('users') // Your Collections Name
  7.         .document(currentUserId)  // Your user Document Name
  8.         .get()
  9.         .then((val) {
  10.       userDetails.addAll(val.data);
  11.     }).whenComplete(() {
  12.       print('Data Fetched');
  13.       setState(() {});
  14.     });
  15.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement