title: flutter - errors event.snapshot.value since updating to firebase 9.0.X
body: <p>I'm getting errors on <code>event.snapshot.value</code> since updating to firebase 9.0.5.
  I have many functions like this which worked fine in firebase 8.X.</p>
  <pre><code>  Stream&lt;List&lt;MentorModel&gt;&gt; mentorStream() {
      final stream = _database.onValue;
  
      final Stream&lt;List&lt;MentorModel&gt;&gt; resultStream = stream.map((event) {
        List&lt;MentorModel&gt; _mentorList = [];
        Map&lt;String, dynamic&gt;.from(event.snapshot.value).forEach((key, value) =&gt; _mentorList.add(MentorModel.fromRTDB(key, value)));
        return _mentorList;
      });
  
      return resultStream;
    }
  </code></pre>
  <p>Now I have error marks on <code>event.snapshot.value</code>, and android studio says</p>
  <pre><code>Error: The argument type 'Object?' can't be assigned to the parameter type 'Map&lt;dynamic, dynamic&gt;'.
   - 'Object' is from 'dart:core'.
   - 'Map' is from 'dart:core'.
        Map&lt;String, dynamic&gt;.from(event.snapshot.value).forEach((key, value) =&gt; _mentorList.add(MentorModel.fromRTDB(key, value)));
  </code></pre>
  <p>When I try</p>
  <pre><code>Map&lt;String, dynamic&gt;.from(event.snapshot.value as Map&lt;String, dynamic&gt;).forEach((key, value) =&gt; 
  </code></pre>
  <p>then the error marker is gone but when I run the app it returns</p>
  <pre><code>E/flutter (16737): [ERROR:flutter/shell/common/shell.cc(93)] Dart Unhandled Exception: type '_InternalLinkedHashMap&lt;Object?, Object?&gt;' is not a subtype of type 'Map&lt;String, dynamic&gt;' in type cast, stack trace: 
  </code></pre>
  <p>What exactly changed in firebase 9.0? How can I iterate through event.snapshot.value in firebase 9.0?</p>