I had written a post on how to set up Authentication with Firebase in Flutter (see Authentication in Flutter). But Firebase auth has recently released a breaking change with v0.14. Here's how to fix it.

The change is that signInWithCredential used to return a FirebaseUser. Now it returns an AuthResult (see documentation). Here's how to get the user. Old code:

final FirebaseUser user = await auth.signInWithCredential(credential);


New code:

final FirebaseUser user = (await auth.signInWithCredential(credential)).user;


Future<AuthCredential> _signInWithGoogle(