title: Method running before previous method is finished, Future Async Dart
body: <p>My method <em>processData()</em> is executing before <em>pullAllData()</em> is finished but I need <em>processData()</em> to wait until <em>pullAllData()</em> is completely finished before running. This is causing my <em>isDownloadSuccessful</em> bool to be Null when <em>processData()</em> is ran.</p>
  <pre><code>Future getCoinData() async {
      calculateNumberOfDataPoints();
      pullTimesAndPrices();
      return timesAndPrices;
    }
  
  Future pullTimesAndPrices() async {
      for (String cryptoCurrency in cryptoAbbreviation) {
        pullAllData(cryptoCurrency);
        processData(cryptoCurrency);
      }
    }
  
  Future pullAllData(cryptoCurrency) async {
      String historicalRequestURL =
          '$cryptoAPIURL$cryptoCurrency$currency/ohlc?periods=$periodValue&amp;apikey=$apiKey';
      http.Response historicalResponse = await http.get(historicalRequestURL);
      isPullSuccessful = (historicalResponse.statusCode == 200);
    }
  
  void processData(cryptoCurrency) {
      if (isPullSuccessful) {
        ...
      } else {
        throw 'Problem pulling data';
      }
    }
  </code></pre>