I am working on a flutter app that has registration screen. I have implemented the email auth and want to check if the user already registered or not? I have used:
final newUser = await _auth.createUserWithEmailAndPassword(email: email.trim(),password: password);
to register the user. if the user has already registered, it throw an error that days the email is already in use, but what i want is to customize the message. so, how to retrieve the a specific user data (e.g email..) from firebase collection by giving an specific email? for example: before registration call, want to query from collection if the specified email is already in use or not?
i have tried the fetchSignInMethodsForEmail as well, but could not get any result.