Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Map<String, dynamic> userDetails = {};
- Future<Null> getUser() async {
- await Firestore.instance
- .collection('users') // Your Collections Name
- .document(currentUserId) // Your user Document Name
- .get()
- .then((val) {
- userDetails.addAll(val.data);
- }).whenComplete(() {
- print('Data Fetched');
- setState(() {});
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement