I have successfully retrieved the user email and name from Firebase Auth. But i want to display this in the Flutter Drawer
Name and Email retrieval:
Future<FirebaseUser> _handleSignIn() async {
final GoogleSignInAccount googleUser = await _googleSignIn.signIn();
final GoogleSignInAuthentication googleAuth = await googleUser.authentication;
final AuthCredential credential = GoogleAuthProvider.getCredential(
accessToken: googleAuth.accessToken,
idToken: googleAuth.idToken,
);
final FirebaseUser user = await _auth.signInWithCredential(credential);
print("signed in " + user.displayName);
print("signed in " + user.email);
return user;
}
Flutter Drawer:
drawer: new Drawer(
elevation: 10.0,
child: new ListView(
children: <Widget>[
new UserAccountsDrawerHeader(
accountName: new Text("Name"), //I want to display user NAME here
accountEmail: new Text("Email"), //display user EMAIL here
decoration: new BoxDecoration(
image: new DecorationImage(
fit: BoxFit.fill,
image: new NetworkImage(
"https://img00.deviantart.net/35f0/i/2015/018/2/6/low_poly_landscape__the_river_cut_by_bv_designs-d8eib00.jpg"))),
),