Skip to content

Instantly share code, notes, and snippets.

View AshAman999's full-sized avatar
:octocat:
Collaborating

Aman Raj AshAman999

:octocat:
Collaborating
View GitHub Profile
// stream builder in dart using the new firebase commands
StreamBuilder<QuerySnapshot>(
stream: _firestore.collection('messages').snapshots(),
builder: (context, snapshot) {
if (snapshot.hasData) {
final messages = snapshot.data.docs;
List<Text> messageWidget = [];
for (var message in messages) {
final messageText = message.get('text');