title: type 'List<Object?>' is not a subtype of type 'List<>' in type cast
body: <p>What I'm trying to do is to communicate between Flutter and Android. For this I'm using EventChannel and MethodChannel. Due to codec restrictions I need to wrap my Android data in HashMap before sending it to Flutter. On the Flutter side I'm trying to unwrap it for display in the simple ListView. However, I have problem with typecasting that I can't figure out</p>
  <pre><code>factory BLEService.fromMap(Map&lt;String, dynamic&gt; map) =&gt; BLEService(
      map['uuid'] as String,
      (map['characteristics'] as List&lt;BLECharacteristic&gt;)
          .map&lt;BLECharacteristic&gt;((e)  =&gt;
        BLECharacteristic.fromMap(e as Map&lt;String, BLECharacteristic&gt;)
      ).toList()
    );
  </code></pre>
  <p>For this line the following exception is thrown:<br />
  <code>type 'List&lt;Object?&gt;' is not a subtype of type 'List&lt;BLECharacteristic&gt;' in type cast</code></p>
  <p>Help to solve this issue would be greatly appreciated</p>
  <hr />
  <p>Edit<br />
  Flutter BLECharacteristic.fromMap</p>
  <pre><code>factory BLECharacteristic.fromMap(Map&lt;String, dynamic&gt; map) =&gt; BLECharacteristic(
      map['uuid'] as String,
    );
  </code></pre>
  <p>Java BLECharacteristic.toMap</p>
  <pre><code>HashMap&lt;String, Object&gt; toMap() {
          HashMap&lt;String, Object&gt; bleCharacteristicMap = new HashMap&lt;&gt;();
          bleCharacteristicMap.put(&quot;uuid&quot;, uuid);
          return bleCharacteristicMap;
      }
  </code></pre>