messages property Null safety

Stream<Uint8List> messages

The stream of Midi messages originating from this source port.

Implementation

Stream<Uint8List> get messages {
  return MidiPlatform.instance
      .midiMessages()
      .where((dynamic data) => data[Constants.port] == id)
      .map<Uint8List?>((dynamic data) => data[Constants.data])
      .transform(MessageSplitter());
}