Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

showing error (error: The method 'document' isn't defined for the type 'CollectionReference'. ) #6

Open
Ankit-Tiwari007 opened this issue Jan 20, 2021 · 6 comments

Comments

@Ankit-Tiwari007
Copy link

Future signUp() async{
try{
_status = Status.Authenticating;
notifyListeners();
await _auth.createUserWithEmailAndPassword(email: email.text.trim(), password: password.text.trim()).then((result){
_firestore.collection('users').document(result.user.uid).setData({ error line
"name": name.text,
"email": email.text,
"id": result.user.uid
});
});
return true;
}catch(e) {
return _onError(e.toString());
}
}

@Ankit-Tiwari007
Copy link
Author

Ankit-Tiwari007 commented Mar 9, 2021 via email

@kaitheiron
Copy link

hi, can I know what are the solutions? I'm having the same error too.

@Ankit-Tiwari007
Copy link
Author

Ankit-Tiwari007 commented Jul 13, 2021 via email

@kaitheiron
Copy link

oh lol thanks a lot! and the setData also got error, and I replaced it with set. Am I right?

@Ankit-Tiwari007
Copy link
Author

Ankit-Tiwari007 commented Jul 13, 2021 via email

@kaitheiron
Copy link

Will do! Thanks again, appreciate it so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants