Uint8List i24ToBytes(int value) { var uint8list = Uint8List(4) ..buffer.asByteData().setUint32(0, value, Endian.big); return uint8list.sublist(1); }