This example from the cloud\_firestore documentation uses a `StreamBuilder` and the `ConnectionState` of an `AsyncSnapshot` to handle the stream in its different states. Is there a similar way to manage the `ConnectionState` when accessing the stream via a `StreamProvider` instead of a `StreamBuilder`? What is the best way of avoiding it to return `null` in the short while until it actually has documents from Firestore?

Here the example from the cloud\_firestore docs with the StreamBuilder:

```
    class BookList extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return StreamBuilder<QuerySnapshot>(
          stream: Firestore.instance.collection('books').snapshots(),
          builder: (BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot) {
            if (snapshot.hasError)
              return new Text('Error: ${snapshot.error}');
            switch (snapshot.connectionState) {
              case ConnectionState.waiting: return new Text('Loading...');
              default:
                return new ListView(
                  children: snapshot.data.documents.map((DocumentSnapshot document) {
                    return new ListTile(
                      title: new Text(document['title']),
                      subtitle: new Text(document['author']),
                    );
                  }).toList(),
                );
            }
          },
        );
      }
    }

```

I have a rather basic stream:

```
    List<AuditMark> _auditMarksFromSnapshot(QuerySnapshot qs) {
      return qs.documents.map((DocumentSnapshot ds) {
        return AuditMark.fromSnapshot(ds);
      }).toList();
    }

    Stream<List<AuditMark>> get auditMarks {
      return Firestore.instance
          .collection('_auditMarks')
          .snapshots()
          .map(_auditMarksFromSnapshot);
    }

```

This is accessed via a `StreamProvider` (have omitted other providers here):

```
    void main() async {
      runApp(MultiProvider(
        providers: [
          StreamProvider<List<AuditMark>>(
              create: (_) => DatabaseService().auditMarks, ),
        ],
        child: MyApp(),
      ));
    }

```

I have tried somehow converting the `QuerySnapshot` to an `AsyncSnapshot<QuerySnapshot>` but probably got that wrong.
Could of course give the `StreamProvider` some `initialData` like so - but this is cumbersome, error prone and probably expensive:

```
    initialData: <AuditMark>[
      AuditMark.fromSnapshot(await Firestore.instance
          .collection('_auditMarks')
          .orderBy('value')
          .getDocuments()
          .then((value) => value.documents.first))

```

...but I am hoping there is a smarter way of managing the connection state and avoiding it to return null before it can emit documents?