-
-
Save ijoschek/902240b134f58535f5c0542115866b45 to your computer and use it in GitHub Desktop.
flutter_firestore_tut
This file contains 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
//... | |
class _Home extends State<StatefulWidget> { | |
//... | |
void clickWrite() async { | |
if (_myContr.text.isNotEmpty) { | |
await Firestore.instance | |
.collection('docs') | |
.document() | |
.setData({'text': _myContr.text}); | |
_myContr.text = ''; | |
interact(); | |
} | |
} | |
//... | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
//... | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment