getRandomSoundNextPlay method
Get the next run for the given randomSound
.
Implementation
NextRun<RandomSound> getRandomSoundNextPlay(final RandomSound randomSound) =>
randomSoundNextPlays.firstWhere(
(final element) => element.value == randomSound,
orElse: () {
final nextRun = NextRun(randomSound);
randomSoundNextPlays.add(nextRun);
return nextRun;
},
);