I want to get the snapShot of user provider If the user have sign in with Email show this. But if user have sign in with Gmail then show this.
code from what I get so far:
StreamBuilder<User?>(
stream: authBloc.currentUser,
builder: (context, snapshot) {
if (!snapshot.hasData) {
return const Text(
'Oops somethings went wrong');
}
body: ...(
snapshot.data!.providerData.contains("email")
? Text("You have sign in with Email")
//Show this if user have sign In with Email provider
: Text("You have sign in with Gmail"),
//Show this if user have sign In with Gmail provider
),
),
}
}