Skip to content

Instantly share code, notes, and snippets.

@PeterHdd
Last active October 16, 2020 10:27
Show Gist options
  • Select an option

  • Save PeterHdd/5dfe0d3f0adcf4e2774186586a1999ee to your computer and use it in GitHub Desktop.

Select an option

Save PeterHdd/5dfe0d3f0adcf4e2774186586a1999ee to your computer and use it in GitHub Desktop.
void _onPressed() {
var firebaseUser = FirebaseAuth.instance.currentUser;
firestoreInstance.collection("users").doc(firebaseUser.uid).set(
{
"username" : "userX",
},SetOptions(merge: true)).then((_){
print("success!");
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment