Created
February 26, 2019 20:59
-
-
Save Gogetter/20079a4352fdfc28a4e179ca3181616e to your computer and use it in GitHub Desktop.
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
| static void saveOrUpdateVisitor(final Visitor visitor, final bool signIn) async { | |
| if (visitor != null) { | |
| // _firestore is a private variable declared using -> static Firestore _firestore = Firestore.instance; | |
| await _firestore.collection(Constants.visitors)/// create the collection where Visitors will be saved | |
| .document(visitor.emailAddress)/// construct a path (more like reference) | |
| .setData(Visitor.toMap(visitor, signIn));/// save data | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment