I'm getting an error “Error type 'AuthResult' is not a subtype of type 'FirebaseUser' in type cast” when I'm trying to login or signup

后端 未结 6 1504
执笔经年
执笔经年 2021-01-11 10:00

I\'m making a flutter app for my college project, where I\'m adding a login and signup page and authenticating it via Firebase, and when I click login the debug console says

6条回答
  •  无人及你
    2021-01-11 10:28

    I face the same issue. Just modify to be:

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

    See https://github.com/flutter/flutter/issues/38757#issuecomment-522307525

提交回复
热议问题