Answers for "The method 'signInWithGoogle' isn't defined for the type 'FirebaseAuth'."

0

The method 'signInWithGoogle' isn't defined for the type 'FirebaseAuth'.

Future<FirebaseUser> _handleSignIn() async {
  GoogleSignInAccount googleUser = await _googleSignIn.signIn();
  GoogleSignInAuthentication googleAuth = await googleUser.authentication;
  final AuthCredential credential = GoogleAuthProvider.getCredential(
    accessToken: googleAuth.accessToken,
    idToken: googleAuth.idToken,
  );
  final AuthResult authResult = await _auth.signInWithCredential(credential);
  FirebaseUser user = authResult.user;
  print("signed in " + user.displayName);
  return user;
}
Posted by: Guest on April-26-2020

Code answers related to "The method 'signInWithGoogle' isn't defined for the type 'FirebaseAuth'."

Browse Popular Code Answers by Language