deleteTrack method
Removes a track from the underlying sequencer engine.
Implementation
List<Track> deleteTrack(Track track) {
final keysToRemove = [];
_tracks.forEach((key, value) {
if (value == track) {
keysToRemove.add(key);
}
});
keysToRemove.forEach((key) {
NativeBridge.removeTrack(key);
_tracks.remove(key);
});
return _tracks.values.toList();
}