static Uint8List shortToByteArray(int value) { final bytes = Uint8List(2); bytes[0] = value >> 8; bytes[1] = value; return bytes; }