title: Extract the value from a future
body: <p>I want to extract the value of the response from an api call.</p>
  <pre><code>  import 'package:http/http.dart' as http;
  
    refreshToken() {
    Future&lt;http.Response&gt; _response = _httpClient.callApi(
        endPoint: refreshTokenEndpoint, variables: refreshTokenVariables);
  
    http.Response _tokenResponse;
    _response.then((http.Response value) =&gt; _tokenResponse = value);
  
    print(_tokenResponse.body);
    }
  </code></pre>
  <p>But when i try to access the body i get an error body was called on null.</p>