loadSoundAsset method

Future<Sound> loadSoundAsset(
  1. String assetPath
)

Loads a sound asset and creates a Sound from it.

Implementation

Future<Sound> loadSoundAsset(String assetPath) async {
  final data = await rootBundle.load(assetPath);
  return loadSound(AudioData.detectFromBuffer(data.buffer.asFloat32List()));
}