-
-
Save ijoschek/d0f5c68a16a7cd905f18d0f256e66a7d 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 clickGet() async { | |
if (_getContr.text.isNotEmpty) { | |
var query = await Firestore.instance | |
.collection('docs') | |
.where('text', isEqualTo: _getContr.text) | |
.getDocuments(); | |
setState(() { | |
_queriedDocs = query.documents.length; | |
}); | |
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