playSfxSource method

Future<void> playSfxSource(
  1. Source source, {
  2. String? cacheKey,
})

Play from an explicit Source (pooled)

Provide an optional stable cacheKey to share the pool for equivalent sources.

Implementation

Future<void> playSfxSource(Source source, {String? cacheKey}) async {
  final key = cacheKey ?? source.toString();
  await playPooled(key, source, volume: _storage.sfxVolume);
}