writeU64 method

void writeU64(
  1. Int64 value
)

Implementation

void writeU64(Int64 value) {
  final bytes = Uint8List(8);
  final low = value.toInt() & 0xFFFFFFFF;
  final high = (value >> 32).toInt() & 0xFFFFFFFF;
  bytes[0] = low & 0xFF;
  bytes[1] = (low >> 8) & 0xFF;
  bytes[2] = (low >> 16) & 0xFF;
  bytes[3] = (low >> 24) & 0xFF;
  bytes[4] = high & 0xFF;
  bytes[5] = (high >> 8) & 0xFF;
  bytes[6] = (high >> 16) & 0xFF;
  bytes[7] = (high >> 24) & 0xFF;
  _buffer.add(bytes);
}