Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created November 8, 2022 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vijayinyoutube/11949ec67a0417f1bf9ad987865b6b11 to your computer and use it in GitHub Desktop.
Save vijayinyoutube/11949ec67a0417f1bf9ad987865b6b11 to your computer and use it in GitHub Desktop.
Future<void> addStudents() async {
//creates a new doc with unique doc ID
return collectionRef
.add({
'Name': "TestName",
})
.then((value) => debugPrint("User Added"))
.catchError((error) => debugPrint("Failed to add user: $error"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment