title: Chaining Futures Do Not Execute In Order
body: <p>I'm currently reading variables from a Bluetooth device. This obviously takes an undetermined amount of time, so I am using futures (This method is readCharacteristic in my code down below). </p>
  
  <p>More than one read operation cannot take place at a time - if a second read operation is started while a first operation is still in progress, Flutter will throw an error.</p>
  
  <p>My understanding was that chaining futures together using .then() would only allow the next statement to execute when the previous call had finished. This idea seems to be true until I try to read a third value - that is when the error is thrown, because of the overlapping read events.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>readCharacteristic(scanDurationCharacteristic)
      .then((list) =&gt; sensorScanDuration = list[0].toDouble())
      .then((_) {
    readCharacteristic(scanPeriodCharacteristic)
        .then((list) =&gt; sensorScanPeriod = list[0].toDouble());
  }).then((_) {
    readCharacteristic(aggregateCharacteristic)
        .then((list) =&gt; sensorAggregateCount = list[0].toDouble());
  }).then((_) {
    readCharacteristic(appEUICharacteristic)
        .then((list) =&gt; appEUI = decimalToHexString(list));
  }).then((_) {
    readCharacteristic(devEUICharacteristic)
        .then((list) =&gt; devEUI = decimalToHexString(list));
  }).then((_) {
    readCharacteristic(appKeyCharacteristic)
        .then((list) =&gt; appKey = decimalToHexString(list));
  });
  </code></pre>
  
  <p>What is a better way to ensure that these read events will not overlap?</p>