returnData method
Implementation
Future<Map<String, dynamic>> returnData() async {
//return the data associated with the user
Map<String, dynamic> data;
data = null;
Future<DocumentSnapshot> userRef = _userCollection.document(usid).get();
await userRef.then((DocumentSnapshot ds) {
//print(ds.data);
data = ds.data;
}).catchError((e) {
print("Error Found: $e"); //Prints the error
return null;
});
return data;
}