I am new to flutter and using sample code that does signIn, I get the user, but I need to find if the user has previously used the App ( and then uninstalled) or using on a new device. I see another question that gets the AuthResult as shown below,
AuthResult authResult = await _auth.signInWithCredential(credential);
if (authResult.additionalUserInfo.isNewUser) {
//User logging in for the first time
// Redirect user to tutorial
}
else {
//User has already logged in before.
//Show user profile
}
But the SignInScreen, does not return the authResult
SignInScreen(
title: "Demo",
header: new Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0),
child: new Padding(
padding: const EdgeInsets.all(16.0),
child: new Text("Demo"),
),
),
showBar: true,
// horizontalPadding: 8,
bottomPadding: 5,
avoidBottomInset: true,
color: Color(0xFF363636),
providers: [
ProvidersTypes.google,
ProvidersTypes.phone,
ProvidersTypes.facebook,
// ProvidersTypes.twitter,
// ProvidersTypes.email
],
twitterConsumerKey: "",
twitterConsumerSecret: "", horizontalPadding: 12,
)