title: Can't get values from api as double or int
body: <p>I'm facing this problem where I can't return a value from my API as a double.</p>
  <pre><code> Future&lt;int&gt; getStock(String refProd) async {
  int stok = 0;
  final response = await http.get(
    Uri.parse(&quot;http://127.0.0.1:8000/api/produit/stock/$refProd&quot;),
    headers: &lt;String, String&gt;{
      'Content-Type': 'application/json; charset=utf-8',
      'Accept': 'application/json; charset=utf-8',
    },
  );
  if (response.statusCode == 200) {
    setState(() {
      stok = jsonDecode(response.body);
    });
    return stok;
  } else {
    throw Exception('DB ERROR!');
  }
  </code></pre>
  <p>}</p>
  <p>Trying to print it like this :</p>
  <pre><code>print(getstock('1200').toString());
  </code></pre>
  <p>It returns : <code>InstanceofFuture&lt;int&gt;</code> but not the returned value which is <code>stok</code> .</p>