I have a working google sign in and sign out learn from the tutorial
but I don't know how to access it from another class. I want user profile picture from the login screen to home screen.
_googleSignIn.signIn().then((result) {
result.authentication.then((googleKey) {
FirebaseAuth.instance
.signInWithGoogle(
idToken: googleKey.idToken,
accessToken: googleKey.accessToken)
.then((signedInUser) {
print(
'Signed in as ${signedInUser.displayName} ${signedInUser.photoUrl}');
widget.onSignIn();
}).catchError((e) {
print(e);
}).catchError((e) {
print(e);
}).catchError((e) {
print(e);
});
});
});
this is my code for sign in I want to access signedInUser.displayName from another class as well as signedInUser.photourl