Uint8List packUint32BE(int value) { var bytes = Uint8List(4); bytes[0] = (value >> 24) & 0xFF; bytes[1] = (value >> 16) & 0xFF; bytes[2] = (value >> 8) & 0xFF; bytes[3] = value & 0xFF; return bytes; }