devices property
Returns a list of found MIDI devices.
Implementation
@override
Future<List<MidiDevice>?> get devices async {
var devs = await _methodChannel.invokeMethod('getDevices');
return devs.map<MidiDevice>((m) {
var map = m.cast<String, Object>();
var dev = MidiDevice(map["id"].toString(), map["name"] ?? "-",
map["type"], map["connected"] == "true");
dev.inputPorts = _portsFromDevice(map["inputs"], MidiPortType.IN);
dev.outputPorts = _portsFromDevice(map["outputs"], MidiPortType.OUT);
return dev;
}).toList();
}