title: type '(dynamic) => Null' is not a subtype of type '(String, dynamic) => void' of 'f'
body: <p>I am trying to populate data retrieved from a web API :</p>
  <pre><code>  void asyncInitState() async {
      BulletinController bulletinController = BulletinController() ;
      var value = await bulletinController.AfficherEtablissement();
      value.forEach((entry) {
        print(entry['id']);
      });
    }
  
    @override
    void initState() {
      super.initState();
      asyncInitState(); 
      super.initState();
    }
  </code></pre>
  <p>this is the &quot;AfficherEtablissement()&quot; method :</p>
  <pre><code> Future&lt;dynamic&gt; AfficherEtablissement() async {
       final response =
       await http.get('https://jsonplaceholder.typicode.com/albums/1');
       if (response.statusCode == 200) {
         var parsedJson = json.decode(response.body);
         //decode
         print(parsedJson);
         Map&lt;String, dynamic&gt; data = json.decode(response.body);
         return data  ;
       } else {
         throw Exception('Failed to load');
       }
     }
  </code></pre>
  <p>i am getting this error :</p>
  <pre><code>type '(dynamic) =&gt; Null' is not a subtype of type '(String, dynamic) =&gt; void' of 'f'
  </code></pre>
  <p>int his line :</p>
  <pre><code>print(entry['id']);
  </code></pre>