getDouble method

double getDouble()

Reads the next eight bytes at this reader's current position, composing them into a double value according to the little-endian order

return The double value at the reader's current position

Implementation

double getDouble() {
  var length = 8;
  var byteData = Uint8List(length);
  var index = 0;
  for (var i = _position, j = _position + length; i < j; i++) {
    byteData[index++] = _bytes[i];
  }
  var number = byteData.buffer.asByteData().getFloat64(0, Endian.little);
  _position += 8;
  return number;
}