title: _MapStream<QuerySnapshot<Map<String, dynamic>>, List<Event>>' is not a subtype of type 'Map<DateTime, List<dynamic>>
body: <p>I don't understand this error message:</p>
  <p>type '_MapStream&lt;QuerySnapshot&lt;Map&lt;String, dynamic&gt;&gt;, List&gt;' is not a subtype of type 'Map&lt;DateTime, List&gt;'</p>
  <p>I have looked for the meaning of _MapStream but have not found any definition. I have seen it mentioned in other posts here.</p>
  <p>I think I need to convert from Map&lt;DateTime,List&gt; type to _MapStream&lt;QuerySnapshot&lt;Map&lt;String, dynamic&gt;&gt;, List&gt; but I don't know what this type is.</p>
  <p>I am getting the error in this code segment when I try to add the _eventsStream to the streamController:</p>
  <pre><code>    var _eventsStream;
  
      void _onDaySelected(DateTime day, List events, List holidays) {
          _eventsStream = _firestoreService.getEventStream(day);
          setState(() {
            _streamController.add(_eventsStream);  **&lt;&lt;&lt;&lt;&lt; Error Here**
            //_selectedEvents = _eventsStream;
          });
        }
  </code></pre>
  <p>_eventsStream is populated in the first line and here is the _firestoreService.getEventStream(day) method that is used to populate it:</p>
  <pre><code>  Stream&lt;List&lt;Event&gt;&gt; getEventStream(DateTime dateTime) {
      return _db.collection('agency').doc(globals.agencyId).collection('event')
          .where('eventDate', isGreaterThanOrEqualTo: Timestamp.fromDate(dateTime))
          .snapshots().map((snapshot) =&gt; snapshot.docs
          .map((document) =&gt; Event.fromFirestore(document.data()))
          .toList());
    }
  </code></pre>
  <p>Here is the definition of the Event data structure for the firebase document. This data will be in the record returned from the _firestoreService.getEventStream method above:</p>
  <pre><code>class Event {
    final String eventName;
    final DateTime eventStartTime;
    final String eventDuration;
    final DateTime eventDate;
    final String eventDescription;
    final String agentId;
    final String agencyId;
  </code></pre>
  <p>So please help me understand the error message.
  Should I change the type returned from _firestoreService.getEventStream()?
  How do I convert from what is returned to what I need?
  Should I declare _eventsStream as something other than a var?
  Thanks.</p>