Skip to content

Instantly share code, notes, and snippets.

@horgag1
Created April 4, 2019 15:57
Show Gist options
  • Save horgag1/ec7ddbd209f9988ae62efdc27555d46f to your computer and use it in GitHub Desktop.
Save horgag1/ec7ddbd209f9988ae62efdc27555d46f to your computer and use it in GitHub Desktop.
class _ListPageState extends State<ListPage> {
Future<DocumentReference> getPosts() async {
final FirebaseAuth _auth = FirebaseAuth.instance;
final Firestore _firestore = Firestore.instance;
FirebaseUser user = await _auth.currentUser();
DocumentReference ref = _firestore.collection('users').document(user.uid);
return ref;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment