So i am trying to retrieve data from my firestore document which is an email I am not understanding how i can save the data as a string when i retrieve it from firestore. help pls.
Getting error: type 'Future is not subtype of type 'String' on result: getEmail() Ps: im new to flutter my code:
getEmail() async{
String _email = (await FirebaseAuth.instance.currentUser()).email;
return _firestore.collection('users').document(_email).collection('met_with').document('email').get();
}
...
children: <Widget>[
BottomSheetText(question: 'Email', result:getEmail()),
SizedBox(height: 5.0),
....