title: "The getter 'body' isn't defined for the type 'Response<dynamic>". on Flutter
body: <p>i'm having a problem to put a response json on a List.</p>
  <p>When i try to transform the body data (where the data comes) i get the error:</p>
  <pre><code>The getter 'body' isn't defined for the type 'Response&lt;dynamic&gt;'.
  Try importing the library that defines 'body', correcting the name to the name of an existing getter, or defining a getter or field named 'body'.dartundefined_getter
  
  </code></pre>
  <p>My code is:</p>
  <pre><code>     onPressed: () async {
                                      Response response;
                                      Dio dio = new Dio();
                                      String url =
                                          'http://192.168.15.5:8090/api/getOs';
                                      response = await dio.post(url, data: {
                                        &quot;numeroos&quot;: _numeroOsController.text   
                                      });
  
  
                                      final extractedData = json.decode(response.body) //Here is the error
                                              as Map&lt;String, dynamic&gt;;
                                      final List&lt;ProdutoOs&gt; loadedProducts = [];
                                      extractedData.forEach((key, value) {
                                        loadedProducts.add(ProdutoOs(
                                            cod_produto: value['Codigo_Produto'],
                                            qtd: value['Qtde'],
                                            desc: value['Descricao'],
                                            numOs: value['Numero_da_OS'],
                                            codOs: value['CodOS']));
                                
                                        Navigator.pop(context, true);
  
                                    
                                      });
                                      
                                    }
  
  </code></pre>
  <p>So i'm trying to put the response.body in a List but i cant, what am i doing wrong?</p>
  <p>I have also tried using response.data and dont get the same error, the app runs but i get:</p>
  <pre><code>E/flutter (11379): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: type 'List&lt;dynamic&gt;' is not a subtype of type 'String'
  </code></pre>