cancelScheduledNotes method
Implementation
@override
Future<void> cancelScheduledNotes({String? synthId}) async {
if (synthId != null) {
final timers = _scheduledTimers.remove(synthId) ?? const <Timer>[];
for (final timer in timers) {
timer.cancel();
}
return;
}
for (final timers in _scheduledTimers.values) {
for (final timer in timers) {
timer.cancel();
}
}
_scheduledTimers.clear();
}