This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void _onPressed(){ | |
| var firebaseUser = FirebaseAuth.instance.currentUser; | |
| firestoreInstance | |
| .collection("users") | |
| .doc(firebaseUser.uid) | |
| .update({"age": 60,"familyName": "Haddad"}).then((_) { | |
| print("success!"); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void _onPressed() { | |
| var firebaseUser = FirebaseAuth.instance.currentUser; | |
| firestoreInstance | |
| .collection("users") | |
| .doc(firebaseUser.uid) | |
| .update({"age": 60}).then((_) { | |
| print("success!"); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void _onPressed() { | |
| var firebaseUser = FirebaseAuth.instance.currentUser; | |
| firestoreInstance.collection("users").doc(firebaseUser.uid).update({ | |
| "age": 60, | |
| "familyName": "Haddad", | |
| "address.street": "street 50", | |
| "address.country": "USA" | |
| }).then((_) { | |
| print("success!"); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void _onPressed() { | |
| var firebaseUser = FirebaseAuth.instance.currentUser; | |
| firestoreInstance.collection("users").doc(firebaseUser.uid).update({ | |
| "characteristics" : FieldValue.arrayUnion(["generous","loving","loyal"]) | |
| }).then((_) { | |
| print("success!"); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| firestoreInstance.collection("users").add({ | |
| "name": "john", | |
| "age": 50, | |
| "email": "example@example.com", | |
| "address": {"street": "street 24", "city": "new york"} | |
| }).then((value) { | |
| print(value.id); | |
| firestoreInstance | |
| .collection("users") | |
| .doc(value.id) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void _onPressed() { | |
| var firebaseUser = FirebaseAuth.instance.currentUser; | |
| firestoreInstance.collection("users").doc(firebaseUser.uid).delete().then((_) { | |
| print("success!"); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void _onPressed() { | |
| var firebaseUser = FirebaseAuth.instance.currentUser; | |
| firestoreInstance.collection("users").doc(firebaseUser.uid).update({ | |
| "username" : FieldValue.delete() | |
| }).then((_) { | |
| print("success!"); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void _onPressed() { | |
| firestoreInstance.collection("users").get().then((querySnapshot) { | |
| querySnapshot.docs.forEach((result) { | |
| print(result.data()); | |
| }); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void _onPressed() { | |
| firestoreInstance.collection("users").get().then((querySnapshot) { | |
| querySnapshot.docs.forEach((result) { | |
| firestoreInstance | |
| .collection("users") | |
| .doc(result.id) | |
| .collection("pets") | |
| .get() | |
| .then((querySnapshot) { | |
| querySnapshot.docs.forEach((result) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void _onPressed() { | |
| var firebaseUser = FirebaseAuth.instance.currentUser; | |
| firestoreInstance.collection("users").doc(firebaseUser.uid).get().then((value){ | |
| print(value.data()); | |
| }); | |
| } |