Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. Future<void> _getUserDoc() async {
  2. final FirebaseAuth _auth = FirebaseAuth.instance;
  3. final Firestore _firestore = Firestore.instance;
  4.  
  5. FirebaseUser user = await _auth.currentUser();
  6. setState(() {
  7. userRef = _firestore.collection('users').document(user.uid);
  8. });
  9. }
  10.  
  11. USERS
  12. -user1 (current user)
  13. -name: John
  14. -age: 20
  15. --FRIENDS
  16. ----user2id
  17. ----user3id
  18.  
  19. -user2
  20. -name: Richie
  21. -age: 20
  22. --FRIENDS
  23. ----user3id
  24.  
  25. Padding(
  26. padding:
  27. const EdgeInsets.only(left: 20.0, right: 20.0, top: 10.0),
  28. child: Text(
  29. 'Richie',
  30. style: TextStyle(
  31. fontFamily: 'Montserrat',
  32. fontWeight: FontWeight.bold,
  33. fontSize: 17.0),
  34. ),
  35. ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement