sendData method

  1. @override
void sendData(
  1. Uint8List data, {
  2. int? timestamp,
  3. String? deviceId,
})
override

Sends data to the currently connected device.

Data is an UInt8List of individual MIDI command bytes.

Implementation

@override
void sendData(Uint8List data, {int? timestamp, String? deviceId}) {
  unawaited(
    _hostApi.sendData(
      pigeon.MidiPacket(
        device:
            deviceId == null
                ? null
                : pigeon.MidiHostDevice(
                  id: deviceId,
                  type: pigeon.MidiDeviceType.unknown,
                ),
        data: data,
        timestamp: timestamp,
      ),
    ),
  );
}