close method
override
Closes the instance. This method should be called when the instance is no longer needed. Once close is called, the instance can no longer be used.
Implementation
@override
Future<void> close() {
_stopTimer?.cancel();
_stopTimer = null;
if (state.playing) {
engine?.clearScheduled();
engine?.allNotesOff();
}
coordinator?.stopped(stop);
return super.close();
}